> ## 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.

# Flow Steps

> Flow Steps navigate to sub-flows, enabling modular and reusable conversation designs.

## What is a Flow Step?

A Flow Step transfers control to another flow:

1. **Save position** — Current location is pushed to the flow stack
2. **Enter sub-flow** — Execution begins at the sub-flow's first step
3. **Execute sub-flow** — The sub-flow runs until completion
4. **Return** — Control returns to the parent flow
5. **Continue** — Parent flow proceeds based on sub-flow outcome

***

## Flow Step Structure

| Property       | Description                         |
| -------------- | ----------------------------------- |
| `next_flow_id` | Which sub-flow to invoke            |
| `conditions`   | Navigation based on sub-flow result |

Note: Flow steps do not have a `script` property — they navigate directly to the sub-flow. Global variables are automatically available to all flows and sub-flows.

***

## Returning from Sub-Flows

When a sub-flow completes, it returns control to the parent flow with either a **success** or **failure** result. The parent flow step's conditions determine what happens next:

```text theme={null}
Flow Step: Enter Booking Sub-Flow
   Condition: true (success)
   → Next: confirmation_step

   Condition: false (failure)
   → Next: alternative_step
```

For more details on designing sub-flows and their exit conditions, see [Sub-Flows](/flows/flows-sub).

***

## Ending the Conversation

If a flow step is in the [Main Flow](/flows/flows-main) and the sub-flow returns, the main flow continues. When the main flow itself reaches an end condition, the entire conversation ends and the call terminates.

Sub-flows never end the call directly — they always return to their parent flow first.

***

## Use Cases

### Reusable Modules

Create sub-flows for common tasks:

* **Booking Flow** — Used by multiple scripts
* **Contact Collection** — Gather email and phone
* **Objection Handling** — Standard responses to concerns

***

## Best Practices

1. **Keep sub-flows focused** — Each should accomplish one goal
2. **Document inputs/outputs** — Make it clear what data is expected
3. **Handle both outcomes** — Always have conditions for success and failure
4. **Name flows clearly** — Use descriptive names like "Appointment Booking Flow"
5. **Test the full chain** — Verify parent-child flow transitions work correctly

***

## Next Steps

* [Sub-Flows](/flows/flows-sub) — Design reusable conversation modules and learn how sub-flows return to parent flows
* [Main Flows](/flows/flows-main) — Understand how conversations end when the main flow completes
* [Variables](/flows/variables) — Learn about global variables
* [Steps Overview](/flows/steps) — See all step types
