![Ringle](assets/ringle-logo.png)

# Demo helpdesk and escalations

## Purpose
Try out the helpdesk side of your demo workspace. See the mock support inboxes and agents, fire a test escalation to prove the pipeline works, and handle the resulting tickets in the ticket list and detail dialog.

## Prerequisites
- A demo workspace. The examples use the Ecommerce/Retail sector; that is the sector whose OMS panel includes a Helpdesk tab.
- The helpdesk here is a mock: escalations create demo tickets, not real support cases, so it is safe to test freely.

## Steps

### Step 1

![demo-helpdesk, step-01](screenshots/demo-helpdesk/step-01.png)

**Action:** Click Helpdesk in the workspace sidebar.

**What you should see:** The Helpdesk page opens. It explains that it tests escalation without a live helpdesk account. Two cards show the mock helpdesk directory: Inboxes (General Support, Billing, Technical) and Agents (three demo agents with email addresses). Below them are a Test Escalation button and a Tickets card that lists the workspace's helpdesk tickets. In a fresh workspace the Tickets card reads "No helpdesk tickets yet. Tickets will appear here during conversations."

### Step 2

![demo-helpdesk, step-02](screenshots/demo-helpdesk/step-02.png)

**Action:** Click Test Escalation. Review the result, then click Close.

**What you should see:** A green "Escalation created successfully" banner appears. An "Escalation Created" dialog summarizes the new ticket: its id and the status "open", plus a note that the ticket now appears in the ticket list below. This simulates a customer conversation escalating to a human. In production the same call creates a real helpdesk conversation that carries the full AI transcript.

### Step 3

*Screenshot not available (the demo Tickets card does not render created tickets on prod at capture time, so the row cannot be opened)*

**Action:** Find the new ticket in the Tickets card. Each row shows the subject, a status chip, the ticket number, the customer, and a note count. Click the ticket's row.

**What you should see:** A ticket detail dialog opens, titled with the ticket number. It shows the subject with its status chip, the customer, channel, and creation time, and the description. A Notes section has an "Add a note..." field and an Add button for leaving internal notes. A Close Ticket button at the bottom closes the ticket; it is disabled once the ticket is already closed. Done dismisses the dialog without changing anything.

### Step 4

![demo-helpdesk, step-04](screenshots/demo-helpdesk/step-04.png)

**Action:** Open Chat in the sidebar. Click the Helpdesk tab in the OMS panel on the right. To drive an escalation from a conversation, start one and ask for a human, for example "I want to speak to a human about a refund". The assistant collects your name, email, and the issue before handing off.

**What you should see:** The Helpdesk tab sits alongside Orders and Subscriptions in the OMS panel. It is the same ticket list used on the Helpdesk page, and it refreshes itself every few seconds. When tickets are present, each row shows the subject, a status chip (open, pending, or closed), the ticket number and customer, and a note count, and clicking a row opens the ticket detail dialog. At capture time the list is not yet displaying created tickets on the demo workspace (a known issue being addressed), so the tab shows "No helpdesk tickets yet. Tickets will appear here during conversations."

## Troubleshooting
- A ticket you created does not appear in the Tickets card or the chat panel's Helpdesk tab: this is a known display issue at the time of writing. The escalation still succeeds and the ticket is created; the list view is being fixed.
- The Inboxes or Agents card says none are available: the mock helpdesk data is still seeding. Refresh the page after a few seconds.
- A red "Failed to create escalation" banner appears: the request did not go through. Retry; if it persists, sign out and back in.
- Close Ticket is greyed out in the detail dialog: the ticket is already closed. Closed tickets stay in the list with a closed status chip.

## Notes
- Route: `/demos/:demoWorkspaceId/helpdesk`. Source component: `pages/demo-workspace/DemoWorkspaceHelpdesk.jsx` in the portal app.
- The ticket list (`components/demo-workspace/oms-panel/OmsHelpdeskTab.jsx`) renders in two places: the Tickets card on the Helpdesk page and the Helpdesk tab of the Chat/Voice OMS panel. The panel tab exists only for Ecommerce/Retail workspaces; Restaurant workspaces get an orders-only panel and booking sectors have no panel.
- Ticket rows show a note count when notes are attached, whether by the assistant during a conversation or by you from the detail dialog.
- Everything on this page is mock data. Test Escalation never contacts a real helpdesk or a real customer, and closing or annotating a demo ticket affects nothing real.
