ERP Core / Sales OMS
Sales OMS - Operational Workflows & State Machines
Commercial lifecycle, omnichannel execution and exception flow, and state transition tables.
Operational Workflows & State Machines
The Sales / OMS domain defines explicit workflows and state machines to ensure that every commercial opportunity and order moves through a controlled, auditable lifecycle.
1. Commercial Lifecycle
flowchart LR
A[Draft Quotation] --> B[Customer Acceptance]
B --> C[Confirmed Order]
C --> D[Stock Allocation]
D --> E[Release to Fulfillment]
E --> F[Pick / Pack / Ship]
F --> G[Delivery Confirmation]
G --> H[Invoicing]
| Stage | Business Responsibility |
|---|
| Draft Quotation | A sales representative or channel system prepares a priced proposal for the customer. |
| Customer Acceptance | The customer approves the quotation, converting it into a binding commitment. |
| Confirmed Order | The order is validated, priced, and locked. Soft reservations are created. |
| Stock Allocation | ATP is verified and hard allocations are assigned to fulfillment nodes. |
| Release to Fulfillment | Fulfillment batches are transmitted to WMS as pick/pack instructions. |
| Pick / Pack / Ship | WMS executes physical fulfillment and hands off to the carrier. |
| Delivery Confirmation | The customer or carrier confirms receipt of goods. |
| Invoicing | Accounting is triggered to issue an invoice and record receivables. |
2. Omnichannel Execution & Exception Flow
flowchart TB
A[Order Ingestion] --> B{Can Single Node Fulfill?}
B -->|Yes| C[Single Shipment]
B -->|No| D[Split Shipment]
C --> E[Hard Allocation]
D --> E
E --> F[Release to WMS]
F --> G[Pick / Pack]
G --> H[Order Ready for Shipping]
H --> I[Carrier Handover / TMS]
I --> J{Delivery OK?}
J -->|Yes| K[Complete Order]
J -->|No| L[RMA / Return]
K --> M[Invoice & AR]
L --> N[Credit Note / Replacement]
| Stage | Business Responsibility |
|---|
| Order Ingestion | The channel order is normalized, validated, and canonicalized. |
| Multi-Node Sourcing | The routing engine selects the optimal fulfillment node or nodes. |
| Split Shipment | When no single node can fulfill the order, batches are split across nodes. |
| Dispatch Handover | TMS receives the ready shipment and generates carrier waybills. |
| Completion | The order is closed after successful delivery and invoicing. |
| Return (RMA) | A delivery failure or customer return triggers authorization and compensation. |
3. State Transition Tables
Quotation
| Current State | Trigger / Event | Next State | Business Validation Rule |
|---|
| Draft | Send to customer | Sent | Quotation contains at least one valid line. |
| Sent | Customer accepts | Accepted | Acceptance is received within quotation validity period. |
| Sent | Customer declines | Rejected | Rejection reason may be recorded. |
| Accepted | Convert to order | Converted | Customer and items are still valid. |
| Accepted | Expire | Expired | Validity period has elapsed without acceptance. |
Sales Order
| Current State | Trigger / Event | Next State | Business Validation Rule |
|---|
| Draft | Submit for confirmation | Pending Confirmation | Financial balance rule is satisfied. |
| Pending Confirmation | Confirm | Confirmed | Stock is available or backorder is accepted; customer is valid. |
| Confirmed | Allocate stock | Allocated | ATP exists for all lines at selected nodes. |
| Allocated | Release to WMS | Released | Hard allocations are firm and batch is routable. |
| Released | Partial ship | Partially Shipped | Some batches have carrier confirmation; others remain open. |
| Partially Shipped | Final delivery | Completed | All batches delivered and invoiced. |
| Confirmed | Cancel before release | Cancelled | No hard allocation or shipment exists. |
| Released | Request cancellation | Cancellation Pending | Formal return/recall workflow is initiated. |
Return Merchandise Authorization (RMA)
| Current State | Trigger / Event | Next State | Business Validation Rule |
|---|
| Draft | Submit request | Pending Authorization | Original order reference and returned items are specified. |
| Pending Authorization | Authorize | Authorized | Return reason is valid and within return policy window. |
| Pending Authorization | Reject | Rejected | Rejection reason is mandatory. |
| Authorized | Goods received | Received | WMS confirms receipt and inspection of returned items. |
| Received | Approve credit | Approved for Credit | Inspection confirms resalable or scrap disposition. |
| Approved for Credit | Issue credit note | Closed | Credit note or replacement order is processed. |