Bot_ChatbotSmartTrigger is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id |
guid | Id of the smart trigger. |
chatbotId |
guid | Id of the chatbot. |
name |
string | Name of smart trigger. |
isEnabled |
bool | Whether an action is enabled or not. |
conditionExpressionType |
string | Allowed values are "any", "all", "logicalExpression". |
logicalExpression |
string | It is an expression that users one or more conditions, example: (1 or 2) and 3. |
order |
integer | Must be greater than or equal to 0, ascending order. |
chatbotSmartTriggerConditions |
chatbotSmartTriggerConditions[] | Reference to Chatbot Smart Trigger Condition. |
chatbotSmartTriggerActions |
chatbotSmartTriggerActions[] | Reference to Chatbot Smart Trigger Action. |
Chatbot Smart Trigger Action JSON Format:
Name | Type | Description |
---|---|---|
id |
guid | Id of the smart trigger action. |
smartTriggerId |
guid | Id of the smart trigger. |
type |
string | Allowed values are "sendNotification", "autoMonitor", "transferChat", "changeAssignee", "addToSegment", "transferZendeskChat". |
isEnabled |
bool | If an action is enabled. |
agentOfflineMessage |
string | Agent offlineMessage prompt message. |
targetType |
string | Allowed values are "agent", "department", "segment", "zendeskDepartment". |
segmentId |
guid | Segment Id of the visitor. |
segment |
segment | Reference to LiveChat_Segment. |
agents |
agents[] | Reference to Agent. |
departments |
departments[] | Reference to LiveChat_Department. |
departmentIds |
array | The list of the action identifiers of chatbot smart trigger, which the department is related to. |
agentIds |
array | The list of the action identifiers of chatbot smart trigger, which the agent is related to. |
Chatbot Smart Trigger Condition JSON Format:
Name | Type | Description |
---|---|---|
id |
guid | Id of the smart trigger condition. |
smartTriggerId |
guid | Id of the smart trigger. |
fieldName |
string | FieldName of the condition. |
operator |
string | Allowed values are "is", "isNot", "contains", "notContains", "regularExpression", "isLessThan", "isMoreThan", "isOneOf", "isNotIn", "isEmpty", "isAfter", "isBefore", "isNotEmpty". |
value |
string | A string of condition matching value. |
order |
integer | The order of the condition, must be greater than or equal to 0, ascending order. |
GET bot/chatbots/{id}/chatbotSmartTriggers
Name | Type | In | Required | Description |
---|---|---|---|---|
chatbotId |
guid | query | yes | Id of the chatbot. |
include |
string | query | no | Allowed values are "chatbotSmartTriggerCondition", "chatbotSmartTriggerAction". |
An array of Bot_ChatbotSmartTrigger
Sample Request:
Response:
HTTP/1.1 200 OK
GET bot/chatbotSmartTriggers/{id}
Name | Type | In | Required | Description |
---|---|---|---|---|
include |
string | query | no | Allowed values are "chatbotSmartTriggerCondition", "chatbotSmartTriggerAction". |
Sample Request:
Response:
HTTP/1.1 200 OK
POST bot/chatbotSmartTriggers
Name | Type | In | Required | Description |
---|---|---|---|---|
chatbotId |
guid | body | yes | Id of the chatbot. |
name |
string | body | yes | Name of smart trigger. |
isEnabled |
bool | body | yes | Whether an action is enabled or not. |
conditionExpressionType |
string | body | yes | Allowed values are "any", "all", "logicalExpression". |
logicalExpression |
string | body | no | It is an expression that users one or more conditions, example: (1 or 2) and 3. |
order |
integer | body | no | Must be greater than or equal to 0, ascending order. |
chatbotSmartTriggerActions |
chatbotSmartTriggerActions[] | body | yes | Reference to Chatbot Smart Trigger Action. |
chatbotSmartTriggerConditions |
chatbotSmartTriggerConditions[] | body | yes | Reference to Chatbot Smart Trigger Condition. |
Sample Request:
Response:
HTTP/1.1 201 Created
PUT bot/chatbotSmartTriggers/{id}
Name | Type | In | Required | Description |
---|---|---|---|---|
chatbotId |
guid | body | yes | Id of the chatbot. |
name |
string | body | yes | Name of smart trigger. |
isEnabled |
bool | body | yes | Whether an action is enabled or not. |
conditionExpressionType |
string | body | yes | Allowed values are "any", "all", "logicalExpression". |
logicalExpression |
string | body | no | It is an expression that users one or more conditions, example: (1 or 2) and 3. |
order |
integer | body | no | Must be greater than or equal to 0, ascending order. |
chatbotSmartTriggerActions |
chatbotSmartTriggerActions[] | body | yes | Reference to Chatbot Smart Trigger Action. |
chatbotSmartTriggerConditions |
chatbotSmartTriggerConditions[] | body | yes | Reference to Chatbot Smart Trigger Condition. |
Sample Request:
Response:
HTTP/1.1 200 OK
DELETE bot/chatbotSmartTriggers/{id}
No Content
Sample Request:
Response:
HTTP/1.1 204 No Content