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]
StageBusiness Responsibility
Draft QuotationA sales representative or channel system prepares a priced proposal for the customer.
Customer AcceptanceThe customer approves the quotation, converting it into a binding commitment.
Confirmed OrderThe order is validated, priced, and locked. Soft reservations are created.
Stock AllocationATP is verified and hard allocations are assigned to fulfillment nodes.
Release to FulfillmentFulfillment batches are transmitted to WMS as pick/pack instructions.
Pick / Pack / ShipWMS executes physical fulfillment and hands off to the carrier.
Delivery ConfirmationThe customer or carrier confirms receipt of goods.
InvoicingAccounting 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]
StageBusiness Responsibility
Order IngestionThe channel order is normalized, validated, and canonicalized.
Multi-Node SourcingThe routing engine selects the optimal fulfillment node or nodes.
Split ShipmentWhen no single node can fulfill the order, batches are split across nodes.
Dispatch HandoverTMS receives the ready shipment and generates carrier waybills.
CompletionThe 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 StateTrigger / EventNext StateBusiness Validation Rule
DraftSend to customerSentQuotation contains at least one valid line.
SentCustomer acceptsAcceptedAcceptance is received within quotation validity period.
SentCustomer declinesRejectedRejection reason may be recorded.
AcceptedConvert to orderConvertedCustomer and items are still valid.
AcceptedExpireExpiredValidity period has elapsed without acceptance.

Sales Order

Current StateTrigger / EventNext StateBusiness Validation Rule
DraftSubmit for confirmationPending ConfirmationFinancial balance rule is satisfied.
Pending ConfirmationConfirmConfirmedStock is available or backorder is accepted; customer is valid.
ConfirmedAllocate stockAllocatedATP exists for all lines at selected nodes.
AllocatedRelease to WMSReleasedHard allocations are firm and batch is routable.
ReleasedPartial shipPartially ShippedSome batches have carrier confirmation; others remain open.
Partially ShippedFinal deliveryCompletedAll batches delivered and invoiced.
ConfirmedCancel before releaseCancelledNo hard allocation or shipment exists.
ReleasedRequest cancellationCancellation PendingFormal return/recall workflow is initiated.

Return Merchandise Authorization (RMA)

Current StateTrigger / EventNext StateBusiness Validation Rule
DraftSubmit requestPending AuthorizationOriginal order reference and returned items are specified.
Pending AuthorizationAuthorizeAuthorizedReturn reason is valid and within return policy window.
Pending AuthorizationRejectRejectedRejection reason is mandatory.
AuthorizedGoods receivedReceivedWMS confirms receipt and inspection of returned items.
ReceivedApprove creditApproved for CreditInspection confirms resalable or scrap disposition.
Approved for CreditIssue credit noteClosedCredit note or replacement order is processed.

Our Premium Sponsors

Obelaw is proudly open-source. Continued development, bug fixes, and community support are made possible by the generosity of our sponsors.

Sponsor Obelaw