Documentation Index
Fetch the complete documentation index at: https://docs.voxworks.ai/llms.txt
Use this file to discover all available pages before exploring further.
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:| Benefit | Description |
|---|---|
| Reusability | Use the same conversation module in multiple places |
| Maintainability | Update one sub-flow instead of duplicating changes |
| Organization | Keep complex flows manageable by breaking them into modules |
| Consistency | Ensure the same process is followed every time |
How Sub-Flows Work
When a Flow Step invokes a sub-flow:- Context saved — The parent flow’s position is pushed to the flow stack
- Sub-flow starts — Execution begins at step 0 of the sub-flow
- Sub-flow runs — Steps execute until an end condition
- Return — Control returns to the parent flow with a success or failure result
- 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:| Exit Type | Description | Parent Condition |
|---|---|---|
| Success | Sub-flow completes its objective | Triggers the Success (true) condition in parent |
| Failure | Sub-flow cannot complete its objective | Triggers the Otherwise condition in parent |
Common Sub-Flow Patterns
Appointment Booking
Information Collection
Objection Handling
Best Practices
- Keep sub-flows focused — Each should do one thing well
- Name clearly — Use descriptive names like “Booking Flow” or “Email Collection”
- Document inputs/outputs — Make it clear what data is expected
- Handle failures gracefully — Include conditions for unsuccessful outcomes
- Test independently — Verify sub-flows work before integrating
Next Steps
- Flow Steps — Learn how to invoke sub-flows
- Variables — Learn about global variables
- Main Flows — Design your primary conversation path

