Skip to content

State Model

The canonical state machine that spans the whole Originator-to-Designee lifecycle. Engineering and operations should align around this model — every per-role journey moves through these states.

State progression

StateTriggerOwnerAllowed next stateBlock condition
DraftOriginator starts transactionOriginator / FacilitatorAwaiting Origin EvidenceMissing designee phone number
Awaiting Origin EvidenceCargo preparedOriginator / OperatorOrigin ValidatedPhone number not visible
Origin ValidatedOrigin scan PASSSystemAwaiting PickupOCR / phone mismatch
Awaiting PickupOperator assignedFirst-Mile OperatorFirst-Mile Custody ActiveOperator / device not verified
First-Mile Custody ActivePickup scan PASSFirst-Mile OperatorAwaiting Hub / Mid-Mile HandoffCount mismatch
Awaiting HandoffOperator reaches hubFirst-Mile + ReceiverMid-Mile Custody ActiveMissing dual scan
Mid-Mile Custody ActiveMid-mile receiving scan PASSMid-Mile OperatorAwaiting Relay or Last-Mile AssignmentGeo / time anomaly
Relay / Disaggregation PendingSystem recommends splitRelay Actor / SupervisorRelay Complete or HOLDUnauthorised relabel
Awaiting Last-Mile AssignmentCargo at destination hubHub / SystemLast-Mile Custody ActiveNo eligible operator
Last-Mile Custody ActiveLast-mile receiving scan PASSLast-Mile OperatorDelivery PendingCargo mismatch
Delivery PendingOperator reaches designeeLast-Mile Operator / DesigneeDelivery Validation PendingDesignee unavailable
Delivery Validation PendingFinal evidence uploadedSystemDelivered / HOLD / FAILOffline unsynced evidence
DeliveredIntegrity PASSSystemSettlement EligibleDispute raised
Settlement EligibleValidated delivery eventSettlement RailPayout ReleasedFinance / legal hold
HOLDAnomaly detectedReviewerResolved / FAIL / RecaptureEvidence insufficient
FAILIntegrity failureReviewer / SystemDispute / Liability AssignmentNone
ClosedDelivery and settlement completeSystemArchive / reportPost-delivery dispute window

How to use this model

  • Engineering: implement as the authoritative state machine in the order/container service.
  • Operations: every dashboard, alert and exception tool should reference these states by name.
  • Per-role journeys: each role's actions should map onto state transitions in this table.

Source

Kaya Sync — User Journeys: Originator to Designee, §5.

Kaya Sync Internal Documentation