myRoutePlanningHistory
Requires permission visits:visit:execute.
Returns the signed-in rep's own route history over a window of at most 92 days and where their plan stands now, in the same shape as routePlanningRepHistory. Requires permission to run visits.
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:
- GraphQL
- cURL
query MyRoutePlanningHistory($from: DateTime!, $to: DateTime!) {
myRoutePlanningHistory(from: $from, to: $to) {
currencyCode
salesRepName
from
salesRepId
timeZone
to
balance {
dueNotPlanned
nextStopDate
upcomingStops
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query MyRoutePlanningHistory($from: DateTime!, $to: DateTime!) {\n myRoutePlanningHistory(from: $from, to: $to) {\n currencyCode\n salesRepName\n from\n salesRepId\n timeZone\n to\n balance {\n dueNotPlanned\n nextStopDate\n upcomingStops\n }\n }\n}",
"variables": {
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T00:00:00Z"
}
}
EOF
Variables:
{
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T00:00:00Z"
}
Response:
{
"data": {
"myRoutePlanningHistory": {
"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
}
}
}
}
myRoutePlanningHistory(
from: DateTime!
to: DateTime!
): RoutePlanningRepHistory!
Arguments
myRoutePlanningHistory.from ● DateTime! non-null scalar
The first day of the window.
myRoutePlanningHistory.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.