Skip to main content

State Reset Webhook

The following document outlines the details of the Application State Reset Webhook.

Overview

The State Reset webhook is triggered when a CPR state reset action is successfully executed.

The webhook notification is triggered under the following conditions:

  1. When one of the two state reset actions is successfully executed:
  • either clear_continuous_state action is performed: resets state from a specific module onward
  • or clear_complete_state action is performed: resets the entire transaction state
  1. and, when the event(APPLICATION_STATE_RESET) is subscribed to, for the respective appID.

Event Type

APPLICATION_STATE_RESET

Important

To receive notifications, it is mandatory to subscribe to the APPLICATION_STATE_RESET webhook event. For subscription details, please refer to the Results Webhook documentation.

Webhook Payload

The following JSON code snippet demonstrates the Payload received from the State Reset Webhook:

{
"eventId": "<UUID>",
"eventType": "APPLICATION_STATE_RESET",
"eventTime": "<ISO_Timestamp>",
"appId": "<App_ID>",
"transactionId": "<Transaction_ID>",
"workflowId": "<Workflow_ID>",
"previousStatus": "<Previous_Status>",
"reviewerId": "<Reviewer_ID>",
"resetType": "<Reset_Type>",
"moduleId": "<Module_ID>"
}

Payload Details

The following table provides the details of the parameters returned in the State Reset Webhook's Payload:

ParameterTypeDescriptionPresent for all instances?
eventIdstringThe unique UUID for this webhook eventYes
eventTypestringAlways set to "APPLICATION_STATE_RESET"Yes
eventTimestringThe ISO timestamp when the event occurredYes
appIdstringThe App ID where the reset occurredYes
transactionIdstringThe Transaction ID that was resetYes
workflowIdstringThe Workflow ID associated with the transactionYes
previousStatusstringThe status of the transaction before the resetYes
reviewerIdstringThe email of the user who performed the reset (or reviewer ID)Yes
resetTypestringThe type of reset performed. See Reset Types for all possible valuesYes
moduleIdstringThe Module ID from which state was reset No (only for continuous reset , i.e., when the resetType is "RESET_FROM_SPECIFIC_STEP")

Reset Types

The following table lists all possible values for the resetType field in the State Reset webhook's payload:

resetTypeActionDescription
RESET_FROM_SPECIFIC_STEPclear_continuous_stateResets state from a specific module onward. The moduleId field will be present in the payload.
COMPLETE_STATE_RESETclear_complete_stateClears the entire transaction state. The moduleId field will not be present in the payload.

Example Payloads

The following are examples that visulaise the payload structures for the two resetTypes:

{
"eventId": "<Event_ID>",
"eventType": "APPLICATION_STATE_RESET",
"eventTime": "2024-01-15T10:30:00.000Z",
"appId": "my-app-id",
"transactionId": "txn-12345",
"workflowId": "onboarding-workflow",
"previousStatus": "needs_review",
"reviewerId": "admin@company.com",
"resetType": "RESET_FROM_SPECIFIC_STEP",
"moduleId": "document-verification"
}
Was this helpful?
ON THIS PAGE
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: