Sales order state machine
Last updated 2026-10-19
Sales order states, transitions, and events: from draft to delivered, including the review flow, partial fulfillment, exceptions, and OMS direct shipping.

Event table#
| Event | From | To | Trigger | Actor | Side effects |
|---|---|---|---|---|---|
| [submit] | draft | allocated | Default flow: submit the order | Sales / CS | ATP check + reserve inventory; on stockout: exception / split / wait per policy |
| [submit] | draft | pending_review | Review flow enabled | Sales / CS | Enters approval queue |
| [OMS direct ship] | confirmed | fulfilled | Ship standalone from OMS, bypassing WMS | Sales / CS | Tracking/carrier filled in; shortage lines get shortage_qty + reason; status audit written |
| [OMS direct ship] | allocated | fulfilled | Ship standalone from OMS, bypassing WMS | Sales / CS | Same as above |
| [approve] | pending_review | confirmed | Approval granted | Approver | — |
| [reject] | pending_review | draft | Approval rejected | Approver | — |
| [allocate] | confirmed | allocated | Allocate inventory | System / Sales | Inventory locked |
| [release to WMS] | allocated | released | Hand off to warehouse execution | Sales / System | WMS outbound shipment created |
| Auto exception | allocated | exception | No stock at allocate time | System | Manual: back to draft/confirmed, or cancel |
| [fulfill] | released | fulfilled | WMS outbound report, or OMS direct ship | System | Whole order shipped |
| [partial_fulfill] | released | partial_fulfilled | Ship in batches | System | Partially shipped; remainder ships later |
| [fulfill] | partial_fulfilled | fulfilled | Ship the remainder | System | — |
| [deliver] | fulfilled | delivered | Delivery confirmed | System / Manual | Auto if tracking exists, otherwise manual |
| [cancel] | draft / pending_review / confirmed / allocated | cancelled | Cancel the order | Sales / CS | Allowed any time before fulfillment |
| [cancel] | released / partial_fulfilled | cancelled | Cancel the order | Sales / CS | Propagates to WMS (direct cancel if not picked; return to stock first if picked) |
Two fulfillment legs: the WMS leg (released → fulfilled via WMS outbound report) and the OMS direct leg (confirmed / allocated → fulfilled, standalone shipping that bypasses WMS). Short fulfill does not get its own state — the order stays fulfilled and is watermarked "Short".