Docs
AI Agent

Chat Widget AI

How AI chat works in the widget, including verification and escalation.

The chat widget is AI-only. The AI handles every visitor message; if it can't answer confidently it offers escalation in-chat, and on visitor confirmation a follow-up email-source ticket is created for your team to work. Operators don't chat through the widget directly — the widget is a one-way surface from your team's perspective. This is a different shape from the email path's draft/review/auto-send pipeline — there's no draft to review for widget messages, only the AI's actual reply or an escalation hand-off.

Widget response flow

The AI reply is generated synchronously inside the HTTP request that delivered the customer's message, so the customer gets an answer in the same round-trip — no BullMQ job, no processing ticket state, no operator review step.

  1. Visitor sends a message.
  2. Message is stored in the chat-linked ticket (ticket stays in status="open").
  3. AI generates a response against the conversation history (and verified customer context, if email OTP has been confirmed — see below).
  4. Unsafe output is suppressed before delivery.
  5. Response is returned in the same HTTP response and rendered in-widget.
  6. If the AI decided the conversation needs a human, it returns an escalation prompt instead of a reply; on customer confirmation, a follow-up ticket is created for the email-side team.

Identity verification flow

For sensitive context, Ticket0 uses email OTP verification:

  1. Visitor requests verification.
  2. System emails a 6-digit code (expires in 10 minutes).
  3. Visitor submits code (max 3 attempts).
  4. On success, the session is marked verified and AI can use verified customer context.

Without verification, AI operates in knowledge-base-only mode for that widget session.

Escalation in widget

If AI cannot answer confidently, it offers escalation in chat.

  • If the visitor confirms, Ticket0 creates a new email-source ticket for human follow-up. The new ticket is seeded with an AI-generated summary of the chat, the escalation reason, and a link back to the original chat session.
  • The chat ticket and the new email ticket are bidirectionally linked, so operators can jump between them from either side.
  • The chat session stays open — the AI keeps answering follow-up messages in the widget while your team works the email ticket.
  • The new email ticket gets escalation tags/priority based on reason code, and is auto-assigned to the least-loaded operator when auto-assign is enabled.
  • The visitor receives a clear in-chat confirmation that support will follow up by email.

The Live Chat list surfaces escalation badges, quality flags, and negative-feedback counts so you can spot sessions that need attention. Clicking through opens the chat history (read-only) and links to the spawned email ticket when one exists. Reach all escalated chats from Live Chat → Escalated.

Feedback loop from widget

Customers can rate AI replies with thumbs up/down. Those ratings feed quality monitoring and help prioritize review.

Continue with Correcting the AI.

On this page