Hero Background

Power Your Software Testing with AI Agents and Cloud

The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.

Kane CLIMessaging

Test a bot handing off to a human with its context

The handoff is easy. Carrying the conversation across it is the part that breaks.

Published on:

Asking a bot for a human is a moment of mild frustration that a product can make much worse. If the transcript does not travel, the agent opens a blank conversation and asks the customer to explain again.

This use case escalates a bot conversation on the Intercomm clone and checks what arrived.

The checks that matter

The handoff carries three distinct pieces of context, and the one most often lost is what the customer typed themselves.

ContextWhat the test asserts
The bot pathBoth choices, the billing question and the request for a human
The customer messageThe free text about the Pro plan and the invoice total
The assignmentAn assignee of Priya Nair rather than an unassigned queue

The free text is the critical one. Menu choices are structured and usually survive, while the typed message is the part that actually explains the problem and the part a handoff is most likely to drop.

Note

Note: Asserting the transcript after a handoff is what proves an escalation carried the conversation rather than just the customer. Start on TestMu AI. Start for free

The flow as a test file

The bot reply is asserted by its text and its sender, so a flow that routes to the wrong bot branch is caught before any escalation happens.

---
mode: testing
url: https://my-testing-repo-main.vercel.app/intercom-clone-app/messenger?reset=true
max_steps: 45
tags: [intercom, support, automation]
---

# Intercomm 31.2: Bot to human handoff

Catalog objective: trigger the bot flow and request a human agent.
Key assertion: the conversation is assigned to the inbox with its context.

## Start with the bot
Click "A billing question" and verify the thread shows "Fin (bot)" replying "I can help with billing. Which plan are you on?"

## Give the bot some context
Type "We are on Pro and the invoice total looks wrong" into the messenger box, click "Send", and verify that message appears in the thread from "Sam Rivera".

## Ask for a human
Click "I want to talk to a person" and verify a green banner says the conversation was handed off to a human and assigned in the inbox with the full transcript.

## Verify the assignment carried the context
Go to https://my-testing-repo-main.vercel.app/intercom-clone-app/inbox and verify the detail panel shows "Assignee" of "Priya Nair", a bot path containing "A billing question" and "I want to talk to a person", and a transcript that still contains "We are on Pro and the invoice total looks wrong".

The assignee is asserted by name, because a conversation handed off into an unassigned queue is indistinguishable from one that was never escalated.

Step by step coverage

A bot, some context, an escalation, and the inbox.

StepWhat it proves
Start with the botThe bot responds on the expected branch
Give the bot some contextFree text is accepted into the conversation
Ask for a humanThe escalation is accepted and reported
Verify the assignment carried the contextAssignee, bot path and the original free text all present

Checking the inbox rather than the messenger banner is what distinguishes a handoff that happened from one that merely said it did.

Next-generation test execution with TestMu AI

Adding it to a suite

kane-cli testmd run tests/intercom/bot-handoff_test.md

Add an escalation with no prior messages, since an agent receiving an empty conversation should still see which bot path produced it.

Handoffs cross a boundary between automation and people. Kane CLI as a QA agent covers the wider suite, and running flows in CI covers checking it on every release.

Author

...

Bhawana

Blogs: 75

  • Twitter
  • Linkedin

Bhawana is a Community Evangelist at TestMu AI with over 3 years of experience creating technically accurate, strategy-driven content in software testing. She has authored 50+ blogs on test automation, cross-browser testing, mobile testing, and real device testing. She also serves as Product Marketing Manager for Kane CLI, the command-line tool that runs browser automation from the terminal using natural-language flows in a real Chrome browser. Bhawana is certified in KaneAI, Selenium, Appium, Playwright, and Cypress, reflecting her hands-on knowledge of modern automation practices. On LinkedIn, she is followed by 6000+ QA engineers, testers, AI automation testers, and tech leaders.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Bot Handoff FAQs

Did you find this page helpful?

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests