Design a multi-step call with a pathway
Most agents run on one prompt: the AI decides what to ask and when. A pathway agent follows steps you draw on a canvas instead. Each step does one job, and named exits decide which step comes next. Use a pathway when the order matters, when some callers must go a different way, or when a call must reach a person at the right moment.
In this tutorial you build the phone line of Sunrise Clinic, a made-up clinic in Pune, as a pathway. At the end you’ll have an agent that:
- finds out why the patient is calling, and sends emergencies straight to the right advice;
- takes the patient’s name and mobile number, and checks them;
- sends same-day cases to the front desk with a warm transfer;
- notes a day and time for everyone else, and reads it back;
- answers a question about opening hours, in a step you add yourself;
- has been tested step by step and published.
You need:
- A workspace role of Builder or higher.
- A front-desk phone number in your organisation’s country to transfer callers to. This tutorial uses +91 98765 43210.
1. Create the agent
Section titled “1. Create the agent”-
In the sidebar, open Agents, then click New agent.
-
Choose Start from a template. Search for clinic and pick Clinic appointment booking. It has a Pathway badge.
-
Enter the name Sunrise Clinic line and click Create and open.
The agent opens on Pathway: the canvas with the template’s steps. The Test panel folds away on this page to make room. Bring it back with the Show test panel button on the right.
2. Find your way around
Section titled “2. Find your way around”Each box on the canvas is a step. The dots on a step are its exits, and the lines show where each exit leads.
- Click a step to open its settings on the right. Close them to go back to the Flow overview, which counts the steps and lists any issues.
- Drag from an exit dot to a step to connect them. To remove a line, click it and press Delete.
- Add step adds a new step. Auto-arrange tidies the layout.
- The ⋯ menu has the Step guide, which explains each kind of step.
The template’s steps:
| Step | Kind | What it does |
|---|---|---|
| Start | Start | Says the first message. |
| What do they need | Conversation | Finds out why the patient is calling. Exits: Wants to book, Change or other and Emergency. |
| Patient name | Collect input | Asks for the patient’s name and saves it as patient_name. |
| Mobile number | Collect input | Asks which mobile number to confirm on, checks it’s a phone number, and saves it. |
| Reason for visit | Conversation | Asks what the visit is for, and whether the patient must be seen today. |
| Needs same day? | Condition | Same-day goes to the front desk. Otherwise goes on to the day and time. |
| Day and time | Conversation | Asks which day suits, and morning or evening. |
| Read back | Conversation | Reads the request back. Confirmed ends the call; Change details goes back a step. |
| Front desk | Transfer | Puts the caller through to a person. |
| Speak to a person | Global | At any step, a caller who asks for a person goes to Front desk. |
| Stop calling | Global | At any step, a caller who asks not to be called again goes to Do not call. |
| Request noted, Emergency advice, Do not call | End call | Say a closing line and hang up. |
Click Reason for visit to see how a step remembers things. Under Details to remember, it
saves department, visit_reason and urgency. Then click Needs same day?: its Same-day
branch has one rule, urgency is same_day. A Conversation step collects the values, and a
Condition step branches on them.
3. Set the transfer number
Section titled “3. Set the transfer number”The template doesn’t know your front desk’s number.
-
Click Front desk.
-
Keep the Type as Warm: Brief the person first. With Cold, the caller is connected straight away.
-
Under Transfer to, replace the placeholder with your front desk’s number, for example +91 98765 43210. It must be a number in your organisation’s country. For a 360 CTI queue, enter
cti-queue:and the queue’s id instead. -
Keep Send a summary to the person on. The person who picks up hears who called and what they said so far.
You can’t publish while the placeholder number is still there.
4. Add a step of your own
Section titled “4. Add a step of your own”Some patients only ring to ask when the clinic is open. Give them a quick answer, then offer a booking.
Add the exit
Section titled “Add the exit”-
Click What do they need. Under Exits, click Add exit.
-
Name the exit Asks about hours. In the box below it, describe when to take it: The caller only wants to know the clinic’s opening hours or address.
The validation badge in the toolbar now says 1 issue. Click it: What do they need: the ‘Asks about hours’ exit isn’t connected. Issues block publishing, so you fix them as you go.
Add the hours step
Section titled “Add the hours step”-
Click Add step and choose Conversation. Click the new step.
-
Set the Name to Clinic hours.
-
Under What this step does, write: Tell the caller the clinic is in Kothrud, Pune, and is open Monday to Saturday, 9am to 1pm and 5pm to 8pm. It’s closed on Sundays. Then ask if they’d like to book a visit.
-
The step has one exit, Done. Click Add exit and add a second one: Wants to book, taken when The caller wants to book a visit.
Add an ending
Section titled “Add an ending”-
Click Add step and choose End call. Name it Hours given.
-
Set the Closing line: Thank you for calling Sunrise Clinic. Take care!
Connect the steps
Section titled “Connect the steps”-
Drag from the Asks about hours exit of What do they need to Clinic hours.
-
Drag from the Wants to book exit of Clinic hours to Patient name.
-
Drag from the Done exit of Clinic hours to Hours given.
-
Click Auto-arrange.
The badge goes back to Valid. It may show a few notes too: notes are worth a look, but they don’t block publishing.
5. Test it step by step
Section titled “5. Test it step by step”-
Click Show test panel, open Chat and click Start chat.
-
Type Hi, what time are you open on Saturday?
The chat shows each step as the call enters it, so you can follow the path: What do they need, then Clinic hours. Answer No, that’s all, thanks and the chat ends at Hours given.
Start a new chat for each of these paths:
| Say | The call should go |
|---|---|
| I’d like to book a check-up for next week. | Through the name, number, reason, day and time, then Read back and Request noted. |
| My son has a high fever, can he be seen today? | Through the name, number and Reason for visit to Needs same day?. The chat shows Branch: Same-day, then Transfer (warm) to and your front desk’s number. |
| I want to change my appointment. | Straight to Front desk. |
| Can I talk to a real person?, at any point | To Front desk, through Speak to a person. |
| My father has chest pain. | To Emergency advice. |
Then open Talk and do the same out loud. In a browser test call, the transfer step doesn’t connect anyone. The agent says This is a test call, so I won’t transfer you. and then who you’d be connected to on a phone call. To try a real transfer, publish, point a number at the agent on the test line, and call it.
To run these paths after every change, save them as simulated-caller scenarios.
6. Publish
Section titled “6. Publish”Click Publish, add a release note such as Front desk number, hours step, and click Publish again.
If the pathway has issues, publishing stops with Pathway has issues: fix the ones on the validation badge and publish again. Then point a phone number at the agent. Steps 3 and 4 of the quick start show how.
Draft your own pathway with AI
Section titled “Draft your own pathway with AI”For your own call, you don’t have to start from a template:
-
In Agents, click New agent and choose Pathway with AI.
-
Under Describe your agent, describe the call step by step: who calls, what you need from them, where calls should branch, and when a person must take over. Click Continue.
-
Answer the questions, or click Skip this one or Skip all, let AI decide.
Drafting your pathway usually takes 15 to 60 seconds. Then the agent opens on the canvas. Check every step, set the transfer numbers, and test each path, as you did above.
What you built
Section titled “What you built”- A pathway agent with checked questions, a branch, a transfer and globals that work from any step.
- A step you designed, connected and validated yourself.
- A set of paths to test after every change.