# Set up the Live Chat: Support widget

Put a support chat inside your product or members area, keep visitors' conversation history, and learn how identity works.

Source: https://support.rework.com/article/prospect-livechat-support

**Live Chat — Support** is the chat widget for people who are already your customers: the help button inside a product, a members area, or a logged-in dashboard. It ships the same widget as the Sales variant but behaves differently. Visitors keep a list of their past conversations, and you can verify who they are so that list follows them from one device to another.

## Create the widget

1. Go to **Settings** › **Channels** **(1)** and click **Connect Channel** **(2)**.
   
   ![Settings Channels page with the Channels menu item (1) and the Connect Channel button (2) highlighted](https://storage.googleapis.com/reworkv3-public/success/260928/iOhEB8sJZqWX6rI8jwpiMqWol1N8uBCK1bpxTLJncs1EajCdiNkVWKr2m5MHDbVi/img.uJUwtmZCAKf4Cz3e0KHxB2bLOSJS6MlBxcQDqZVcdgZtMgHGW9BZ1Y0hlXlfQrid.png)
2. Pick **Live Chat — Support** **(1)** from the list of providers.
   
   ![Connect Channel provider grid with the Live Chat — Support card highlighted (1)](https://storage.googleapis.com/reworkv3-public/success/260928/EcnZH2MEVSxGRkJfdtosgQ3STUKFj5IsTGgp3zI0hTcVfqkbNDRNCWfA3uQWLsgR/img.WARXP8oiVhmcKfkoKGdv6kImzPMXlIq7zZMr3uYL1GmScl9LQVcAxWdCkzTGZds8.png)
3. Choose the Service in **Connect to service** **(1)**. The dialog then shows the setup steps for a Support widget.
   
4. Type a **Widget name** **(2)** and click **Create widget** **(3)**.
   
   ![Live Chat — Support connect dialog with Connect to service (1), Widget name (2) and the Create widget button (3) highlighted](https://storage.googleapis.com/reworkv3-public/success/260928/96tmVryRNukiTv1mcDf51o6TCU0bo5gCQKB4tMCbhOnGYk7d4oV7Hb8lNkyOH7Jr/img.ROOmK4mQ8ewymELXWy1o8RCnMFSsB3YI16RuNb4Bohnu75SLPAcyImKPRbmZXgVM.png)

Prospect creates the widget and takes you to its setup page, which has two tabs: **Setup** and **Install**. The address of the page you're on is added to **Allowed website origins** as a starting point.

To come back later, open **Settings** › **Channels**, open the row menu on the widget and choose **Edit widget**.

> **Warning:** The widget secret is shown on the **Install** tab once, immediately after the widget is created, and never again. You need it to sign visitor identities, so copy it somewhere safe now. Replacing a lost secret means **Rotate widget secret**, which invalidates every visitor token currently in circulation.

## Install it on your site

Open the **Install** tab and copy the snippet under **1\. Copy the install snippet** with its **Copy** button. Take it from the page rather than retyping it, since it already carries this widget's id and your Prospect address:

`<!-- Prospect LiveChat -->`  
`<script>`  
`window.LiveChatSettings = { widget_id: "your-widget-id" };`  
`</script>`  
`<script async src="https://your-prospect-domain/public/livechat/widget/v1/loader.js"></script>`

Paste it just before the closing `</body>` tag on every page (or every screen of your app) where the widget should be reachable.

Then list the places allowed to use it. On the **Setup** tab, open **Identity** and add each one to **Allowed website origins**: type an origin such as `https://app.acme.com` and press Enter, up to 25 of them. A request from an origin that isn't on the list is rejected, so the widget loads but never opens a conversation.

Under **2\. Verify installation**, each allowed origin reads **Waiting…** until a visitor has loaded the widget there, then **Detected**. It reverts if nobody loads it there for 24 hours. **Open hosted test page** gives you a working page with the widget on it for comparison.

### Placing it inside an app

There's no separate embedded build. The widget always mounts itself as a floating launcher in the corner you configure, on top of whatever is on the page. To make it feel like part of your app, drive it from your own code instead: once the script has loaded, `window.LiveChatWidget` exposes `show()`, `hide()`, `open()`, `close()` and `toggle()`, so you can hide the default launcher and open the panel from your own help button 💡

## Configure appearance and behaviour

The **Setup** tab is a set of collapsible sections with a **Live preview** beside them that redraws as you type. Nothing is stored until you click **Save changes**; while edits are pending, the bar reads **Unsaved changes**. The screens are the same as on a Sales widget, so the [Sales article](https://support.rework.com/article/prospect-livechat-sales) has annotated screenshots of each section.

### Appearance

**Primary color**, **Position**, **Theme**, **Launcher icon**, **Launcher image** and **Widget logo** work exactly as they do on a Sales widget, and so do the clamped size fields: **Panel width (px)** accepts 300–600, and **Panel height (px)** accepts 400–860.

There's one difference: **AI accents** (a **Glowing ring around the avatar** and **Pulsing waves on the chat button**) are off by default on a Support widget. Turn them on if you'd like them.

### Messaging & behavior

**Header title** and **Header subtitle** sit at the top of the panel, with the title falling back to the widget name. **Greeting** is what someone sees the moment they open the chat: either **Text**, or **Message template** to greet them with quick replies, buttons or a card. Only those three template kinds can be used as a greeting. **Language** sets the language of the widget's own labels, and **Behavior** offers **Auto-open the chat panel when the page loads**.

### Popup, pre-chat form and channels

**Popup** (a card shown near the launcher, with a **Delay** of 0–300 seconds and up to two **Buttons**) and **Pre-chat form** (up to 8 questions, each mapped to a prospect field or left unmapped) are identical to the Sales widget. The [Sales article](https://support.rework.com/article/prospect-livechat-sales) describes both field by field.

**Channels** lists up to 8 other apps people can reach you on. On a Support widget, these appear as a row across the top of the chat body next to a **Message** pill for the built-in thread, so nobody has to leave the panel to choose. The **Launcher action** setting doesn't apply here: a Support launcher always opens the chat.

## Identify your visitors

There are three ways a visitor can be known to a Support widget.

**None.** The default. The visitor is anonymous, gets a name like _Visitor 1a2b3c_ until a pre-chat form or an agent fills one in, and their history lives in that one browser. Nothing to configure.

**HMAC.** Your server hashes the user's id with the widget secret and hands the widget the id and the hash together. It's the simpler of the two verified options.

**JWT.** Your server signs a short-lived token containing the user's id, email and name. Use this when you want to pass more than an identifier and want the identity to expire on its own.

Both signing methods use the widget secret from the **Install** tab, and both must run on your server. The secret must never reach the browser. The samples are shown under **4\. Identity verification (optional)**:

`// Server (Node.js)`  
`const jwt = require('jsonwebtoken')`  
`const token = jwt.sign({`  
`external_id: String(user.id),`  
`email: user.email,`  
`name: user.name,`  
`created_at: Math.floor(user.createdAt.getTime() / 1000),`  
`}, WIDGET_SECRET, { algorithm: 'HS256', expiresIn: '4h' })`  
  
`// HTML`  
`window.LiveChatSettings = {`  
`widget_id: '<widget_id>',`  
`identity_jwt: token,`  
`}`

`// Server (Node.js)`  
`const crypto = require('crypto')`  
`const userHash = crypto.createHmac('sha256', WIDGET_SECRET)`  
`.update(String(user.id)).digest('hex')`  
  
`// HTML`  
`window.LiveChatSettings = {`  
`widget_id: '<widget_id>',`  
`user: { user_id: String(user.id), email: user.email, name: user.name },`  
`user_hash: userHash,`  
`}`

> **Note:** Identity verification isn't finished yet. The widget script as it ships doesn't yet pass the signed identity through to Prospect on its own, so following these samples won't currently produce an identified visitor. Generate and store your secret now, and check with whoever runs your Prospect installation before you build a workflow that depends on identified visitors.

### Conversation history

A Support widget keeps more than one thread. When a visitor has past conversations, a button appears in the panel header that opens **Conversations**: the most recent 30, newest first, each showing its last message and when it happened. Opening one shows it read-only, with a banner explaining that they need to start a new conversation to send anything. The live thread keeps running underneath, so nothing is lost by browsing. **Back to current conversation** returns them to it.

For an anonymous visitor, that history is tied to the browser they used. Identifying them is what makes it follow them to a second device.

### Restore tokens

**5\. Restore tokens** on the **Install** tab lists the tokens that let an identified visitor resume a chat somewhere new. One is issued the first time a visitor identifies, and the raw token is shown to the visitor once and never stored. The list shows you who it belongs to, when it was issued and when it expires, and whether it's **active**, **expired** or **revoked**. Use **Revoke** on a single token if a visitor tells you theirs has leaked; the others stay valid. Rotating the widget secret invalidates everyone's at once.

## Troubleshooting

| What you see | What it means |
| --- | --- |
| The launcher never appears | The snippet is missing from that screen. Compare against **Open hosted test page**. |
| The launcher appears but the chat never starts | The origin isn't in **Allowed website origins**. Add it exactly as the browser reports it. |
| An origin stays on **Waiting…** | Nobody has loaded the widget there in the last 24 hours. |
| _No allowed origins configured yet. Add at least one in the Setup tab._ | The widget has no origins at all and can't work anywhere. |
| A visitor loses their history when they switch device | That's expected while they're anonymous: anonymous history lives in one browser. |
| _No restore tokens issued yet. One is minted automatically the first time an identified visitor connects._ | Nobody has identified against this widget yet. |
| Everyone is signed out of the widget at once | Somebody used **Rotate widget secret**. Every visitor token issued before the rotation stops working. |
