Back to Blog
Corporate Solutions

CRM Warehouse Management Integration: Orders and Stock

How to integrate a CRM with a warehouse management system (WMS): available to promise stock, reservations, order status, shipment data flowing back to sales, which system owns what and common mistakes.

CRMDepo YönetimiWMSEntegrasyonKurumsal Yazılım

CRM warehouse management integration is the automatic flow of orders, stock and status between the customer relationship system your sales team uses and the WMS that runs stock and shipping in the warehouse. Short answer: the CRM owns the customer and the quote, the WMS owns physical stock. When a sales rep prepares a quote, the CRM reads the available quantity from the WMS; when the order is confirmed, stock is reserved; when the shipment leaves, the tracking number and delivery status are written back to the customer record in the CRM.

Why integrate a CRM with a WMS?

Without integration, sales asks the warehouse about stock by phone or chat and the customer waits for the answer. Worse, two reps sell the same last 20 cartons to two different customers and the problem only shows up on shipping day. When a customer calls to ask where their order is, the rep cannot see the warehouse screen and has to ask someone again. The core benefits of a CRM come from keeping the whole customer history in one place; if shipping data stays outside that history, the picture is incomplete. A warehouse management system (WMS) runs shelves, picking and shipping well but does not know what sales has promised. Integration joins the two halves.

Which data flows in which direction?

  • Available stock from WMS to CRM: not the physical quantity on the shelf, but the quantity after reservations and blocked stock are deducted. The rep sees it per warehouse on the quote screen.
  • Orders from CRM to WMS: when a quote becomes an order, the lines, delivery address, requested date and priority are sent in one message. The order number is the shared key on both sides.
  • Status from WMS to CRM: picked, packed, shipped, delivered. Every status change lands on the customer record with a timestamp.
  • Shipment details from WMS to CRM: carrier, tracking number, delivery note number and any lines shipped short.
  • Returns from WMS to CRM: when a customer return reaches the warehouse, the accepted and rejected quantities, so the rep talks to the customer with correct information.

The core rules of the integration

The first rule is data ownership: every field has exactly one owner. Customer name and address change in the CRM and are copied to the WMS; stock quantity changes in the WMS and reaches the CRM read only. Stock corrections are never allowed on a CRM screen. The second rule is reservation: the moment an order is confirmed, the quantity is reserved and deducted from available stock, so the same carton cannot be sold twice. If you reserve at the quote stage, the reservation must expire; an expired quote releases its stock automatically. The third rule is idempotency: after a network error the same order may be sent twice, so the WMS checks the order number and never opens the same order twice. Messages travel through a queue and are retried when the API integration fails.

The number shown to sales is available to promise stock, not physical stock: quantity on hand minus open reservations minus blocked or quarantined stock. Without this distinction, integration does not fix the problem, it only makes it faster.

Example: available stock and reservations

The TypeScript example below does two jobs: it calculates the available quantity per warehouse and it reserves stock for an order coming from the CRM. Expired reservations are ignored, a repeated order does not create a second reservation, and a request for more than the available stock is rejected so the CRM can warn the rep.

type Reservation = {
  orderId: string;
  sku: string;
  warehouseId: string;
  quantity: number;
  expiresAt: string;
};

type StockRow = { sku: string; warehouseId: string; onHand: number };

// Available to promise: what sales may still sell from a warehouse.
function availableToPromise(
  stock: StockRow,
  reservations: Reservation[],
  now: string,
): number {
  const reserved = reservations
    .filter(
      r =>
        r.sku === stock.sku &&
        r.warehouseId === stock.warehouseId &&
        r.expiresAt > now,
    )
    .reduce((sum, r) => sum + r.quantity, 0);
  return Math.max(stock.onHand - reserved, 0);
}

// Called by the CRM when a quote becomes an order.
function reserve(
  stock: StockRow,
  reservations: Reservation[],
  request: Reservation,
  now: string,
): Reservation[] {
  if (reservations.some(r => r.orderId === request.orderId && r.sku === request.sku)) {
    return reservations; // idempotent: the same order is never reserved twice
  }
  if (availableToPromise(stock, reservations, now) < request.quantity) {
    throw new Error('Not enough stock for ' + request.sku + ' in ' + request.warehouseId);
  }
  return [...reservations, request];
}

Common mistakes

  • Copying stock to the CRM in a nightly batch: whatever sells during the day is invisible, and the number that was right in the morning is wrong by noon. Send an event whenever stock changes, or query live at quote time.
  • Showing a single total: with several warehouses, the quantity in the warehouse closest to the customer must be shown separately, or delivery times will be promised wrongly.
  • Forgetting cancellations: if an order cancelled in the CRM does not release its reservation in the WMS, stock looks taken when it is not.
  • Not mapping product codes: if the CRM and the WMS use different item codes, no order lands on the right line without a shared mapping table.
  • Swallowing errors silently: failed messages must appear on an error list and be reported to the person responsible.

Conclusion

CRM warehouse management integration makes what sales promises and what the warehouse can deliver meet in the same number. The key to success is not the choice of software but the rules: one owner per field, an available to promise calculation, expiring reservations and idempotent messages. If you want to connect your existing CRM and warehouse system, or build both together, take a look at our corporate solutions page or describe your needs and get a quote.

Let's Build Your Project

Get a free consultation for your website, mobile app, or corporate software project.

Get a Free QuoteExplore our Corporate Solutions service