Triggers allow you to automatically update your tickets, or send automatic follow-up emails based on predefined conditions. If a ticket meets more than one trigger rule, the triggers will work in sequence based on their display order.
Ticketing_Trigger is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id |
guid | Id of the trigger. |
name |
string | Name of the trigger. |
description |
string | Description of the trigger. |
isEnabled |
bool | Whether the trigger is enabled or not. |
order |
integer | Order of the trigger. |
event |
string | Events of the tickets. Allowed values are "whenTicketIsCreated", "whenATicketReplyIsReceived", "WhenAnAgentReplied", "whenTheAssigneeOfATicketHasChanged", "whenTheStatusOfATicketHasChanged", "whenATicketStatusStaysTheSameForASpecifiedPeriodOfTime", "whenTicketUpdated", "whenTicketIsMovedToRecycleBin". |
status |
string | When the status of a ticket match the value, the trigger will work. Allowed values are "new", "pendingInternal", "pendingExternal", "onHold", "resolved". |
statusDuration |
integer | How long dose a ticket stay at one status. |
isValueSettingEnabled |
bool | Whether set value action is enabled or not. |
conditionMetType |
string | How conditions are matched. Allowed values are "any", "all", "logicalExpression". |
logicalExpression |
string | Logical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5). |
ifSendEmail |
bool | Whether to send email or not. |
ifSendEmailToContact |
bool | Whether send email to the ticket contact or not. |
ifSendEmailToAgent |
bool | Whether sending email to agent or not. |
ifDisplayInTicketCorrespondences |
bool | With this option enabled, the trigger email will be included within a ticket's correspondence thread. |
ifSendEmailToAssignedAgent |
bool | Whether send email to the selected agents or not. |
ifSendWebhook |
bool | |
triggerConditions |
triggerConditions[] | Reference to Trigger Condition. |
triggerActionUpdateFields |
triggerActionUpdateFields[] | Reference to Trigger Action Update Field. |
triggerActionEmailContent |
triggerActionEmailContent | Reference to Trigger Action Email Content. |
triggerTicketingWebhook |
triggerTicketingWebhook | Reference to Trigger Ticketing Webhook. |
triggerWebhookHeaders |
triggerWebhookHeaders[] | Reference to Trigger Ticketing Webhook Headers. |
agentIds |
array | The list of agent that the trigger email are sent to. |
Trigger Action Email Content JSON Format:
Name | Type | Description |
---|---|---|
triggerId |
guid | Id of the trigger. |
subject |
string | Subject of the trigger email. |
htmlBody |
string | HTML body of the trigger email. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. |
textBody |
string | Text body of the trigger email. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. |
Trigger Action Update Field JSON Format:
Name | Type | Description |
---|---|---|
id |
guid | Id of the trigger action set value field. |
triggerId |
guid | Id of the trigger. |
fieldName |
string | Name of the ticketing field you want to set value for. |
value |
string | Value of the trigger action field. |
Trigger Condition JSON Format:
Name | Type | Description |
---|---|---|
id |
guid | Id of the trigger condition. |
triggerId |
guid | Id of the trigger. |
fieldName |
string | Name of the ticketing field you want to set value for. |
operator |
string | How value for this condition field is matched. Allowed values are "contains", "notContains", "is", "isNot", "isMoreThan", "isLessThan", "before", "after", "regularExpression", "isOneOf", "isNotIn". |
value |
string | Value of the condition field. |
order |
integer | Order of the trigger condition. |
GET ticketing/triggers
Name | Type | In | Required | Description |
---|---|---|---|---|
include |
string | query | no | Allowed values are "triggerCondition", "triggerActionUpdateField", "agent", "triggerActionEmailContent". |
An array of Ticketing_Trigger
Sample Request:
Response:
HTTP/1.1 200 OK
GET ticketing/triggers/{id}
Name | Type | In | Required | Description |
---|---|---|---|---|
include |
string | query | no | Allowed values are "triggerCondition", "triggerActionUpdateField", "agent", "triggerActionEmailContent". |
Sample Request:
Response:
HTTP/1.1 200 OK
POST ticketing/triggers
Name | Type | In | Required | Description |
---|---|---|---|---|
name |
string | body | yes | Name of the trigger. |
description |
string | body | no | Description of the trigger. |
isEnabled |
bool | body | yes | Whether the trigger is enabled or not. |
order |
integer | body | no | Order of the trigger. |
event |
string | body | yes | Events of the tickets. Allowed values are "whenTicketIsCreated", "whenATicketReplyIsReceived", "WhenAnAgentReplied", "whenTheAssigneeOfATicketHasChanged", "whenTheStatusOfATicketHasChanged", "whenATicketStatusStaysTheSameForASpecifiedPeriodOfTime", "whenTicketUpdated", "whenTicketIsMovedToRecycleBin". |
status |
string | body | yes | When the status of a ticket match the value, the trigger will work. Allowed values are "new", "pendingInternal", "pendingExternal", "onHold", "resolved". |
statusDuration |
integer | body | no | How long dose a ticket stay at one status. |
isValueSettingEnabled |
bool | body | yes | Whether set value action is enabled or not. |
conditionMetType |
string | body | yes | How conditions are matched. Allowed values are "any", "all", "logicalExpression". |
logicalExpression |
string | body | no | Logical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5). |
ifSendEmail |
bool | body | yes | Whether to send email or not. |
ifSendEmailToContact |
bool | body | yes | Whether send email to the ticket contact or not. |
ifSendEmailToAgent |
bool | body | yes | Whether sending email to agent or not. |
ifDisplayInTicketCorrespondences |
bool | body | no | With this option enabled, the trigger email will be included within a ticket's correspondence thread. |
ifSendEmailToAssignedAgent |
bool | body | yes | Whether send email to the selected agents or not. |
ifSendWebhook |
bool | body | yes | |
triggerActionEmailContent |
triggerActionEmailContent | body | no | Email content of trigger email. |
triggerActionUpdateFields |
triggerActionUpdateFields[] | body | no | Set Value of trigger. |
triggerConditions |
triggerConditions[] | body | no | Condition of trigger. |
triggerTicketingWebhook |
triggerTicketingWebhook | body | no | Reference to Trigger Ticketing Webhook. |
triggerWebhookHeaders |
triggerWebhookHeaders[] | body | no | Reference to Trigger Ticketing Webhook Headers. |
agentIds |
array | body | no | The list of agent that the trigger email are sent to. |
Sample Request:
Response:
HTTP/1.1 201 Created
POST ticketing/triggers/{id}:disable
Sample Request:
Response:
HTTP/1.1 200 OK
POST ticketing/triggers/{id}:enable
Sample Request:
Response:
HTTP/1.1 200 OK
PUT ticketing/triggers/{id}
Name | Type | In | Required | Description |
---|---|---|---|---|
name |
string | body | yes | Name of the trigger. |
description |
string | body | no | Description of the trigger. |
isEnabled |
bool | body | yes | Whether the trigger is enabled or not. |
order |
integer | body | no | Order of the trigger. |
event |
string | body | yes | Events of the tickets. Allowed values are "whenTicketIsCreated", "whenATicketReplyIsReceived", "WhenAnAgentReplied", "whenTheAssigneeOfATicketHasChanged", "whenTheStatusOfATicketHasChanged", "whenATicketStatusStaysTheSameForASpecifiedPeriodOfTime", "whenTicketUpdated", "whenTicketIsMovedToRecycleBin". |
status |
string | body | yes | When the status of a ticket match the value, the trigger will work. Allowed values are "new", "pendingInternal", "pendingExternal", "onHold", "resolved". |
statusDuration |
integer | body | no | How long dose a ticket stay at one status. |
isValueSettingEnabled |
bool | body | yes | Whether set value action is enabled or not. |
conditionMetType |
string | body | yes | How conditions are matched. Allowed values are "any", "all", "logicalExpression". |
logicalExpression |
string | body | no | Logical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5). |
ifSendEmail |
bool | body | yes | Whether to send email or not. |
ifSendEmailToContact |
bool | body | yes | Whether send email to the ticket contact or not. |
ifSendEmailToAgent |
bool | body | yes | Whether sending email to agent or not. |
ifDisplayInTicketCorrespondences |
bool | body | no | With this option enabled, the trigger email will be included within a ticket's correspondence thread. |
ifSendEmailToAssignedAgent |
bool | body | yes | Whether send email to the selected agents or not. |
ifSendWebhook |
bool | body | yes | |
triggerActionEmailContent |
triggerActionEmailContent | body | no | Email content of trigger email. |
triggerActionUpdateFields |
triggerActionUpdateFields[] | body | no | Set Value of trigger. |
triggerConditions |
triggerConditions[] | body | no | Condition of trigger. |
triggerTicketingWebhook |
triggerTicketingWebhook | body | no | Reference to Trigger Ticketing Webhook. |
triggerWebhookHeaders |
triggerWebhookHeaders[] | body | no | Reference to Trigger Ticketing Webhook Headers. |
agentIds |
array | body | no | The list of agent that the trigger email are sent to. |
Sample Request:
Response:
HTTP/1.1 200 OK
DELETE ticketing/triggers/{id}
No Content
Sample Request:
Response:
HTTP/1.1 204 No Content