What is the Main Flow?
Every Script has exactly one Main Flow. When a call starts:- The Script is loaded
- The Main Flow is identified via the Script’s
main_flow_id - The assistant begins execution at step 0 of the Main Flow
- The conversation continues until an end condition is reached
Main Flow Structure
A Main Flow contains an ordered sequence of steps, each step can branch to other steps or sub-flows based on conditions.Starting the Conversation
The opening line comes from the first step of the Main Flow that actually speaks: Outbound Calls:- The assistant may wait briefly for the caller to speak
- Example: “Hi, this is Sarah from Voxworks.”
- The assistant speaks first with a greeting
- Example: “Thank you for calling Voxworks. How can I help you today?”
Doing work before the greeting
The Main Flow does not have to start with a voice step. If the first steps are Tool, Code or Flow steps, they run while the call is still connecting — Voxworks works forward through them until it reaches the first step that speaks, and that step’s script becomes the opening line, with its variables already filled in. That means a script can look the caller up in your CRM, check opening hours, or route to the right sub-flow before it says a word, and greet the caller with what it found:Flow Navigation
From any voice step, conditions determine where to go next:Knowledge Base and Guidelines
When a user asks a question during the conversation, it is compared against the questions in your Knowledge Base. If one matches, the assistant answers from that entry; if none does, it answers from the step and your Guidelines. If the assistant has information to respond:- The assistant answers the question using available knowledge
- The conversation stays on the current step
- The assistant continues with the current step’s objective
Ending the Conversation
The Main Flow ends when:- End condition reached — A step’s condition has
end_flow: success or fail - User hangs up — The participant disconnects
- Maximum duration — The configured time limit is reached
- Assistant hangup — The assistant determines the call should end
Main Flow vs Sub-Flows
Maximising Reusability
While the Main Flow is specific to each Script, you can maximise reusability by keeping it minimal:- Opening message — Greet the caller
- Flow step — Route immediately to a reusable sub-flow
- Closing messages — Handle success and failure outcomes from the sub-flow
Interrupts
During a conversation, users may interrupt the assistant while it is speaking. How interrupts are handled depends on the step type:
Voice steps can be configured to disable interrupts using the
interruptible: false setting when you need the assistant to complete critical information without being cut off.
For more on interrupt handling limitations, see Assistant Behaviour.
Best Practices
- Start with a clear opening — Set expectations immediately
- Keep the main path simple — Use sub-flows for complex branches
- Handle common objections — Include conditions for typical responses
- Plan your exit points — Define clear end conditions
- Test the full journey — Walk through every possible path
Next Steps
- Sub-Flows — Create reusable conversation modules
- Voice Steps — Design interactive conversation turns
- Steps Overview — Learn about all step types

