sendVisitMessage
Requires permission visits:journey-plan:manage.
Sends a message about one stop to the rep it is assigned to. It appears in the rep's notifications and on that visit's detail screen. An empty message is refused. 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:
- GraphQL
- cURL
mutation SendVisitMessage($message: String!, $visitId: ID!) {
sendVisitMessage(message: $message, visitId: $visitId)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SendVisitMessage($message: String!, $visitId: ID!) {\n sendVisitMessage(message: $message, visitId: $visitId)\n}",
"variables": {
"message": "string",
"visitId": "id"
}
}
EOF
Variables:
{
"message": "string",
"visitId": "id"
}
Response:
{
"data": {
"sendVisitMessage": true
}
}
sendVisitMessage(
message: String!
visitId: ID!
): Boolean!
Arguments
sendVisitMessage.message ● String! non-null scalar
The message text.
sendVisitMessage.visitId ● ID! non-null scalar
The ID of the visit.
Type
Boolean scalar
The Boolean scalar type represents true or false.