Category

Ticket Webhook Payloads, Fields, Conditions, and Examples

Updated:

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.
For more detailed instructions, explore Webhook Payloads, Headers, and Event.

Configure the Ticket Payload

When creating a webhook, you have the option of sending the tickets’ data in two formats:

  1. Default - Sends the ticket fields in a predefined structure.

  2. Advanced - Allows for customization of the payload structure, which is often framed in JSON format.

    Default_option.png

For more detailed instructions, explore How to Create and Manage Webhooks in BoldDesk Tickets.

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 Return only the base customer portal URL {{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}}

Understand Last Message and Private Note Fields

The following webhook fields provide recent ticket-conversation context:

Field Content
lastMessages Returns the recent public ticket messages available in the webhook payload.
lastMessagesHtml Returns the recent public ticket messages in HTML format.
lastMessagesText Returns the recent public ticket messages in plain-text format.
lastPrivateNotes Returns the recent private notes available in the webhook payload.
lastPrivateNotesHtml Returns the recent private notes in HTML format.
lastPrivateNotesText Returns the recent private notes in plain-text format.

These fields provide only the recent messages or notes included in the ticket payload. They should not be treated as a complete ticket-conversation history.

To retrieve the complete ticket conversation, use the dedicated ticket-conversation endpoints instead of relying on lastMessages or lastPrivateNotes.

  • Use the public-messages endpoint to retrieve public replies.
  • Use the ticket messages or internal-notes endpoint to retrieve private notes.
  • Apply pagination where supported.

For more information, learn How to Retrieve the Full Ticket Conversation Using the BoldDesk API.

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.

Condition.png

Ticket Webhook Payload Examples

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": "[email protected]"
       },
       "priority": {
           "id": 2,
           "name": "Normal"
       },
       "lastPublicNotesText": "",
       "lastPublicNotesHtml": "",
       "lastPublicNotes": null,
       "lastPrivateNotesText": "",
       "lastPrivateNotesHtml": "",
       "lastPrivateNotes": null,
       "lastModifiedOn": "2024-07-22T07:27:56.98819Z",
       "lastModifiedBy": {
           "userId": 1000,
           "emailId": "[email protected]"
       },
       "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": "[email protected]"
       },
       "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": "[email protected]"
       },
       "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.

Advanced_option.png

Frequently Asked Questions

  1. What is the difference between the Default and Advanced payload options?
    The Default option sends selected ticket fields using BoldDesk’s predefined payload structure. The Advanced option allows you to create a custom payload and insert the required ticket placeholders.

  2. Can I include only selected ticket fields in the webhook payload?
    Yes. Select only the required fields when configuring the payload. Use the Advanced option when you need a custom payload structure.

  3. What do LastMessages and LastPrivateNotes contain?
    LastMessages provides the recent public ticket-message information included in the webhook payload. LastPrivateNotes provides the recent private-note information included in the payload.
    These fields should not be treated as the complete ticket conversation history.

  4. How can I retrieve the complete ticket conversation?
    Use the dedicated BoldDesk REST API endpoints for public messages and ticket messages instead of relying only on LastMessages or LastPrivateNotes.

  5. What is the difference between the standard, HTML, and text message fields?

    Field Variant Purpose
    LastMessages and LastPrivateNotes Return the corresponding message or note data included in the payload.
    LastMessagesHtml and LastPrivateNotesHtml Return the corresponding content in HTML format.
    LastMessagesText and LastPrivateNotesText Return the corresponding content in plain-text format.

    Select the variant that matches the receiving application’s processing requirements.

  6. Can I use custom ticket fields in a webhook payload?
    Yes. Add the required custom ticket fields to the webhook payload using the options available in the Default or Advanced configuration.

Related Articles

  1. How to Create and Manage Webhooks in BoldDesk
  2. Webhook Payloads, Headers, and Events
  3. How to Retrieve the Full Ticket Conversation Using the BoldDesk API
  4. BoldDesk API Documentation
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied
Access denied
Access denied

No articles or sections found
No articles or sections found