Workflow Map
State machine definitions for all major business workflows
Order Workflow
— Customer purchase lifecycle from cart to closedCreated
Pending Payment
Paid
Allocating Stock
Fulfilling
Shipped
Delivered
Closed
Created
Customer submits order
Pending Payment
Awaiting payment confirmation
Paid
Payment confirmed and recorded
Allocating Stock
Warehouse reserves inventory
Fulfilling
Order being packed and prepared
Shipped
Dispatched to customer or dealer
Delivered
Customer confirmed receipt
Closed
Order complete and archived
State Transitions
| From | To | Trigger | Condition |
|---|---|---|---|
| created | pending_payment | Auto on submit | always |
| pending_payment | paid | Payment webhook | payment confirmed |
| pending_payment | created | Payment failed | retry |
| paid | allocating | Auto on payment | stock available |
| allocating | fulfilling | Warehouse confirm | reservation success |
| fulfilling | shipped | Dispatch scan | dispatch created |
| shipped | delivered | Delivery confirm | POD received |
| delivered | closed | Auto after 7d | no dispute |