Run your workspace
Live human handoff
Visitors who hit a wall with the AI agent can ask for a human and actually get one — in real time, using the same Conversations menu your team already uses to read transcripts.
Visitor flow
- The agent (on the help-center vertical, or via a curated answer you've configured) shows a Connect me with a human pill in its reply.
-
The visitor clicks the pill. Two things happen instantly:
-
The conversation is flagged with a
human_requested_attimestamp on the server. - The lead-capture form opens so the visitor can leave their email — useful if they navigate away before an operator joins, so your team can follow up out-of-band.
-
The conversation is flagged with a
- The widget shows a "Connecting you with someone…" banner. Until an operator claims the conversation, the bot is silent — every subsequent visitor message is queued for the operator instead of getting an LLM reply.
- When an operator claims, the banner flips to "Sarah joined the chat" (or "An agent joined" if you've turned off personalization in workspace settings — see below).
- The operator's replies appear inline as chat bubbles with an "Operator" label. The visitor's messages flow back to the operator's console live (3-second polling).
Operator flow
- The Conversations sidebar entry shows a red badge with the count of conversations waiting for a human.
- Open /app/conversations and switch to the Needs human filter pill. Each row shows when the visitor clicked the human button, what page they're on, and their captured email if any.
- Click into a row → the thread shows live messages. Click Claim at the top right to take the conversation.
-
While you have the conversation claimed:
- The bot will not auto-respond.
- Use the reply box at the bottom (Cmd / Ctrl + Enter sends).
- Visitor messages appear in real time — the page polls every 2 seconds while you're claimed.
- Click Release when you're done. The bot resumes on the next visitor message; the conversation history stays intact for analytics + future reference.
Workspace settings
A few knobs live in Settings on the workspace level:
- Live chat personalize (default ON). When on, the visitor sees the operator's real name in the joined banner. Turn it off for regulated industries (legal, healthcare, finance) where individual operator identities shouldn't be exposed — the visitor sees "An agent from <Brand>" instead.
Notifications
Every captured lead fires the existing notification cascade (lead-captured email, in-dashboard sonner toast, browser push for members who opted in). The same triggers apply when a visitor requests a human — the lead form firing is the canonical signal.
Smart routing (Phase 2)
When a visitor clicks Connect me with a human, the server picks one of three responses based on operator availability and your business hours:
- Queued. An operator is online and within your business hours. The visitor sees "Connecting you with someone…", the conversation gets flagged, and the bot stays silent until claimed.
- Offline — no operators around. Within business hours but nobody's marked themselves Receive live chats in their profile (or no admin tabs are open). Visitor sees "No one's around right now — drop your email and we'll reach out." The conversation is not flagged; the bot resumes normally on the visitor's next message.
- Offline — after hours. Outside the business hours you've configured. Visitor sees "We're closed right now. We're back <day at time>. Drop your email and we'll follow up first thing."
Operator opt-in
Each workspace member sets their availability individually in Profile settings:
- Receive live chats checkbox — when on AND your admin tab has been active in the last 2 minutes, you count as an available operator.
- Heartbeat fires every 60s while the tab is in the foreground, pauses when the tab is hidden.
Business hours
Configure in Settings → Live chat. JSON-edited for now (a visual grid editor lands in the next release):
{
"enabled": true,
"timezone": "America/New_York",
"schedule": {
"monday": [{"start": "09:00", "end": "17:00"}],
"tuesday": [{"start": "09:00", "end": "17:00"}],
"wednesday": [
{"start": "09:00", "end": "12:00"},
{"start": "13:00", "end": "17:00"}
],
"thursday": [{"start": "09:00", "end": "17:00"}],
"friday": [{"start": "09:00", "end": "17:00"}],
"saturday": [],
"sunday": []
}
}
- Day keys lowercase. 24-hour
HH:mm. Empty array = closed all day. - Multiple windows per day are supported (e.g. lunch break).
- Timezone is any IANA identifier — the server validates against PHP's tz database.
- Set
"enabled": false(or leave the whole field blank) to stay always-on.
Slack / Teams notifications
In Settings → Live chat, paste an incoming-webhook URL for either platform. When a visitor asks for a human, a queued listener fires a compact ping with the conversation URL so an operator can jump straight in from Slack / Teams without opening the dashboard.
-
Slack — uses the standard
incoming-webhookURL from the Slack app config. Slack auto-unfurls the conversation link. - Microsoft Teams — incoming-webhook URL from the Teams channel connector. We post as a MessageCard with an "Open conversation" button.
Auto-fallback for unclaimed conversations
Visitors should never sit on a "Connecting you…" bubble forever.
A scheduled job runs every minute and clears the
human_requested_at flag on any conversation that's
been waiting more than 5 minutes without a claim. The bot drops a
closure note ("Looks like everyone's busy at the moment — leave
your email and we'll follow up") and resumes auto-replying.
Operator polish (Phase 3)
Canned replies
Save the replies your team types over and over (password reset instructions, refund policy, shipping ETAs) at Settings → Canned replies. Each entry has a short label (what operators search by) and the full reply text. Reorder with the up/down handles — most-used replies should sit at the top.
In any live conversation, click the Canned reply button above the textarea. Fuzzy-search the label or content, pick one, and the textarea fills in. The operator can edit before hitting Send.
Internal notes
Toggle the reply box from Reply to Internal note (the textarea turns amber). Internal notes are visible to other operators in the conversation thread but never sent to the visitor. Useful for handoff context: "Visitor seems frustrated — I tried X already, please pick up." Auto-generated transfer audit messages also use this role.
Typing indicators
Both directions, no setup required:
- The visitor sees "<Operator> is typing…" above their chat while you're typing in the operator console.
- The operator sees a three-dot bubble in the message log while the visitor is typing in the widget.
Implemented as 5-second self-expiring server-side timestamps; both sides poll the existing endpoints, so no extra infrastructure is needed.
Conversation transfer
Click the Transfer button in the reply bar. Online teammates surface at the top with a green "Online" badge; offline teammates are still listed (you may want to hand off to someone who'll claim later). Picking a target reassigns the claim, broadcasts to the visitor's widget so the "joined the chat" banner refreshes to the new operator's name, and drops a system note in the thread for context.
Business-hours grid editor
The Phase 2 JSON textarea is replaced by a visual 7-day grid at Settings → Live chat. Click the "+ Window" button on any day to add another open block (lunch break, split shifts), or check "Closed" to take that day off. Timezone picker has the 15 most common IANA zones plus a "Custom…" option for any zone PHP recognizes.
Tags + ratings + UI rebuild (Phase 4)
Conversation tags
Categorize conversations so your team can filter and report on them. Manage the list at Settings → Tags: each tag has a label (max 60 chars) and a hex color that drives the chip background.
In any conversation thread, the end-side panel has a Tags section. Click a chip's × to detach; + Tag opens a fuzzy-search dropdown of unselected workspace tags.
Conversations list: a "Tags" select dropdown joins the existing Needs human / Live now filter pills. Each row also surfaces applied tags as compact chips alongside the existing badges.
Satisfaction ratings
After an operator releases the conversation, the visitor sees a "Was this helpful?" prompt with thumbs up / down buttons + an optional comment field. The first rating is locked server-side; later submissions update the comment only — buyers complained about Intercom-style "rating overwritten" surprises.
Operator side: the end-pane context panel surfaces the rating + comment under the visitor card. The Conversations list also shows a 👍 / 👎 chip on each row when a rating exists.
Conversation thread UI rebuild
The thread page is now a true help-desk surface:
- Two-pane layout on desktop (≥ md) — chat on the left, context sidebar on the right. The sidebar collapses to a Sheet drawer with a "Details" button on mobile.
- Right-pane sidebar sections: visitor (anon ID, language, returning flag, page URL with link icon), lead (email mailto / phone tel: links), tags, satisfaction signal, timing tile (claim age / waiting time / started-at).
- Compact unified action bar at the top: live pill, status badges, claim / release / force-release buttons in one cluster.
- Composer stays at the bottom with Reply / Note tabs, canned reply picker, transfer dropdown, and typing debouncer (all carried over from Phase 3).
Routes shipped (cumulative)
POST /app/conversations/{id}/note— internal notePOST /app/conversations/{id}/typing— operator typing hintPOST /app/conversations/{id}/transfer— reassign claimPOST / DELETE /app/conversations/{id}/tags/{tagId}— attach / detach tagPOST /api/v1/widget/typing— visitor typing hint (JWT)POST /api/v1/widget/satisfaction— visitor rating (JWT)GET / POST / PATCH / DELETE /app/settings/canned-replies/…— CRUD + reorderGET / POST / PATCH / DELETE /app/settings/tags/…— workspace tag CRUD