Sometimes an on-demand delivery cannot happen: no driver accepts it (no_driver), or the goods are never ready (goods_not_ready). Rather than leaving the shopper with nothing, your fallback policy can move the delivery to a window. Delivr sets the policy for you at onboarding.
| Policy | What happens after the order fails |
|---|---|
recipient_choice (default) |
You get order.awaiting_recipient with a choiceDeadline (30 minutes). The recipient picks a window on their tracking page, free for them. You are billed for the window delivery. |
rebook_window |
The nearest free window is booked automatically. |
cancel |
Nothing more happens. The order stays failed. |
Successor orders
Section titled “Successor orders”When a window is booked, Delivr creates a successor order:
- The failed order sends
order.successor_createdwith thesuccessorId. - The successor sends its own
order.placed, withpredecessorIdpointing back. - Your
externalRefnow points to the newest order, and the recipient’s tracking link follows along.
If no successor follows, you get order.fallback_cancelled with fallbackReason expired (the recipient did not choose in time) or no_window (no window was free).
Handling it
Section titled “Handling it”- Treat
order.failedwithno_driverorgoods_not_readyas “may continue”: wait fororder.successor_createdororder.fallback_cancelledbefore you refund or tell the shopper. - Look orders up by
externalRefto always get the current one. - Assisted checkout orders that are still held have no fallback.
In the sandbox, sandbox:no_driver in pickup.note fails an order at once, so you can watch your fallback run.