Skip to main content

routePlanningRepHistory

Requires permission visits:journey-plan:manage.

Returns one rep's route history over a window of at most 92 days, a row per day, and where their plan stands now: upcoming stops, missed stops, customers the planner deferred and customers due with nothing planned. The rep must be in the caller's team. Requires permission to manage journey plans.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query RoutePlanningRepHistory($from: DateTime!, $repId: ID!, $to: DateTime!) {
routePlanningRepHistory(from: $from, repId: $repId, to: $to) {
currencyCode
salesRepName
from
salesRepId
timeZone
to
balance {
dueNotPlanned
nextStopDate
upcomingStops
}
}
}

Variables:

{
"from": "2025-01-15T00:00:00Z",
"repId": "id",
"to": "2025-01-15T00:00:00Z"
}

Response:

{
"data": {
"routePlanningRepHistory": {
"currencyCode": "string",
"salesRepName": "string",
"from": "2025-01-15T00:00:00Z",
"salesRepId": "id",
"timeZone": "string",
"to": "2025-01-15T00:00:00Z",
"balance": {
"dueNotPlanned": 0,
"nextStopDate": "2025-01-15T00:00:00Z",
"upcomingStops": 0
}
}
}
}
routePlanningRepHistory(
from: DateTime!
repId: ID!
to: DateTime!
): RoutePlanningRepHistory!

Arguments​

routePlanningRepHistory.from ● DateTime! non-null scalar​

The first day of the window.

routePlanningRepHistory.repId ● ID! non-null scalar​

The ID of the sales rep.

routePlanningRepHistory.to ● DateTime! non-null scalar​

The last day of the window.

Type​

RoutePlanningRepHistory object​

A rep's route history over a window, and the balance of their plan.