Webhook promotes communication between Circuit and third-party applications. With webhooks, you can make API calls and trigger notifications when a predefined action is performed as per the business requirement.
Prerequisite
Create a webhook that has to be executed in bridge by giving relevant field details. Click here to learn how to create a Webhook in Qntrl.
Example Use Case: When it comes to the employee onboarding process, the Webhook state can be employed for electronic document verification procedures. This is accomplished by establishing a connection between the verification service provider and configuring it to transmit verification results or updates to your webhook endpoint. By analyzing the response received, the subsequent course of action can be configured.
Builder View
Drag and drop the Webhook state from the left pane into your circuit or click the required Webhook state in your circuit.
Under Configuration, update the common state field attributes.
Type Webhook is selected by default. Select the Webhook Name to be added to the circuit from the drop-down list.
Specify the Error Handling options for the state. To learn more about Error Handling, click here.
Under Input / Output on the right pane, you can optionally fill in the following details:
Enter the Input Path, Output Path, Result Path, and Result selector. To learn more about I/O paths, click here. In the Body, the data bytes required to send the request data are given.
Besides the custom parameters and custom headers configured for the Webhook, define dynamic parameters and headers specific to this webhook state and this circuit using Add Parameter and Add Header.
Add Parameter - Specify the parameter name and parameter value. These parameters will be sent to the third-party application while triggering the webhook.
Add Header - Specify the header name and header value. The configured headers will be appended to the API request while triggering the webhook.
Click Save and Execute.
Specify the test data as Input JSON for your test run, then click Next.
Name your test run by providing a unique name for this execution. Click Run.
Check for the data received from Qntrl Circuit through the webhook notification in your application.
If there is a failure or data mismatch, modify your webhook settings in Qntrl Circuit.
Repeat this test until you get the required data from circuit to your application.
Code View
The JSON for configuring a webhook in code view is given below:
"Verify Employee Documents": {
"type": "webhook",
"next": "Action - Approve or Reject",
"webhook_id": "employee_document_verification_1",
"parameters": {
"pan_number": "pan.number"
},
"headers": {
"AuthorizationKey": "$.APIkey"
}
}