Skip to content

What happens if they send a photo instead?

Playbook: Bots and testing

Testing a chatbot's unhappy paths before you publish

Most chatbot failures happen off the main path: a photo where a date was expected, a customer who goes quiet, a switch to Arabic, a STOP, a request for a person. Test those five families on every version, then test the handoff itself. Here is the test list, recovery messages in English and Arabic, and what to measure.

Jusoor teamLast updated 12 November 20265 min read

At a glance

Testing unhappy paths in four lines.

  1. Trigger

    A new bot, or a new version of one, is ready to publish.
  2. What Jusoor does

    The bot studio simulates wrong inputs, timeouts, language switches and opt-outs; the routing simulator shows who would answer.
  3. When a person takes over

    Every unhappy path ends back on track or with a person who receives the fields collected.
  4. What is measured

    After publishing: returns after a bot closed the chat, and reopens within 72 hours.

The playbook

Testing unhappy paths, step by step.

What an unhappy path is

The happy path is the conversation you designed: the customer answers each question in order and reaches the end. An unhappy path is everything else. The customer sends a photo where you asked for a date, goes quiet, changes language, replies STOP or asks for a person at step two. Most bot failures that customers notice happen there.

This playbook is a test list to run on every version before you publish, on any platform. How Jusoor does it is at the end.

Before you test, write down what good looks like

For each step of the bot, decide in advance:

  • What the step accepts: the format, the buttons, the range.
  • What it does with anything else: re-ask once with an example, then offer a person.
  • How long it waits before it pauses, and what happens when the customer comes back.
  • Where the chat goes when it hands over, and what goes with it.

Without this, testers argue about whether a reply was fine. With it, each test passes or fails.

The five families of unhappy paths

Wrong inputs

Send what a step does not expect: a photo instead of a number, a date in another format, "tomorrow", "I don't know", a very long message. The bot should re-ask once with an example, then offer a person. It should never loop more than twice.

Timeouts

Stop replying halfway through. Come back after an hour, then after a day. The bot should keep what it collected and resume at the same step, not start again.

Language switches

Start in English and switch to Arabic at step three, then the other way round. Replies, buttons and the handoff message should follow, and the person who takes over should see which language the customer used.

Opt-outs

Reply STOP, or "stop messaging me", at any step. The contact should leave your campaigns at once, the opt-out and its reason should be recorded, and the bot should not send another prompt.

Asking for a person

Ask for a person in the first message, mid-flow, and in words the bot was not built for, such as "is anyone there?". One request should be enough.

Test the handoff, not only the bot

  • Send a test message while the desk is closed. Is the customer told when the team is back?
  • Set every agent on the desk to away. Where does the chat go?
  • Fill one agent to capacity. Does the next chat skip them?
  • Write as a returning customer. Does the chat reach the right person under your rule?
  • Open the handed-over chat as the agent. Can they see the fields collected without asking?

Context that carries across

When a test ends in a handoff, check that the person receives the thread in order, the fields collected so far, the customer's language, and which step and which rule sent the chat to them. If a tester has to scroll up to find a reference, so will your agents.

A routing rule to test against

Testing needs a rule to check against. Write one line per case, for example: handoffs from the booking bot go to the Bookings desk in its hours; outside them, the customer is told when the team is back and the chat waits in that desk's queue; a returning customer goes to the agent they spoke to before. Each test then has an expected answer.

Recovery messages in English and Arabic

These are the lines a bot sends when the path goes wrong. Adapt them and replace the parts in braces.

Template 1: after a wrong input

English: Sorry, I didn't catch that. Please type your {field}, for example {example}. Or reply "person" to talk to our team.
Arabic: عذرًا، لم أفهم ذلك. يُرجى كتابة {الحقل}، مثل {مثال}. أو ردّوا بكلمة «موظف» للتحدث مع فريقنا.

Template 2: resuming after a pause

English: Welcome back, {first name}. We stopped at {step}, and you'd already given us {details}, so let's carry on from there.
Arabic: أهلًا بعودتكم يا {الاسم}. توقفنا عند {الخطوة}، وقد أرسلتم إلينا {التفاصيل}، فلنكمل من هناك.

