Skip to content

Operations Flow Overview

This page describes the complete order lifecycle in the Shiphustle courier operations system, from order placement through final delivery.

Order Lifecycle

Orders progress through the following statuses:

Status Description
order_placed Customer places an order
procurement_completed Admin procures items from retailer
at_courier_depot Source depot officer receives goods
in_transit Transporter accepts shipment and is en route
at_country_depot Shipment arrives at destination depot
at_pickup_point Orders dispatched to pickup point (pickup delivery)
on_route Driver en route to customer (door delivery)
delivered Customer confirms receipt via QR/PIN
completed Admin verifies documentation
cancelled Order cancelled

Order Status State Machine

stateDiagram-v2
    direction TB

    [*] --> order_placed : Customer places order

    order_placed --> procurement_completed : Admin procures items
    procurement_completed --> at_courier_depot : Source Depot Officer receives goods

    at_courier_depot --> in_transit : Transporter accepts shipment

    in_transit --> at_country_depot : Destination Depot Officer accepts incoming orders

    state delivery_fork <<fork>>
    at_country_depot --> delivery_fork

    delivery_fork --> at_pickup_point : Dispatcher delivers batch to pickup point
    delivery_fork --> on_route : Driver accepts door delivery

    at_pickup_point --> delivered : Customer collects (QR/PIN confirmation)
    on_route --> delivered : Driver delivers (QR/PIN confirmation)

    delivered --> completed : Admin verifies documentation

    state terminal <<join>>
    completed --> terminal
    cancelled --> terminal
    terminal --> [*]

Shipment Handover Flow

The shipment handover flow covers the transfer of goods from the source depot to the destination depot via a transporter.

Transporter Assignment (handover_status)

stateDiagram-v2
    direction LR

    [*] --> none
    none --> awaiting : Source Depot assigns transporter
    awaiting --> accepted : Transporter accepts
    awaiting --> declined : Transporter declines
    declined --> none : Cancel assignment
    declined --> awaiting : Reassign transporter
    awaiting --> none : Source depot cancels

Depot Arrival (Automatic)

Once the transporter accepts the shipment and orders are in transit, they automatically appear at the destination depot's Incoming screen. The depot officer accepts individual orders directly — there is no explicit handover initiation step from the transporter.

stateDiagram-v2
    direction LR

    [*] --> in_transit : Transporter accepts shipment
    in_transit --> at_country_depot : Depot Officer accepts orders
    note right of in_transit : Orders auto-appear at depot

Batch Dispatch Flow

The batch dispatch flow covers the transfer of orders from the destination depot to a pickup point via a dispatcher.

Dispatcher Assignment (handover_status)

stateDiagram-v2
    direction LR

    [*] --> none
    none --> awaiting : Destination Depot assigns dispatcher
    awaiting --> accepted : Dispatcher accepts
    awaiting --> declined : Dispatcher declines
    declined --> none : Reset
    declined --> awaiting : Reassign dispatcher
    awaiting --> none : Depot cancels

Pickup Point Handover (pickup_handover_status)

stateDiagram-v2
    direction LR

    [*] --> none
    none --> awaiting : Dispatcher confirms arrival
    awaiting --> accepted : Pickup Point Officer accepts
    awaiting --> declined : Pickup Point Officer declines
    declined --> none : Reset

Door Delivery Flow

The door delivery flow covers individual order delivery directly to the customer's address.

stateDiagram-v2
    direction LR

    [*] --> none
    none --> awaiting : Destination Depot assigns driver
    awaiting --> accepted : Driver accepts (order → on_route)
    awaiting --> declined : Driver declines
    declined --> none : Reset
    declined --> awaiting : Reassign driver

Handover Status Summary

Entity Status Field Possible Values Roles Involved
Shipment handover_status none → awaiting → accepted/declined Source Depot Officer assigns, Transporter accepts/declines
Shipment depot_handover_status Automatic (set to accepted on completion) Orders auto-appear at depot; Depot Officer accepts orders directly
Dispatch Batch handover_status none → awaiting → accepted/declined Destination Depot Officer assigns, Dispatcher accepts/declines
Dispatch Batch pickup_handover_status none → awaiting → accepted/declined Dispatcher confirms arrival, Pickup Point Officer accepts/declines
Order driver_handover_status none → awaiting → accepted/declined Destination Depot Officer assigns, Driver accepts/declines

Role Guides

Navigate to the detailed guide for your role: