Hook
The Hook dead letter method ensures that when a flow is incomplete, the result is still sent to the designated WebHook, where users can retrieve the result of a discontinued flow, allowing to continue from where they left off. This function ensures that users are aware they have discontinued the flow.
Note that for onboarding flows, the flow will pick up from where it stopped. For verification flows, the process will begin again from the start.
Access Application
1 Navigate to Workspace, and click on Applications.
2 Choose the application you wish to execute the flow with configuration as Hook.
3 Click on the Configuration tab, and select Hook in the Dead Letter.
4 You will be displayed with the Hook settings. Enable the toggle to configure the notifications.
Hook settings
(*) Indicates an action to be mandatory.
Name | Description |
---|---|
Enable | Enable the toggle to configure the Hook settings. |
Hook URL* | Specify the URL (endpoint, such as a webhook API) where the result will be sent using the hook notification. This endpoint should support the POST method. |
Auth Token | If the specified URL requires an authentication token for access, provide the token here. |
Notification response type | Choose the type of notification response required from the available options. |
Hook failure threshold | Admin users will receive an email notification if the hook fails to deliver the result within the specified threshold. |
5 After configuring, ensure to SAVE
the configurations.
How it Works
When a triggered transaction cannot be completed, the Hook method ensures that the current status of the flow is sent to the configured WebHook. This allows admins to retrieve the result and determine whether to proceed with the flow using the partial data.
Here’s an example of a response:
{
"sp@aadhaar_verified_at": "1729172831",
"sp@workflow": "verification",
"sp@request_id": "xxxxxxxxx-xxxx-xxx-xxx-xxxxxxxxx",
"sp@user_id": "mark@gmail.com",
"sp@aadhaar_verified": "true",
"sp@transaction_status": "pending",
"sp@aadhaar_number": "xxxxx46819"
}
To proceed with a discontinued flow, the result from the WebHook must be added to the transaction API’s request body in the user metadata
field. After updating the metadata with this result, the transaction can be triggered again, allowing the flow to continue from where it stopped.