WebhooksOrdersPlanning
Order Planning Completed
Webhook payload sent when order planning completes.
Order Planning Completed Webhook Payload
[
{
"created_at":"2021-01-01T14:01:00.000000Z",
"recorded_at":"2021-01-01T14:00:00.000000Z",
"account_id":"6784e919-7168-4f61-b686-2020f547637f",
"type":"order",
"data":{
"value":"planning_completed",
"planning_sequence_number": 1,
"plan_id": "f9212af2-71e8-40f0-84bd-005424a80a4d",
"num_orders": 10,
"num_routes": 2,
"num_unplanned_orders": 2,
"completed_at": "2021-01-01T14:01:00.000000Z",
"route_handles_created": ["6784e919-71e8-40f0-84bd-005424a80a4d"],
"route_handles_modified": ["f9212af2-7168-4f61-b686-2020f547637f"],
"started_at": "2021-01-01T14:00:00.000000Z",
"fulfillment_date": "2021-01-01",
"ops_group_handle": "OPS_123",
"unplanned_order_reasons": [
{
"reason": "No Worker was available for this plan.",
"num_orders": 2
}
]
},
"version":"3.0.0"
}
]| Name | Type | Mandatory | Description | |
|---|---|---|---|---|
| data.value | string | Yes | planning_completed | |
| data.planning_sequence_number | integer | Yes | Sequence Number of the plan for this specific plan ID | |
| data.plan_id | string | Yes | Unique identifier of the plan which is getting planned | |
| data.num_orders | integer | Yes | Number of orders submitted for planning | |
| data.num_routes | integer | Yes | Number of Routes planned | |
| data.num_unplanned_orders | integer | Yes | Number of Orders which could not be planned | |
| data.started_at | string | Yes | Timestamp at which plan was started | |
| data.fulfillment_date | string or null | Yes | Date for which orders are being planned for. null when the plan has no fulfillment date | |
| data.completed_at | string | Yes | Timestamp at which plan was completed | |
| data.route_handles_created | array | No | Route handles which got created in this planning instance. Present only when at least one route was created | |
| data.route_handles_modified | array | No | Route handles which got modified in this planning instance. Present only when at least one route was modified | |
| data.ops_group_handle | string | Yes | Ops group handle for which the planning is triggered | |
| data.unplanned_order_reasons | array | No | Number of unplanned orders for each reason. Each item has reason (string) and num_orders (integer). Items are sorted by num_orders, highest first. Present only when at least one order could not be planned |
Unplanned order reasons
data.unplanned_order_reasons[].reason is usually one of these values, but other text can appear when planning fails:
No Worker was available for this plan.No Worker schedule overlaps with this order's time window.This order is outside the available Worker working hours.Worker location is unavailable, so travel time could not be evaluated.Worker start location is unavailable for the configured route start setting.No Worker supports the required product type for this order.Route was being modified concurrently and this order needs to be re-planned.The optimizer dropped this order to satisfy planning constraints for the overall plan.The optimizer could not find a feasible plan for the provided constraints.Travel time calculation failed for this planning attempt.Ops group configuration is incomplete for automated planning.Assigning this order would exceed route or Worker capacity.No Worker can reach this order before scheduled_at.Assigning this order would delay an already planned downstream order.Assigning this order would exceed the Worker's shift end time.Existing assigned route conflicts with the Worker schedule, so this order could not be inserted into the plan.Existing assigned route exceeds the Worker's shift, so this order could not be inserted into the plan.Existing assigned route has conflicting appointment windows, so this order could not be inserted into the plan.Existing assigned route exceeds route or Worker capacity, so this order could not be inserted into the plan.Existing assigned route exceeds the configured maximum route distance, so this order could not be inserted into the plan.Existing assigned routes were preserved, so this order could not be inserted into the plan.Assigning this order would exceed the configured maximum route distance.The optimizer reached its planning limit before it could assign this order.Automated planning could not assign this order with the provided constraints.