Dispatch Routing Result API facilitates the practical implementation of recommended routes generated by a route optimization algorithm. This process involves translating the algorithm’s output into real-world actions. When the route optimization algorithm is executed, it computes the most efficient and cost-effective routes for a fleet of vehicles to navigate through multiple designated locations, such as delivery points and service stops. In our case, dispatching means assigning visits to particular vehicles and users. Once the dispatching process is completed, several key attributes are added to each task to provide comprehensive route information. These attributes include assignedVehicle, assignedVehicleId, assignee, distance, eta, etd, routePlannedOrder, waitingTime, and other related fields you can find the details below:
| Field | Type | Description |
|---|---|---|
| assignedVehicle | object | The details of the assigned vehicle for the route. It containing the following details:
Assignee email: The email address of the assigned user.
Assignee name: The name of the assigned vehicle.
Speed: The speed at which the vehicle operates.
Working time: The duration of time the vehicle is operational.
Vehicle ID: The unique identifier of the assigned vehicle. |
| assignedVehicleId | string | The Unique ID is used to mark a vehicle during route optimization to ensure that the visit associated with this vehicle ID remains assigned to the same vehicle in the subsequent optimization route and does not get randomly assigned to another vehicle. |
| assignee | array of string | Lists the users who have been assigned to the route. |
| distance | integer | Indicates the distance between locations along the route, measured in meters. |
| eta | string | Stands for Estimated Time of Arrival. Provides an estimated arrival time at a specific hub or location. |
| etd | string | Stands for Estimated Time of Departure. Provides an estimated departure time from a given hub or location. |
| routePlannedOrder | integer | The routePlannedOrder serves as the key to identify that a visit has been successfully optimized within a specific route. It also helps to determine the order of that visit within the optimized route. |
| waitingTime | integer | Represents the waiting time at a particular hub or location before proceeding to the subsequent destination or action. Expressed in units such as minutes. |
| routingResultId | string | Contains information about which result is being dispatched. |
There are several cases where dispatch not only carries out assignments to users, but also carries out additional business processes to adjust the configuration algorithm during the routing process, including:
Dispatch with Cross Docking. When optimizing routes using cross docking, the dispatch process changes quite a bit. It creates a new task to move items from the main hub to the sub-hubs named Handover. Remember, the task’s location is now moved to the sub-hubs since they’ll handle the final delivery.
At the main hub, it will only have the handover tasks and the tasks that are directly delivered from the main hub to the final destination. These tasks include relevant information such as Handover From (taken from the assignee vehicle), Handover To (user input), and List Order (task title).
The dispatch process will also generate a new task flow named Handover if you haven’t used cross docking before.
Dispatch with Auto Split. When using the auto split feature in routing optimization, a single visit may be divided into multiple visits, resulting in the creation of new tasks upon dispatching. For example, if a visit with a capacity of 100kg is split into two visits, each with a capacity of 50kg, the system will generate a new task while retaining the original task. Consequently, there will be two tasks in total.
Original Task Update: The capacity of the original task will be adjusted from 100kg to 50kg to reflect the split.
New Task Creation: A new task will be generated with a capacity of 50kg, corresponding to the split visit.
In dispatch with autosplit, there will be a several key attributes are added to each task :
| Field | Type | Description |
|---|---|---|
| autoSplit | string | This field contains the type of auto-split used in routing optimization. |
| splitNumber | string | This field contains the value indicating the segment of a split visit. For instance, if the task has the value 2/3, it signifies that this task is the second segment out of a total of 3 segments. (This key is associated with the auto-split configuration). |
Use a valid Bearer token to authenticate.
Unique identifier for the routing result that generated by system. Example: 6352736c628401059b37a2e2