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

# Text chat and the OMS panel

## Purpose
Run a live text conversation with your workspace's AI assistant and follow along in the OMS panel. The panel shows the demo orders, subscriptions, and helpdesk tickets the assistant is working against.

## Prerequisites
- A demo workspace with the Ecommerce/Retail sector (this guide's examples). Restaurant workspaces show a reduced panel, and booking workspaces show none. See Notes.
- Demo data seeds automatically. Conversations here never message real customers.

## Steps

### Step 1

![demo-chat-and-oms-panel, step-01](screenshots/demo-chat-and-oms-panel/step-01.png)

**Action:** Click Chat in the workspace sidebar, or the Start chat button on the dashboard.

**What you should see:** The Text Chat page opens with a Connected status chip, a Language selector, and a Start Conversation button. The message box is disabled until a conversation starts. On the right, the OMS Panel shows an Editable chip and three tabs: Orders, Subscriptions, and Helpdesk. The Orders tab has a Create Order button and the seeded demo orders, each with a status chip like Processing or Delivered. A chevron between the two areas collapses or restores the panel.

### Step 2

![demo-chat-and-oms-panel, step-02](screenshots/demo-chat-and-oms-panel/step-02.png)

**Action:** Pick a language if you want something other than the default. Click Start Conversation.

**What you should see:** The assistant greets you and asks for your name. The Start button becomes a red Stop button, and the language selector locks for the session. The message box activates, and the OMS Panel chip flips from Editable to Live.

### Step 3

![demo-chat-and-oms-panel, step-02](screenshots/demo-chat-and-oms-panel/step-02.png)

**Action:** Chat with the assistant about the demo data. Give a name that appears on the orders in the panel (for example Sam Johnson). Ask about an order. Quote its number from the Orders tab if you want a precise answer.

**What you should see:** The assistant answers from the same data you see in the panel: order status, the items in it, and the total. It then offers relevant next actions such as cancelling. If it proposes an action you did not ask for, answer no. Nothing changes until you confirm.

### Step 4

![demo-chat-and-oms-panel, step-03](screenshots/demo-chat-and-oms-panel/step-03.png)

**Action:** Click the Subscriptions tab in the OMS panel.

**What you should see:** The tab lists the demo subscriptions with their status (active, paused, cancelled) and billing amount. While a conversation is live, the panel is read only and refreshes on its own. Management actions return when the conversation ends.

### Step 5

![demo-chat-and-oms-panel, step-04](screenshots/demo-chat-and-oms-panel/step-04.png)

**Action:** Click the Helpdesk tab.

**What you should see:** The tab lists helpdesk tickets. In a fresh workspace it reads "No helpdesk tickets yet. Tickets will appear here during conversations." Tickets show up here when a conversation escalates to support.

### Step 6

![demo-chat-and-oms-panel, step-05](screenshots/demo-chat-and-oms-panel/step-05.png)

**Action:** Click Stop to end the session.

**What you should see:** The transcript stays on screen with a "Conversation ended" marker at the bottom. The marker notes the end reason, for example client_end after you click Stop. The message box disables, and the Start Conversation button returns. The OMS panel goes back to Editable, so you can add or edit demo orders before the next run.

## Troubleshooting
- The assistant replies that something went wrong and offers to connect you with someone: a lookup failed on that turn. The session is still live. Ask again or reword the question (quoting the order number helps).
- The status chip is stuck on Connecting: the realtime connection has not come up. Refresh the page. If it persists, sign out and back in.
- The assistant asks you to confirm cancelling an order you wanted to keep: it misread the request. Answer no or "do not cancel" and the order is left untouched.
- There is no panel to the right of the chat: your workspace's sector does not have an order surface (see Notes), or the panel is collapsed. Look for the chevron at the left edge of where the panel would be.

## Notes
- Route: `/demos/:id/chat`.
- Source components: `pages/demo-workspace/DemoWorkspaceChat.jsx` (chat page) and `components/demo-workspace/ConversationOmsPanel.jsx` (the panel) in the portal app.
- Sector gating: Ecommerce/Retail workspaces get the full OMS Panel with Orders, Subscriptions, and Helpdesk tabs. Restaurant workspaces get a POS Panel with an Orders tab only. Appointment and booking sectors (for example Auto Shop) have no order surface, so the panel does not render at all.
- Demo workspaces run against mock backends, and outbound messaging is stubbed. Chatting, cancelling demo orders, or creating demo orders affects nothing real.
- The panel is editable between conversations (Create Order, per-order Actions) and read only with automatic refresh while a conversation is live.
