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:
- A wrong input at every step that takes typed text.
- An answer in the wrong format at every date or number step.
- Silence for an hour, then for a day, at a middle step.
- A language switch mid-flow, in both directions.
- STOP at the first message and at the last step.
- A request for a person at the first message.
- A handoff when the desk is closed, and when nobody is available.
- 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.