routePlanningRepRules
Requires permission visits:visit:execute.
Returns the route planning rules a rep's app needs: whether removing a stop needs a reason, how new customers are planned, the working day and how far ahead a route refresh plans. 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 RoutePlanningRepRules {
routePlanningRepRules {
minutesPerVisit
newCustomerFromRep
planAheadWorkingDays
requireRemovalReason
timeZone
workdayEnd
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query RoutePlanningRepRules {\n routePlanningRepRules {\n minutesPerVisit\n newCustomerFromRep\n planAheadWorkingDays\n requireRemovalReason\n timeZone\n workdayEnd\n }\n}"
}
EOF
Response:
{
"data": {
"routePlanningRepRules": {
"minutesPerVisit": 0,
"newCustomerFromRep": "NEXT_RUN",
"planAheadWorkingDays": 0,
"requireRemovalReason": true,
"timeZone": "string",
"workdayEnd": "string"
}
}
}
routePlanningRepRules: RoutePlanningRepRules!
Type
RoutePlanningRepRules object
The route planning rules a rep's app needs.