Skip to main content

routePlanningRepVisits

Requires permission visits:journey-plan:manage.

Returns every visit of one rep over a window of at most 92 days, one row each: the customer, the day, the shown status, whether it was unplanned or removed, the outcome and where the rep checked in. 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 RoutePlanningRepVisits($from: DateTime!, $repId: ID!, $to: DateTime!) {
routePlanningRepVisits(from: $from, repId: $repId, to: $to) {
salesRepName
from
salesRepId
timeZone
to
visits {
partnerName
checkInAt
checkInLatitude
checkInLongitude
checkOutAt
date
}
}
}

Variables:

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

Response:

{
"data": {
"routePlanningRepVisits": {
"salesRepName": "string",
"from": "2025-01-15T00:00:00Z",
"salesRepId": "id",
"timeZone": "string",
"to": "2025-01-15T00:00:00Z",
"visits": [
{
"partnerName": "string",
"checkInAt": "2025-01-15T00:00:00Z",
"checkInLatitude": 0,
"checkInLongitude": 0,
"checkOutAt": "2025-01-15T00:00:00Z",
"date": "2025-01-15T00:00:00Z"
}
]
}
}
}
routePlanningRepVisits(
from: DateTime!
repId: ID!
to: DateTime!
): RoutePlanningRepVisits!

Arguments​

routePlanningRepVisits.from ● DateTime! non-null scalar​

The first day of the window.

routePlanningRepVisits.repId ● ID! non-null scalar​

The ID of the sales rep.

routePlanningRepVisits.to ● DateTime! non-null scalar​

The last day of the window.

Type​

RoutePlanningRepVisits object​

Every visit of one rep over a window.