Model output
The modelOutput object of the output dataset includes the vehicles and unassignedVisits objects.
unassignedVisits includes the IDs of any visits that could not be assigned during solving:
{
"modelOutput": {
"unassignedVisits": [
"Visit A",
"Visit B",
"Visit C"
]
}
}
vehicles includes the vehicles (technicians) that were included in the input dataset and their shifts.
shifts includes the shift startTime, the itinerary which includes the visits they have been assigned for that shift, and the metrics for the individual shift which breakdown how the technician will spend their time during the shift.
metrics are also included for the entire vehicle.
In the following dataset, Beth has not been assigned any visits, and Carl has been assigned two visits.
{
"modelOutput": {
"vehicles": [
{
"id": "Beth",
"shifts": [
{
"id": "Beth-2027-02-01",
"startTime": "2027-02-01T09:00:00Z",
"itinerary": [],
"metrics": {
}
}
],
"metrics": {
"activatedShifts": 0,
"assignedVisits": 0,
"totalShiftDuration": "PT0S",
"totalServiceDuration": "PT0S",
"totalTravelTime": "PT0S",
"totalTravelDistanceMeters": 0,
"totalBreakTime": "PT0S",
"totalWaitingTime": "PT0S",
"totalOvertime": "PT0S",
"availableOvertime": "PT0S"
}
},
{
"id": "Carl",
"shifts": [
{
"id": "Carl-2027-02-01",
"startTime": "2027-02-01T09:00:00Z",
"itinerary": [
{
"id": "Visit B",
"arrivalTime": "2027-02-01T09:21:36Z",
"startServiceTime": "2027-02-01T09:21:36Z",
"departureTime": "2027-02-01T11:21:36Z",
"effectiveServiceDuration": "PT2H",
"travelTimeFromPreviousStandstill": "PT21M36S",
"travelDistanceMetersFromPreviousStandstill": 21412,
"minStartTravelTime": "2027-02-01T00:00:00Z",
"kind": "VISIT"
},
{
"id": "Visit A",
"arrivalTime": "2027-02-01T12:06:14Z",
"startServiceTime": "2027-02-01T12:06:14Z",
"departureTime": "2027-02-01T14:06:14Z",
"effectiveServiceDuration": "PT2H",
"travelTimeFromPreviousStandstill": "PT44M38S",
"travelDistanceMetersFromPreviousStandstill": 49808,
"minStartTravelTime": "2027-02-01T00:00:00Z",
"kind": "VISIT"
}
],
"metrics": {
"totalServiceDuration": "PT4H",
"totalBreakDuration": "PT0S",
"totalWaitingTime": "PT0S",
"totalTravelTime": "PT1H36M4S",
"travelTimeFromStartLocationToFirstVisit": "PT21M36S",
"travelTimeBetweenVisits": "PT44M38S",
"travelTimeFromLastVisitToEndLocation": "PT29M50S",
"totalTravelDistanceMeters": 105227,
"travelDistanceFromStartLocationToFirstVisitMeters": 21412,
"travelDistanceBetweenVisitsMeters": 49808,
"travelDistanceFromLastVisitToEndLocationMeters": 34007,
"endLocationArrivalTime": "2027-02-01T14:36:04Z",
"technicianCosts": 100,
"overtime": "PT0S",
"availableOvertime": "PT0S"
}
}
],
"metrics": {
"activatedShifts": 1,
"assignedVisits": 2,
"totalShiftDuration": "PT5H36M4S",
"totalServiceDuration": "PT4H",
"totalTravelTime": "PT1H36M4S",
"totalTravelDistanceMeters": 105227,
"totalBreakTime": "PT0S",
"totalWaitingTime": "PT0S",
"totalOvertime": "PT0S",
"availableOvertime": "PT0S"
}
}
]
}
}
Next
-
See the full API spec or try the online API.
-
Learn more about field service routing from our YouTube playlist.
-
Learn about Input metrics.