The Run object represents a route in Bringg. It can be included in some API calls, including Create Order and Update Order, and is included in webhooks such as Planning Done and Optimization Applied.
About the Run Object
The Run object is included in webhooks related to routes created in Bringg. If you are building routes outside of Bringg, you can also include them in the Create Order (Task) and Update Order requests.
In Bringg, "runs" are often referred to as "Routes." A route is a sequence of destinations from one or more orders. Bringg can automatically create routes by calculating the fastest and most efficient route which fulfills the orders. Bringg can also help you assign the most appropriate vehicle and the driver with the correct skills to complete the order.
There are two types of routes:
- A planned route is a route containing planned orders that you create in advance, either manually or using route optimization. For example, you can run route optimization every day at 10pm so that drivers can start their routes when they start their shifts the next morning.
- An on demand route is a route which contains on demand orders that you create on the fly by using Autodispatch (AD), which continuously and automatically assigns orders to a team's drivers, vehicles, and routes. Common examples are deliveries for restaurants, grocery and pharmacy stores, or roadside assistance.
After you dispatch the orders in a route, drivers receive their route in their Driver App as a series of destinations, each with their associated order which they pick up or hand off to the consumer.
Handling conflicting Run IDs in API calls
When an API call includes contradicting IDs on the
task
(order) level andrun
(route) object, Bringg creates a new run with the ID that was included in the run object.For example, if in the task level the
run_external_id
orrun_id
isA
, but in the run object theexternal_id
orid
isB
, the task is added in runB
.
Run Details
Parameter | Description |
---|---|
end_lat double | The latitude of the route when it was ended. |
end_lng double | The longitude of the route when it was ended. |
end_method int32 | Indicates the method used to end this route. Possible values: 0 - manually using the Driver App1 - automatic check-in or check-out via geofence2 - driver's action when prompted by the Driver App4 - auto-corrected by client5 - auto-corrected by server6 - automated by activity trigger7 - updated in the Bringg platform8 - updated in the store app9 - from run end10 - updated by Bringg automation |
ended_at datetime | The date and time when this route was ended, formatted as "%Y-%m-%dT%H:%M:%S%z" and according to the UTC time zone. |
external_id Int32 | Your external system's ID for this run. Appears as planned_route_external_id when included outside of the run object. |
id Int32 | The ID Bringg assigns to a run when it is created. Use only in the update_task API request. When using update_task , either id or external_id can be indicated in the run object. |
planned_route_id Int32 | Bringg's ID for the planned route. Planned routes are created in advanced (not created using AutoDispatch). |
run_configuration_id Int32 | Refers to the GPS configuration (x seconds between location updates) per user status. Values include: Free =>10, "Started" =>10, "Assigned" =>10, "Checked-In" =>10, "Late" =>10} |
scheduled_end_time datetime | The date and time when this route is scheduled to end, formatted as "%Y-%m-%dT%H:%M:%S%z" and according to the UTC time zone. |
scheduled_start_time datetime | The date and time when this route is scheduled to begin, formatted as "%Y-%m-%dT%H:%M:%S%z" and according to the UTC time zone. |
start_lat double | The latitude of the route when it was started. |
start_lng double | The longitude of the route when it was started. |
start_method int32 | Indicates the method used to start this route. Possible values: 0 - manually using the Driver App1 - automatic check-in or check-out via geofence2 - driver's action when prompted by the Driver App4 - auto-corrected by client5 - auto-corrected by server6 - automated by activity trigger7 - updated in the Bringg platform8 - updated in the store app9 - from run end10 - updated by Bringg automation |
started_at datetime | The date and time when this route was started, formatted as "%Y-%m-%dT%H:%M:%S%z" and according to the UTC time zone. |
tasks array | An array of order (task) objects. Read more about the Order (Task) Object |
team_id Int32 | Bringg's ID for the team assigned to this route. Can be indicated in the task object or run object. If indicated in task object, team_id must be omitted or match in run object. |
user object | An object including the details of the driver assigned to this route. |
user_external_id Int32 | Your external system's ID for the driver assigned to this route. |
user_id Int32 | Bringg's ID for the driver assigned to this route. Can be indicated in the task object or run object. If indicated in task object, user_id must be omitted or matched in the run object. |
vehicle_id Int32 | Bringg's ID for the vehicle assigned to a route. |