Review, approval and allocation
Submit → approve with ATP check → allocate: the path from draft to a releasable order.
Before an order can be released, it must pass two gates: submit (draft → pending_review) and approve (pending_review → confirmed, with an ATP inventory check). Allocation then assigns the fulfilling warehouse.
Submit for review#
The submit action moves a draft to pending_review. No inventory check happens here — it is just a handoff to the approver.
Approve, with ATP check#
- ATP (available-to-promise) is checked line by line at approve time.
- oms_standalone mode: ATP = qty − allocated_qty on the OMS inventory ledger; a shortfall returns INSUFFICIENT_ATP with the SKU details.
- wms_sync mode: ATP is a read-only check against WMS qty_available.
- force=true skips the ATP check and approves anyway — use it when you knowingly accept a shortfall.
Auto-approve merchants#
Merchants on the auto-approve list (oms_auto_approve_merchants, is_active) skip the review queue: their orders go straight from draft to confirmed, and the audit log records it.
Allocate: assign the warehouse#
- The allocate action moves confirmed → allocated and requires warehouse_id.
- OMS-side allocation is a release voucher (oms_allocations: order + warehouse), not bin-level reservation. Real bin locking happens later, in WMS (on push-to-wms / shipment commit) or at ship time in standalone mode.