Lifecycle and outcomes
A task has a lifecycle and an outcome. The API reports
one word: once there is an outcome, that is the status you get back.
The raw lifecycle value stays available as lifecycle for
debugging, so you never have to reconcile two words that disagree.
Lifecycle
| Status | Can move to |
|---|---|
received | cancelled, failed, planned |
planned | cancelled, failed, routing |
routing | awaiting_developer, cancelled, executing, failed |
executing | awaiting_business, awaiting_developer, cancelled, completed, failed |
awaiting_business | awaiting_developer, cancelled, completed, executing, failed |
awaiting_developer | awaiting_business, cancelled, completed, executing, failed |
completed | terminal |
cancelled | terminal |
failed | terminal |
Outcomes
| Outcome | Carries evidence | |
|---|---|---|
alternative_offered | yes | Not what you asked for, but they offered something else. |
cancelled | no | You cancelled it, or we did on your behalf. |
confirmed | yes | The business confirmed. Evidence carries their own words. |
declined | yes | The business said no. |
delivered | yes | A structured order was fulfilled. The merchant sent the delivered event. |
failed | no | We could not complete it. The reason is in the event log. |
no_response | no | Nobody answered before the task went stale. Nothing to quote. |
rejected | yes | The merchant rejected the order or booking outright. |
waitlisted | yes | They put you on a waiting list. |
Merchant progress
While a structured order is in flight, merchant_status mirrors the
merchant's own step (accepted, preparing,
out_for_delivery, delivered) with
merchant_status_at. That is what lets an agent say "your order is
out for delivery" instead of "awaiting business".