Subflow within Workflows
The Subflow feature introduces reusable and loop-based execution within workflows. Instead of restricting workflows to linear execution, Subflows allow workflows to dynamically redirect execution to another node within the same workflow while preserving workflow context and execution state.

Benefits of Subflows
This allows workflows to behave dynamically instead of following rigid sequential execution paths.
Subflows are especially useful for:
- Authentication recovery
- Retry handling
- Polling workflows
- Conversational journeys
- Bulk operations
- Reusable API orchestration
Example
Say a customer asks to block all their cards, and the number of cards is only known when the workflow runs. One Block card step inside a Subflow loops once per card, keeps count, and the user is notified once at the end.

Creating and Configuring a Subflow
Here is a subflow being named in the Subflow editor.

Open the Workflow Builder
Navigate to the Workflow Builder where reusable or loop-based execution is required.
Name it
In Subflow name, provide a unique and descriptive name, for example Authentication Retry Flow.
Add the nodes
Build the reusable subflow by adding workflow nodes after Start, such as API calls, conditions, wait steps, notifications, variable updates and authentication handlers.
Add a Loop or Redirect
Add a Loop or Redirect node wherever the workflow execution should repeat, and configure:
- Continue conditions
- Retry conditions
- Exit behavior
- Target node for redirection
This allows the workflow to dynamically jump back to earlier nodes while preserving workflow state.
Define the fallback
Define what happens when retry limits are exceeded, conditions fail, APIs continue failing, or loop conditions are no longer satisfied. For example: exit the workflow, send a notification, trigger an alternate flow, or log a failure event.

To update the subflow later, click the Subflow widget and select the Edit icon. You can insert the saved subflow wherever reusable execution logic is required within the workflow.
Use Cases
Authentication refresh and retry
Bulk card blocking
Long-running workflows often depend on authentication tokens for downstream API execution. During workflows involving waits, retries, or asynchronous processing, tokens may expire before the next API call executes. Without a recovery mechanism, downstream APIs may fail and interrupt customer journeys.

Using Subflows:
The same reusable flow can also handle OTP retries by redirecting execution back to the authentication step until retry limits are reached.
Benefits: eliminates duplicated authentication branches, improves workflow reliability, simplifies retry management, and preserves execution context during retries.
Outcome
The Subflow feature enables workflows to become significantly more dynamic, scalable, and maintainable. By supporting reusable execution paths, looping behavior, retry handling, and workflow redirection, builders can create workflows that adapt to real-time conditions instead of relying on rigid sequential execution.
