Skip to main content

Selective State Reset for Non-Linear Workflows

Overview

Pre-read: Selective State Reset concept note.

A step is a branch in a non-linear workflow which contains modules/super-modules and can only be navigated through the index page. Examples: Nominee step (contains multiple dynamic forms to get the nominee details), Selfie & Face Match step, Esign step, etc.

Currently, if the user application has been rejected due to a particular step's data being incorrect, we only support resetting the state from that step onwards — resulting in the user being forced to redo multiple steps rather than just the particular steps. This problem is relevant for all branch (non-linear) workflows.

Solution

To solve for this problem, selective state reset has been introduced. The feature allows selectively clearing the module data and resetting the user's journey state for one or more journey steps (refers to a whole branch, e.g. Digilocker step, esign step), along with any steps that depend on them (cascade).


Prerequisites

Selective State Reset prerequisites for non-linear workflows

  • The workflow should be non-linear with an index node (e.g. IIFL workflow).
  • The only way to move from Branch A to Branch B should be through an index node. For example, in the above flow, user cannot go from m3 → m4 or m5 → m7.
    • The MEO for these type of journeys should be: Mindex -> m1 -> m2 -> m3 -> Mindex -> m4 -> m5 -> m6 -> Mindex and so on.
  • All resumeFrom values should be one of the modules of the same branch or the index page.
    • Example: main form -> m1 -> m2 -> m3 -> main -> m4 -> m5 -> m6 -> auto_declined (possible resumeFrom values: [main form, m4, m5, m6]).
    • Setting the resumeFrom value in another branch (for example [m1, m2, m3, m4]) is not allowed.
  • Same as above for conditionalResumeFrom.
  • All modules must have a stepId.
    • For a single branch — stepId would remain the same.
    • For an index node — stepId would be different.
    • If stepId has not been added in a module, it would not be shown in the options.
Example
{
"type": "dynamicForm",
"subType": "form",
"id": "module_0S8znZ_form",
"nextStep": "",
"next_node_type": {},
"version": "v1",
"properties": {
"sections": [
{
"id": "basic_details",
"components": [
{
"id": "label_id1_nCzJDu",
"type": "label",
"subType": "title",
"text": "Personal Details"
}
]
}
]
},
"name": "Customer Father Name and Marital status Form",
"previousStep": "module_IGoScm_formV2",
"stepId": "customer_details_form"
}

How to trigger Selective State Reset

The CPR state reset API can be used to trigger SSR for a specific transaction.

Important points to note
  • The API removes moduleToResumeFrom and status for a particular transaction.
    • For example, if MEO is: main form -> m1 -> m2 -> m3 -> main -> m4 -> m5 -> m6 -> auto_declined (resumeFrom - mainForm):
      • Let's say m1, m2, m3 is part of the selfie_validation step.
      • m4, m5, m6 is the digilocker step.
    • Originally, without SSR, the user would be redirected to the main form.
    • If only the digilocker step is reset, the moduleToResumeFrom is removed and the user will continue from the m6 step (instead of main form).
  • Recommendation: If user is auto-declined in a particular step, reset that step as well to avoid inconsistent behaviour.
Was this helpful?
Ask AI

Ask anything about the internal documentation

AI answers are based on internal documentation. Verify critical information.