Approval Webhook in BoldDesk: Automate Approvals Easily
In modern support operations, automation plays a vital role in improving efficiency and ensuring timely responses. BoldDesk enhances this workflow through its Approval Webhook feature, which enables teams to automatically trigger external processes whenever an approval action occurs within the system. Whether you’re integrating BoldDesk with internal approval systems, custom applications, or third‑party services, approval webhooks offer a flexible and reliable way to extend your service desk capabilities.
Use Case Overview
By creating a webhook, approval fields can be sent as payload to an API or an HTTP request-catching application in real-time.
How Does it Work?
An approval webhook can be triggered based on events of an approval request. To learn more about approval events captured by webhook, refer to this Webhook Payloads, Headers, and Event.
Approval Payload
When creating a webhook, you have two options to select the payload structure:
-
Default - Sends the approval fields in a predefined format.
-
Advanced- Alters your payload structure, which is often framed in JSON format.
To learn more about webhook creation and its features, refer to this How to Create and Manage Webhooks.
Approval fields that are available to choose from default and advanced options are as follows:
| S. No | Default fields | Properties | Placeholders in Advanced option |
|---|---|---|---|
| 1 | Approval ticket – Details of ticket on which the approval request created. | Ticket ID, Ticket Subject, Ticket Status –ID, Name | {{approval.Ticket.Id}}, {{approval.Ticket.Subject}}, {{approval.Ticket.Status.Id}}, {{approval.Ticket.Status.Name}} |
| 2 | Approval Request ID | - | {{approval.ApprovalId}} |
| 3 | Subject | - | {{approval.Subject}} |
| 4 | Description | - | {{approval.Description}} |
| 5 | Status | ID, Name | {{approval.Status.Id}}, {{approval.Status.Name}} |
| 6 | Type | ID, Name | {{approval.Type.Id}}, {{approval.Type.Name}} |
| 7 | Approvers – List of approvers in a single approval request. | User ID, Name, Email ID, Status–ID, Name, Comment, Approved Time, Created Time, Last Modified Time, Approval Approved Reason–ID, Name, Approval Rejected Reason–ID, Name | {{approval.Approvers.UserId}}, {{approval.Approvers.Name}}, {{approval.Approvers.EmailId}}, {{approval.Approvers.Status.Id}}, {{approval.Approvers.Status.Name}}, {{approval.Approvers.Comment}},{{approval.Approvers.ApprovedOn}}, {{approval.Approvers.CreatedOn}}, {{approval.Approvers.LastModifiedOn}}, {{approval.Approvers.ApprovalApprovedReason.Id}}, {{approval.Approvers.ApprovalApprovedReason.Name}}, {{approval.Approvers.ApprovalRejectedReason.Id}}, {{approval.Approvers.ApprovalRejectedReason.Name}} |
| 8 | Created By | User ID, Email ID | {{approval.CreatedBy.UserId}}, {{approval.CreatedBy.EmailId}} |
| 9 | Last Modified By | User ID, Email ID | {{approval.LastModifiedBy.UserId}}, {{approval.LastModifiedBy.EmailId}} |
| 10 | Created Time | - | {{approval.CreatedOn}} |
| 11 | Last Modified Time | - | {{approval.LastModifiedOn}} |
Trigger Approval Webhook Conditionally
| S. No | Condition | Operator | Value | Description |
|---|---|---|---|---|
| 1 | Approval Status | Is, In | Requested, Approved, Rejected, Cancelled | Captures the Approval Request Completed event based on which status the request is completed. |
| 2 | Approval Name | Is, Contains, Start with, Ends with | Text field. Note: Not case sensitive | Filters the approval requests based on its subject. |
| 3 | Approval Approved Reason | Is, In | - | The webhook can be triggered only for a specific approval reason when the Approver Approved event is captured, and the approver has selected an approval reason. |
| 3 | Approval Rejected Reason | Is, In | - | The webhook can be triggered only for a specific rejected reason when the Approver Rejected event is captured, and the approver has selected a rejected reason. |
Sample Payload
Default option
When all fields are included, the payload sent for an Approval Request Created event might resemble the below,
{
"eventModule": "Approval",
"eventType": "ApprovalRequestCreated",
"eventTime": "2020-09-19T10:32:00.0018818Z",
"orgId": 1,
"orgName": "Digital Edge",
"payload": {
"type": {
"id": 1,
"name": "Everyone"
},
"subject": "Mac OS Laptop request",
"status": {
"id": 1,
"name": "Requested"
},
"lastModifiedOn": "2020-09-19T10:31:57.925881Z",
"lastModifiedBy": {
"userId": 7,
"emailId": "james.anderson@organization.com"
},
"description": "In Need of a Mac OS Laptop due to work domain change",
"createdOn": "2020-09-19T10:31:57.925881Z",
"createdBy": {
"userId": 7,
"emailId": "james.anderson@organization.com"
},
"approvers": [
{
"name": "Claire Watson",
"emailId": "claire.watson@organization.com",
"userId": 11,
"status": {
"id": 1,
"name": "Requested"
},
"comment": null,
"approvedOn": null,
"createdOn": "2020-09-19T10:31:57.925881Z",
"lastModifiedOn": "2020-09-19T10:31:57.925881Z"
},
{
"name": "Jordan Green",
"emailId": "jordan.green@organization.com",
"userId": 13,
"status": {
"id": 1,
"name": "Requested"
},
"comment": null,
"approvedOn": null,
"createdOn": "2020-09-19T10:31:57.925881Z",
"lastModifiedOn": "2020-09-19T10:31:57.925881Z"
},
{
"name": "Mark Antony",
"emailId": "mark.antony@organization.com",
"userId": 15,
"status": {
"id": 1,
"name": "Requested"
},
"comment": null,
"approvedOn": null,
"createdOn": "2020-09-19T10:31:57.925881Z",
"lastModifiedOn": "2020-09-19T10:31:57.925881Z"
}
],
"ticket": {
"id": 45321,
"subject": "Replacement for old windows laptop with new Mac OS Laptop",
"status": {
"id": 2,
"name": "Open"
}
},
"approvalId": 2541
}
}
Advanced Option
The Custom Payload text area under the advanced option lets you input your customized payload and insert preferred approval data from the placeholder section. This section appears when you click on Insert Placeholders.
Frequently Asked Questions (FAQs)
Q1. Can I send only selected fields in an approval webhook?
Yes. Use the Advanced Payload option and include only the required placeholders.
Q2. Are approval webhooks triggered for every approver?
No. They trigger based on configured approval events (e.g., approval completed, approver action taken).
Q3. Do approval webhooks support retry logic?
BoldDesk retries requests based on its webhook retry mechanism…