Skip to main content

journeyPlans

Requires permission visits:journey-plan:manage.

Lists sales reps' journey plans over a date range, optionally for one rep or filtered. Send skip and take to page, and use journeyPlansCount for the total. 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 JourneyPlans($dateFrom: DateTime!, $dateTo: DateTime!) {
journeyPlans(dateFrom: $dateFrom, dateTo: $dateTo) {
id
salesRepName
createdAt
notes
planDate
salesRepId
visits {
id
partnerName
status
createdAt
completedAt
hasUnreadMessage
}
}
}

Variables:

{
"dateFrom": "2025-01-15T00:00:00Z",
"dateTo": "2025-01-15T00:00:00Z"
}

Response:

{
"data": {
"journeyPlans": [
{
"id": "id",
"salesRepName": "string",
"createdAt": "2025-01-15T00:00:00Z",
"notes": "string",
"planDate": "2025-01-15T00:00:00Z",
"salesRepId": "string",
"visits": [
{
"id": "id",
"partnerName": "string",
"status": "CANCELLED",
"createdAt": "2025-01-15T00:00:00Z",
"completedAt": "2025-01-15T00:00:00Z",
"hasUnreadMessage": true
}
]
}
]
}
}
journeyPlans(
dateFrom: DateTime!
dateTo: DateTime!
filter: JourneyPlanListFilterInput
salesRepId: ID
skip: Int
take: Int
): [JourneyPlan!]!

Arguments​

journeyPlans.dateFrom ● DateTime! non-null scalar​

The first day of the range.

journeyPlans.dateTo ● DateTime! non-null scalar​

The last day of the range.

journeyPlans.filter ● JourneyPlanListFilterInput input​

Optional filters: search text, status and sort order.

journeyPlans.salesRepId ● ID scalar​

The ID of the sales rep to list plans for. Omit it for every rep.

journeyPlans.skip ● Int scalar​

How many plans to skip. Omit skip and take to return the whole range.

journeyPlans.take ● Int scalar​

How many plans to return.

Type​

JourneyPlan object​

A rep's plan for one day: the stops they will visit.