Academy/Getting started/Build a scenario
GuideIntermediate

Build a scenario

Scenarios are guided, branching conversations your agent runs step by step — a trigger, what the agent says, and where each customer reply leads. Use them when a chat should follow a set path instead of a free answer.

AAssistantLabs Team
Academy
7 min read Updated Jul 2026

What a scenario is

Most of the time your agent answers freely from what it knows. A scenario is the opposite: a set path the agent follows step by step. It says something, waits for the customer to reply, and each reply routes to the next thing — another question, an ending, or an action.

Reach for a scenario when a conversation has a shape you want to guarantee: a return request, a booking, a quote, qualifying a lead. Anything where you'd otherwise write “first ask this, and if they say that, do this” is a scenario.

Scenarios don't replace the agent — they steer it. Outside a scenario's trigger the agent keeps answering normally. When a customer message matches a trigger, the agent runs that flow instead, then hands back to normal conversation at the end.

Open the builder

Scenarios live in your agent's settings. Open Build at the top, then Scenarios in the side menu — it's under Behavior.

Click "Build" at the top.
"Scenarios" is in the side menu, under "Behavior."

Build your first scenario

Give the scenario a name, then build it top to bottom: a trigger, then steps. Each step is one thing the agent says plus the replies a customer might give.

A trigger at the top, then steps — each with what the agent says and a reply for each path.
  • Trigger — describe, in plain words, when the agent should start this scenario (“the customer says they want to return a product”). No keyword lists — it reads the intent.
  • The agent says — what the agent writes at this step, like the opening question.
  • Customer replies — add a reply for each path the conversation can take. You're listing the branches, not every possible wording.
Keep steps small: one question per step. It's easier to follow, and each reply gets a clear next move.

What each reply can do

Every customer reply points at an outcome — the pill next to it. That's where the flow goes when the customer picks that reply:

  • Go to a step — continue to another step (or a brand-new one). This is how you branch: “Wrong size” goes one way, “Changed my mind” another.
  • End with a message — close the conversation with a final line from the agent.
  • Agent instruction — hand back to the agent with a free instruction (“check the order status and update the customer”). Use this when the next move isn't a fixed script.
  • Hand off to another scenario — jump into a different scenario, so you can reuse flows instead of rebuilding them.
Tag the customer on any reply. Under a reply you can apply tags — so “Changed my mind” can quietly tag the contact Return while the flow continues. Great for segmenting who went down which path.

A full flow, step by step

Let's build a real one end to end — an Order help flow for when a customer has a problem with something they bought. We'll start with a single question and grow it one feature at a time, until it uses every outcome type at once.

1. Start with one question. The trigger is “the customer has a question or a problem with an order they already placed.” Step 1 asks what's going on with your order? and lists three replies — it hasn't arrived, it arrived damaged, I want to return it. Right now each reply just sits on “Choose what happens” — fine, we'll route them next.

2. Branch into more steps. “It hasn't arrived” needs its own follow-up, so point it at a new step, Track the order. Do the same for “It arrived damaged” → a Damaged item step. Two replies, two go-to-step branches — the conversation forks.

3. Let the agent do the real work. In Track the order the agent asks for an order number. Looking it up isn't a fixed script, so set that reply's outcome to Agent instruction: “look up the order status and share the latest tracking update and delivery date.” The agent takes over from there.

4. End cleanly when it's resolved. In Damaged item, if the customer says “just refund me,” there's nothing more to ask — set End with a message: “I've flagged this for a refund and the team will confirm shortly.”

5. Reuse a flow you already built. “I want to return it” is a whole flow of its own — and you built it earlier. Instead of rebuilding, set that reply to Hand off to another scenario → Return request. One reply, and the customer drops straight into the return flow.

6. Tag as they branch. Finally, add a tag to the meaningful replies — Return, Shipping, Damaged, Refund. Now every path quietly sorts the contact, so your inbox and notifications can act on it.

Here's the finished flow — three steps, five branches, and every outcome type in one scenario:

Go-to-step, an agent instruction, an ending, a hand-off, and tags — all in one flow.
No dead ends. Every reply either moves forward, ends, hands off, or gives the agent something to do. When you build your own, the finished flow should read like this top to bottom — a clear path for every reply.

Test before you ship

Every scenario has a live Run the scenario preview — a WhatsApp mock beside the builder. Tap a reply and it walks the exact path a customer would, so you can see where each branch lands before anyone talks to it.

  • Tap through every reply — make sure each one goes somewhere sensible.
  • Watch for a reply whose outcome is still “Choose what happens” — that branch is a dead end.
  • Check that endings feel like a natural close, not an abrupt stop.
Save as you go: the builder shows a “Save changes” bar once you've edited something — nothing goes live until you save.
Was this helpful?