Orders & Checkout
Order Fulfillment Statuses & State Machine
A complete guide to the BusinessPlus fulfillment state machine: permitted transitions, status history audit logging, and operational rules.
Fulfillment Status Overview
BusinessPlus enforces a structured fulfillment state machine to prevent operational errors (such as marking an unconfirmed order directly as delivered). Fulfillment status tracks the physical preparation and dispatch of goods, separate from payment clearance.
Verified Fulfillment Statuses
The six operational fulfillment states in BusinessPlus:
- 1. Pending: Default initial state for all new orders. Indicates the order is awaiting verification, customer contact, or initial acceptance.
- 2. Confirmed: The order has been reviewed and accepted by staff, or payment has been verified. (Legacy "paid" status records are visually mapped to Confirmed in the modern UI).
- 3. Preparing: Items are currently being picked from shelves, packed into parcel packaging, or prepared in the kitchen/workshop.
- 4. Ready for Pickup / Delivery: Packaging is complete. The parcel is waiting on the dispatch counter for courier pickup or customer collection.
- 5. Delivered / Picked Up: The final completed fulfillment state indicating the customer has physically received the merchandise.
- 6. Cancelled: The order was cancelled prior to fulfillment. Can be triggered from Pending or Confirmed states.
Permitted State Transitions
To maintain data integrity, staff can only advance orders through permitted paths:
Status History & Audit Logging (`order_status_history`)
Every status transition requires dashboard staff authorization and inserts an immutable record into `order_status_history`. The system records the previous status, new status, timestamp, staff user ID, and an optional transition note.
Customer WhatsApp Notifications on Status Changes
When staff update an order status, BusinessPlus automatically dispatches a branded WhatsApp update to the customer's phone number informing them of the progress (e.g. "Hi Jane, your order #1042 is now PREPARING").