Permission required: view-livechat-manager
See the Livechat Triggers guide for more information.
The authToken
of the authenticated user.
The userId
of the authenticated user.
{
"name": "api-trigger",
"description": "testing create trigger endpoint",
"enabled": false,
"runOnce": true,
"conditions": [
{
"name": "chat-opened-by-visitor",
"value": 0
}
],
"actions": [
{
"name": "send-message",
"params": {
"sender": "queue",
"msg": "hello world"
}
}
]
}
If you want to update a trigger, enter the trigger ID.
Enter a name for the trigger.
Enter a description for the trigger.
Whether the trigger is enabled for use or not.
Whether the trigger will be run only once for each visitor.
Enter the conditions for the trigger to execute.
The condition that should take place for the trigger to execute. The possible values are:
time-on-site
: The amount of time a visitor is on the site.page-url
: The site URL that a visitor visits.chat-opened-by-visitor
: The chat is opened by the visitor.after-guest-registration
: The guest is registered to the chat.
Enter the value of the page-url
(string) or the time-on-site
, in seconds (number). Otherwise, you can enter null
.
The actions that take place once the trigger is executed.
The name of the trigger action that takes place. The possible values are:
send-message
: A message is sent to the visitor.use-external-service
: An external service is used for the trigger action.
Enter the parameter values for the trigger action.
The sender of the trigger action. The possible values are:
queue
: Impersonate the next available agent in the queue.custom
: Use a specific agent or bot.
Enter the name of the agent or bot that you want to use, if the sender
is custom
.
Enter a message for the visitor, if the action name
is send-message
.
Enter the external service URL you want to use, if the action name
is use-external-service
.
Enter the service timeout value, in seconds, if the action name
is use-external-service
.
Enter a message when the service is not accessible, if the action name
is use-external-service
.
OK
{
"success": true
}
Bad Request
{
"success": false,
"error": "must have required property 'description' [invalid-params]",
"errorType": "invalid-params"
}
{
"success": false,
"error": "must be equal to one of the allowed values [invalid-params]",
"errorType": "invalid-params"
}
Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}
Forbidden
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
{
"success": false,
"error": "unauthorized"
}