Ticket Webhook
Use case overview
By creating a webhook, the ticket fields can be sent as payload to an API or an HTTP request-catching application in real-time.
How does it work?
A ticket webhook can be triggered based on the events of the tickets.
Learn more about ticket events captured by webhook
Tickets payload
When creating a webhook, you have the option of sending the tickets’ data in two formats:
- Default - Sends the ticket fields in a predefined structure.
- Advanced - Allows for customization of the payload structure, which is often framed in JSON format.
Learn more about webhook creation and its features
Available ticket fields for selection
The available ticket fields under the default and advanced options are as follows:
S. No | Default fields | Properties | Placeholders in Advanced option |
---|---|---|---|
1. | Ticket ID | - | {{ticket.TicketId}} |
2. | Subject | - | {{ticket.Subject}} |
3. | Description | - | {{ticket.Description}} |
4. | Brand | ID, Name |
{{ticket.Brand.Id}} {{ticket.Brand.Name}} |
5. | Category | ID, Name |
{{ticket.Category.Id}} {{ticket.Category.Name}} |
6. | Priority | ID, Name |
{{ticket.Priority.Id}} {{ticket.Priority.Name}} |
7. | Type | ID, Name |
{{ticket.Type.Id}} {{ticket.Type.Name}} |
8. | Source | ID, Name |
{{ticket.Source.Id}} {{ticket.Source.Name}} |
9. | Status | ID, Name |
{{ticket.Status.Id}} {{ticket.State.Name}} |
10. | State | ID, Name |
{{ticket.State.Id}} {{ticket.State.Name}} |
11. | Last Private Notes | - | {{ticket.LastPrivateNotes}} |
12. | Last Message | - | {{ticket.LastMessages}} |
13. | Response Due | - | {{ticket.ResponseDue}} |
14. | Resolution Due | - | {{ticket.ResolutionDue}} |
15. | Is Visible In Customer Portal | - | {{ticket.IsVisibleInCustomerPortal}} |
16. | Tag | - | {{ticket.Tag}} |
17. | Additional Notifications | - | {{ticket.AdditionalNotifications}} |
18. | Ticket URL | - | {{ticket.Url}} |
19. | Customer Portal URL | ID, Name |
{{ticket.CustomerPortalUrl}} |
20. | Agent Portal URL | - | {{ticket.AgentPortalUrl}} |
21. | Created Time | - | {{ticket.CreatedOn}} |
22. | Last Modified Time | - | {{ticket.LastModifiedOn}} |
23. | Satisfaction Survey Result | Comment, RatingPoint, RatingCategory |
{{ticket.SatisfactionSurveyResult.Comment}} {{ticket.SatisfactionSurveyResult.RatingPoint}} {{ticket.SatisfactionSurveyResult.RatingCategory}} |
24. | Last Public Notes | - | {{ticket.LastPublicNotes}} |
25. | CreatedBy | User ID, Email ID |
{{ticket.CreatedBy.UserId}} {{ticket.CreatedBy.EmailId}} |
26. | LastModifiedBy | User ID, Email ID |
{{ticket.LastModifiedBy.UserId}} {{ticket.LastModifiedBy.EmailId}} |
27. | Tag String | - | {{ticket.TagString}} |
28. | Additional Notifications UserId | - | {{ticket.AdditionalNotificationsUserId}} |
29. | Last Messages HTML | - | {{ticket.LastMessagesHtml}} |
30. | Last Private Notes HTML | - | {{ticket.LastPrivateNotesHtml}} |
31. | Last Public Notes HTML String | - | {{ticket.LastPublicNotesHtml}} |
32. | Description Text | - | {{ticket.DescriptionText}} |
33. | Last Messages Text String | - | {{ticket.LastMessagesText}} |
34. | Last Private Notes Text | - | {{ticket.LastPrivateNotesText}} |
35. | Last Public Notes Text | - | {{ticket.LastPublicNotesText}} |
36. | Email Received At String | - | {{ticket.EmailReceivedAt}} |
37. | External Reference ID | - | {{ticket.ExternalReferenceId}} |
38. | Watchers | Email ID, User ID |
{{ticket.WatchersEmailId}} {{ticket.WatchersUserId}} |
39. | Requester | User ID, Display Name, Email ID |
{{ticket.Requester.UserId}} {{ticket.Requester.DisplayName}} {{ticket.Requester.EmailId}} |
40. | Contact Groups | ID, Name |
{{ticket.ContactGroup.Id}} {{ticket.ContactGroup.Name}} |
41. | Agent | User ID, Display Name, Email ID |
{{ticket.Agent.UserId}} {{ticket.Agent.DisplayName}} {{ticket.Agent.EmailId}} |
27. | Group | ID, Name |
{{ticket.Group.Id}} {{ticket.Group.Name}} |
Trigger conditions for ticket webhooks
S. No | Condition | Operator | Value | Description |
---|---|---|---|---|
1. | Assigned Agent | Is In |
Current User | Makes a webhook to capture ticket events from a specified agent. |
2. | Brand | Is In |
Support | Makes a webhook to capture ticket events from a specified brand. |
Sample payload
Default option
When all fields are included, the payload sent for the Created event might resemble the example below:
{
"eventModule": "Tickets",
"eventType": "TicketCreated",
"eventTime": "2024-07-22T07:28:43.9290352Z",
"orgId": 6396,
"orgName": "Syncfusion",
"payload": {
"watchersUserId": [],
"watchersEmailId": [],
"type": {
"id": null,
"name": null
},
"url": "https://{YourDomain}/agent/tickets/6",
"ticketId": 6,
"tagString": "",
"tag": [],
"subject": "Hello",
"status": {
"id": 2,
"name": "Open"
},
"state": {
"id": 1,
"name": "Active"
},
"source": {
"id": 3,
"name": "Agent Portal"
},
"satisfactionSurveyResult": {
"comment": null,
"ratingPoint": null,
"ratingCategory": null
},
"responseDue": null,
"resolutionDue": null,
"requester": {
"userId": 1000,
"displayName": "John A",
"emailId": "john.abraham@abc.com"
},
"priority": {
"id": 2,
"name": "Normal"
},
"lastPublicNotesText": "",
"lastPublicNotesHtml": "",
"lastPublicNotes": null,
"lastPrivateNotesText": "",
"lastPrivateNotesHtml": "",
"lastPrivateNotes": null,
"lastModifiedOn": "2024-07-22T07:27:56.98819Z",
"lastModifiedBy": {
"userId": 1000,
"emailId": "john.abraham@abc.com"
},
"lastMessagesText": "",
"lastMessagesHtml": "",
"lastMessages": null,
"externalReferenceId": null,
"emailReceivedAt": null,
"descriptionText": "Hello\r\n\r\n",
"description": "<p><span>Hello</span><br></p>",
"isVisibleInCustomerPortal": true,
"customerPortalUrl": "https://{YourDomain}",
"createdOn": "2024-07-22T07:27:56.98819Z",
"createdBy": {
"userId": 1000,
"emailId": "john.abraham@abc.com"
},
"contactGroup": {
"id": null,
"name": null
},
"category": {
"id": null,
"name": null
},
"brand": {
"id": 1,
"name": "Syncfusion"
},
"agentPortalUrl": "https://{YourDomain}/agent",
"group": {
"id": null,
"name": null
},
"agent": {
"userId": 1000,
"displayName": "John A",
"emailId": "john.abraham@abc.com"
},
"additionalNotificationsUserId": [],
"additionalNotifications": []
}
}
Advanced option
The ‘Custom Payload’ text area under the ‘Advanced’ option lets you input your customized payload and insert the preferred ‘Tickets’ data from the ‘Placeholders’ section.
This section appears when you click Insert Placeholders.