C
Chatty

Live Inbox & Human Takeover

While Chatty resolves 80%+ of routine customer inquiries autonomously, high-stakes sales opportunities and complex edge cases require human empathy. The Live Inbox enables human agents to monitor active conversations in real-time and take over instantaneously.


The Escalation Lifecycle


Escalation Triggers

Conversations can transition from AI to human operators through four primary pathways:

🙋‍♂️

Visitor Intent Recognition

When a visitor types phrases like "can I talk to a real person?", "representative", or clicks a quick-reply escalation button.

📉

Sentiment & Frustration Detection

Gemini continuously analyzes visitor sentiment score. If repeated frustration or dissatisfaction is flagged, an escalation alert triggers automatically.

🎯

Rule-Based Keyword Matching

Define critical business triggers (e.g. refund, enterprise pricing, legal, cancel subscription) that immediately ping agents.

👀

Operator Manual Intercept

Agents monitoring the Live Inbox can click Take Over at any time to pause the AI mid-thread and begin typing.


The ai_paused State Machine

When a takeover occurs:

  1. The conversation record sets ai_paused = true in PostgreSQL.
  2. The backend streaming router (/api/widget/chat/stream) detects the flag and stops generating LLM completions.
  3. If the visitor continues typing, incoming messages are flagged as sender: "visitor" and delivered directly to the operator's Live Inbox via real-time WebSocket subscriptions.
  4. The widget displays an indicator: "Sarah has joined the conversation".
Session State Object
{
  "session_id": "1fa85f64-5717-4562-b3fc-2c963f66afa6",
  "ai_paused": true,
  "assigned_agent_id": "agent_usr_9912",
  "assigned_agent_name": "Sarah Connor",
  "escalated_at": "2026-09-07T14:32:00Z"
}

Operator Inbox Capabilities

The Chatty Dashboard Live Inbox is built for speed and high-concurrency support teams:


Resuming AI Automation

When the human agent finishes resolving the complex inquiry:

  • Manual Handoff: Click Resume Bot. The ai_paused flag resets to false, and Chatty resumes fielding subsequent questions.
  • Automatic Inactivity Safeguard: If an agent forgets to close the ticket or resume the bot, Chatty automatically resumes AI answering after 30 minutes of agent inactivity.

Post-Chat CSAT Surveys

When a conversation is marked resolved (either by the bot or human operator), Chatty can automatically present a 5-star or emoji Customer Satisfaction (CSAT) rating card:

+-------------------------------------------------------------+
| How would you rate your support experience today?           |
|                                                             |
|   ⭐ ⭐ ⭐ ⭐ ⭐                                            |
|                                                             |
| [ Add optional feedback comment...                        ] |
| [ Submit Feedback ]                                         |
+-------------------------------------------------------------+

CSAT metrics are aggregated in the Analytics Summary dashboard.