Template 3: confirming an opt-out

English: Done. You won't receive further messages from {business} on this number. If you need us, just write here.
Arabic: تم. لن تصلكم رسائل أخرى من {اسم النشاط} على هذا الرقم. وإن احتجتم إلينا، يكفي أن تكتبوا هنا.

Unhappy paths to test

Run the full list on every version, not only the first:

  1. A wrong input at every step that takes typed text.
  2. An answer in the wrong format at every date or number step.
  3. Silence for an hour, then for a day, at a middle step.
  4. A language switch mid-flow, in both directions.
  5. STOP at the first message and at the last step.
  6. A request for a person at the first message.
  7. A handoff when the desk is closed, and when nobody is available.
  8. A returning customer starting the flow again.

What to measure after you publish

  • Customers who come back after a bot closed the chat.
  • Chats reopened within 72 hours.
  • Handoffs per step: a step that hands over often needs rewriting.
  • Pickup time after a handoff, against the desk's target.

Change one step at a time, so you can see what made the difference.

How Jusoor does it

Jusoor's bot studio is where teams write, simulate, test and publish bots for every live channel.

  • Simulation covers wrong inputs, timeouts, language switches and opt-outs before you publish.
  • Versioned publishing, so you know which version customers are talking to.
  • Step-based bots, built on Jusoor's RSL technology, pause and resume at the same step with the data intact.
  • The routing simulator shows exactly who would answer a test message, and setup health checks flag a line with no escalation desk or a desk with nobody behind it.
  • A STOP reply opts the contact out automatically, and the Opted out list shows who and why.
  • Live bot monitoring, and bot effectiveness reports that show customers returning after a bot closed the chat and reopens within 72 hours.

Can we continue in Arabic?

The playbook in practice

A photo, a language switch, then a person.

The bot re-asks once with an example, follows the customer into Arabic and hands over on the first request.

Jusoor
Telegram

AI answering

  1. Hi, I need to change my booking.
  2. I can help with that. What's your booking reference? It starts with BK.
  3. Here it is not published yet. Photo of a receipt
  4. Thank you. I can't read references from photos, so please type it, for example BK-20418.
  5. الرقم BK-55127. هل يمكن أن نكمل بالعربية؟ It's BK-55127. Can we continue in Arabic?
  6. بالتأكيد. وجدتُ الحجز BK-55127 ليوم الجمعة. هل تريدون تغيير التاريخ أم الإلغاء؟ Of course. I found booking BK-55127 for Friday. Would you like to change the date or cancel?
  7. أريد التحدث مع موظف من فضلكم. I'd like to speak to a person, please.
  8. Handed to Bookings desk. Collected: BK-55127; language switched to Arabic.
  9. Nadia, Bookings أهلًا، معكم نادية من قسم الحجوزات. أرى حجزكم ليوم الجمعة. أي تاريخ يناسبكم؟ Hello, Nadia from Bookings. I can see your Friday booking. Which date suits you?
Demo conversation
  1. Handoff moment

    Trigger

    A request for a person, after a wrong input and a language switch.

  2. Context

    Carried across

    The booking reference and the customer's language.

  3. Routing rule

    Routed to

    The Bookings desk, within its hours.

  4. Report

    Measured

    Reopens within 72 hours, and returns after a bot closed the chat.

Questions

Testing unhappy paths: common questions.

What is an unhappy path in a chatbot?

In Jusoor's testing playbook, an unhappy path is any route off the conversation you designed: wrong inputs, timeouts, language switches, opt-outs and requests for a person. Most failures customers notice happen there, so each one is tested before publishing.

How do you test a chatbot before publishing?

Write down what each step accepts and what it does with anything else, then run the five families of unhappy paths and the handoff checks on every version. Jusoor's bot studio simulates wrong inputs, timeouts, language switches and opt-outs before you publish.

What should a bot do when a customer goes quiet?

Pause, keep what it collected, and resume at the same step when the customer writes again. Jusoor's step-based bots, built on its RSL technology, pause and resume at the same step with the data intact.

Bring your bot's hardest step. We'll test it with you.

Share a flow you run today; we'll walk through its unhappy paths and where each one ends.