Skip to main content

What are Sub-Flows?

A Sub-Flow is a self-contained conversation module that:
  • Can be called from the Main Flow or other Sub-Flows
  • Executes its own sequence of steps
  • Returns control to the parent flow when complete

Why Use Sub-Flows?

Sub-Flows help you:

How Sub-Flows Work

When a Flow Step invokes a sub-flow:
  1. Context saved — The parent flow’s position is pushed to the flow stack
  2. Sub-flow starts — Execution begins at step 0 of the sub-flow
  3. Sub-flow runs — Steps execute until an end condition
  4. Return — Control returns to the parent flow with a success or failure result
  5. Continue — The parent flow evaluates the result and continues based on its conditions

Sub-Flow Exit Conditions

Sub-Flows return to their parent with either a success or failure result: The parent Flow Step uses these conditions to route the conversation appropriately:
This pattern allows you to handle both outcomes gracefully in the parent flow.

Common Sub-Flow Patterns

Appointment Booking

Information Collection

Objection Handling


Best Practices

  1. Keep sub-flows focused — Each should do one thing well
  2. Name clearly — Use descriptive names like “Booking Flow” or “Email Collection”
  3. Document inputs/outputs — Make it clear what data is expected
  4. Handle failures gracefully — Include conditions for unsuccessful outcomes
  5. Test independently — Verify sub-flows work before integrating

Next Steps