-> How to assign primary and secondary territories to vehicles
Our service supports the assignment of vehicles to territories. A vehicle only handles orders in the designated territories. A territory consists of at least one postal code and can have several vehicles which are assigned to it.
Before a vehicle-territory relation can be created the territory needs to be defined first. This can be done via our webinterface in the Territory Editor manually or via our API.
A vehicle can have one or more primary and also one or more secondary territories. The primary territory is the main area where the vehicle operates. Therefore a vehicle will only handle shipments in the secondary territory when all orders which can be fulfilled in the primary territory have been delivered or picked up and the vehicle has capacity and driving time left.
There are several ways to assign territories to vehicles…
…if the fleet is handled in the Smartlane system:
- Use the vehicle editor in the webinterface
- Use the API and assign the territory when creating the vehicle or PATCH an existing vehicle
{
"obeys_territory_mapping": true,
"territory_custom_ids": [
"Gebiet1"
],
"secondary_territory_custom_ids": [
"Gebiet Zentrum"
]
}
…if the fleet is provided in the optimization request:
Define the assigned territories for a vehicle in the vehicles
section of the request. Please note that the parameter obeys_territory_mapping
needs to be set to true
additionally otherwise the vehicle is allowed to go everywhere. The definition is analougus to the code snippet above. For more details and examples please check the API reference.
Updated about 1 month ago