Skip to main content

How to set up conversation flow for AI agent

Learn what routing is for AiVA AI agents, when to use it, and exactly how to set it up for your agent, plus see a full example for appointment scheduling.

What is routing for an AI agent?

Routing is a section where you give your AI agent detailed instructions for guiding a conversation on different topics, such as appointment scheduling or billing questions. It defines the exact question and answer flow, including branches based on how the customer responds, and specifies where the agent should route the call or what action it should take once all the information is collected.

Think of it as a detailed script that tells your AI agent exactly what to ask, in what order, and how to use each answer as the conversation moves forward.

Unlike Stage Directions, which set broad conversational rules, routing is structured step by step. This makes it useful when a conversation needs to follow a specific, repeatable path rather than relying on the agent to improvise.

When to use a routing for AI agent?

Routing is especially useful when you want your AI agent to follow a strict conversational sequence for collecting specific details, rather than gathering information loosely, and when you need to give it strict guidance on what to do with that information once obtained.

Common use cases include:

  • Lead qualification: Guide the agent through a fixed set of questions, such as budget, timeline, or specific needs, so every lead is qualified consistently before being passed to your sales team.

  • Appointment booking: Ensure your AI agent collects all necessary information, such as name, preferred date and time, service type, and contact details, before confirming or booking an appointment.

  • Intake for support requests: Walk callers or message senders through a consistent set of questions (e.g., account number, issue type, urgency) so your team receives complete context before following up.

  • Order or service requests: Collect structured details, such as product, quantity, or delivery preferences, in a specific order so nothing is missed.

It's also recommended to use routing when connecting your AI agent to your business tools, since they capture the right information before it's sent along.

Routing works for both AI voice and messaging agents, helping ensure consistent, complete information is captured every time, regardless of how a customer reaches out.

How to set up routing for an AI agent

In the Playbook field, you give your AI agent general rules for leading a conversation across different scenarios, such as what the goal is, whether it should follow a question-and-answer flow from Routes, what it should do next (like transferring the call to a user or team), or what actions to take in connected business tools. You can also mention specific routes by name to tell the agent exactly which branch of the flow to use in each scenario.

For example:

“Ask the customer what their question is, then follow the guidance below based on the topic.

Managing appointments
​Use the flow of questions and answers related to managing appointments. Once you understand the need and have collected all the necessary information, make the change in the calendar, such as creating, rescheduling, or canceling the appointment.

Billing
​Use the flow of questions and answers related to billing. Once you understand the need and have collected all the necessary information, forward the call to the Billing ring group."

In Routes, you create the exact question-and-answer map your AI agent will follow during a conversation, including different branches based on the customer's answers. You can build this map from scratch or paste in a flow using a specific text format.

To create it:

  1. In Routes, click Change

Change routing desktop

2. Select how you want to create the map:

  • Paste from LLM if you want to paste in text

  • Visual flow editor if you want to build it from scratch

options to change routing desktop

3. For the text format, paste your text into the field and click Apply.

Past text of routes desktop

4. To build from scratch, in the editor, start by clicking the + next to Routes.

add a question desktop

5. Type the first question you want your AI agent to ask.

type a question routing desktop

6. Click the + next to the question to add the possible answer or answers a customer might give.

add an answer to routing desktop

7. Click the + next to each answer to add the follow-up questions your AI agent should ask based on that response.

add another question to routing desktop

Repeat these steps to build out as detailed a flow as you need, branching further based on each possible answer.

If you build a complex flow with many branches, you can mark a branch as a new route for easier navigation. You can also reference a route in the Playbook field to instruct the AI agent on how to use that map.

To create a new route:

  1. In the Route visual editor, select the question where the route should start.

    Select a question for routes desktop

  2. Click the three dots.

select three dots desktop

3. Select Name this route.

name a route desktop

4. Give it a name.

name a route desktop

5. Click Save.

save a route desktop

Create routes with an AI assistant

Building a detailed flow with many branches can take time in the visual editor. To speed things up, you can have an AI assistant like ChatGPT or Claude write the flow for you, then paste it straight into Routes.

Step 1: Copy your agent’s setup

At the top of your AI agent’s page, click Copy for LLM. This copies the agent’s full setup, including all sections, along with the structure the AI assistant needs to follow when writing your flow.

Copy AI agent settings for LLM

Step 2: Ask an AI assistant to write the flow

  1. Open your AI assistant and paste the copied text into the chat (Ctrl + V on Windows or Cmd + V on Mac).

  2. Ask it to add a routing flow that follows the structure in the prompt. Describe what the flow should cover, such as the topics callers bring up, the questions the agent should ask, and what should happen once it has the answers.

For example:

“Add a routing flow following the structure in this prompt. The agent should handle two topics: managing appointments and billing questions. For appointments, collect the caller’s name, preferred date and time, and service type, then create, reschedule, or cancel the appointment. For billing, ask for the account email and the issue, then transfer the call to the Billing ring group.”

The more specific you are about questions, possible answers, and next steps, the closer the result will be to what you need.

Step 3: Paste the flow into Routes

  1. In the AI assistant’s reply, find the ## Intake Flow section and copy its text.

  2. In DialLink, go to the Routing section of your AI agent.

Access the Routing section on the desktop

3. In Routes, click Change.

Click Change to set up routes

4. Select Paste from LLM.

Select Paste from LLM

5. Paste the text into the field and click Apply.

DialLink builds the full flow for you, so you don’t need to add each question and answer manually.

Step 4: Review and adjust

Open the visual flow editor to check the result. Make sure the questions, answers, and branches match what you want, and edit anything that needs changing. If your Playbook mentions specific routes by name, check that the route names in the flow match.

Did this answer your question?