Objective
In this example, you’ll learn:- How to connect multiple steps using the
nextfield - How to persist data across steps with the
saveaction - The difference between transitional and terminal steps
- How workflow state evolves as steps complete
The Scenario
You want to build a contact form that collects:- User’s name
- Email address
- Preferred contact time
Implementation
Here’s the complete tool definition:Key Concepts
Step Transitions with next
The next field defines which step to go to after successful submission:
- Evaluated after validation passes: The workflow only transitions if all required inputs are present
- Evaluated in order: If multiple entries exist, the first matching one wins (more on this in Example 5)
- Terminal if missing: A step without
nextends the workflow
The save Action
By default, inputs are cleared when transitioning to a new step. The save action persists them:
Transitional vs Terminal Steps
In this example:
COLLECT_NAME→ transitional (goes to COLLECT_EMAIL)COLLECT_EMAIL→ transitional (goes to COLLECT_TIME)COLLECT_TIME→ terminal (ends workflow)
Dynamic Tool Schema Per Step
As the workflow progresses, the submit tool’s schema changes: At COLLECT_NAME:How It Works
Here’s the conversation flow:State Evolution
After Step 1 (COLLECT_NAME):Try It
To test this workflow in the Syllable Console:- Create a new tool with the JSON above
- Assign it to an agent
- Start a conversation and say “hello”
- Provide your name when asked
- Provide your email when asked
- Provide your preferred time when asked
- Observe the workflow completing after all three steps
What’s Next
This example creates a functional contact form, but the experience feels robotic—no greeting, no sense of progress. In Example 4: Lifecycle Actions, you’ll learn how to:- Add welcome messages with
on.enterhooks - Display progress indicators (“Step 1 of 3”)
- Use the
sayaction for verbatim text delivery - Track progress with counters

