> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trypopcorn.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up Website chat

> Add Website chat to your website or store, set its name, messages and design, and show it on your storefront.

Website chat puts your AI agent on your own website as a chat bubble. Visitors chat without WhatsApp or a phone number, the same agent answers from the same knowledge bases, and every conversation lands in your Inbox. Use it for support and sales on your storefront, landing pages or help centre.

## Before you start

* A published agent. Website chat is answered by your workspace's default agent unless you install an agent-specific snippet (see "Which agent answers" below).
* Access to your website's HTML or your store platform's custom-code setting, unless you use **Show on my store** with the storefront script already installed.
* Credits. AI replies in Website chat use credits the same way WhatsApp replies do. When your credits run out, conversations are handed to your team until you top up (see [Plans and credits](https://docs.trypopcorn.ai/billing/plans-and-credits.md)).

## Configure the chat

Go to **Integrations** and open **Website chat**. The page has two tabs, **Chat** and **Design**, and a **Preview** panel ("Shows your changes before you save them.") that reflects your changes as you make them. Click **Save changes** in the bar that appears, or **Discard** to revert. If you can only view the page, it says "You can view these settings. Ask an admin to change them."

### Chat tab

| Section | Field | What it does |
| - | - | - |
| (top) | **Show on my store** | "Adds the chat to your connected store for you. Turn off to show it only on pages where you pasted the embed code." Only an admin can turn it on or off. |
| **General** | **Chat title** | Shown at the top of the chat window. |
| | **Reply name** | Shown next to each reply. |
| | **Welcome message** | The first message customers see when they open the chat. |
| | **Fallback reply** | Sent when your agent can't answer a question. |
| | **Brand description** | One sentence about what your store sells. |
| **Suggested questions** | **Question 1** to **5** | Up to five questions customers can tap to start a chat. Click **Add question** to add one, or the remove button to delete it. At five, the page says "You've added the maximum of 5 questions". |
| **Sources** | **Show sources** | "Let customers see where an answer came from." |
| | **Show sources by default** | Appears once **Show sources** is on; shows the sources under every answer without the customer asking. |

### Design tab

* **Avatar**: pick one of the five built-in avatars, or choose **Upload your own** (JPEG, PNG, GIF or WebP). It appears in the chat header and next to each reply.
* **Chat button icon**: pick one of the six built-in icons, or upload your own. This is the button visitors tap to open the chat on your website.

An uploaded image goes into the form like any other change: it reaches your website chat when you click **Save changes**, and you see **Website chat saved**. If an upload fails you see **Couldn't upload the image**.

## Install the chat

There are two ways to put the chat on a site, and they can be combined.

### Paste the embed code

**1. Copy the code**

Click **Get embed code** at the top of the page. The dialog **Add website chat to your website** says "Paste this code before the closing `</body>` tag on every page where it should appear." Click **Copy code**.

**2. Add it to your pages**

Paste the snippet just before the closing `</body>` tag of every page that should show the chat, or into your store platform's custom-code or scripts setting so it loads on all pages.

**3. Check the site**

Open your site. The bubble appears in the bottom-right corner; click it to open the chat and send a test message. The conversation appears in your Inbox with the source **Website widget**.

The snippet identifies your workspace only. The title, messages, avatar and icon are read from Popcorn each time the chat loads, so later changes need no re-installation.

### Show it on your connected store

If the storefront script from the WhatsApp button is already installed on your store, you do not need a second snippet. Turn on **Show on my store** and save: the same script loads Website chat alongside, or instead of, the WhatsApp button, and you can switch between the two channels from Popcorn at any time. See [Add a WhatsApp button to your website](https://docs.trypopcorn.ai/channels/whatsapp-button.md). If saving the switch fails you see "Couldn't change whether the chat shows on your store"; your other changes are saved, so save again to retry it.

## What visitors see

* A round bubble in the bottom-right corner of the page, showing your **Chat button icon**. On phones it sits closer to the edge.
* Clicking it opens the chat panel: about 400 pixels wide on desktop, nearly the full screen width on phones.
* The panel opens with your **Welcome message** and, underneath it, your suggested questions.
* Replies are labelled with the **Reply name** and show the avatar you chose on the **Design** tab.
* Closing the panel brings the bubble back; the conversation continues where it left off.

## Which agent answers

The snippet from **Integrations → Website chat** uses your workspace's default agent. To bind Website chat to a specific agent, open that agent, go to its **Channels** tab and copy the code under **Website chat widget**. See [Connect knowledge, tools and channels](https://docs.trypopcorn.ai/agents/connect-knowledge-tools-channels.md).

## How Website chat conversations work

* A visitor's first message creates a customer record and a conversation in the **Inbox**, listed under the source **Website widget**. See [Inbox overview](https://docs.trypopcorn.ai/inbox/overview.md).
* When a teammate replies from the Inbox, the visitor sees the reply in the chat immediately.
* Messages never go through WhatsApp: there is no 24-hour window, WhatsApp message templates do not apply, and media files cannot be sent from the Inbox to a Website chat conversation.
* Only one Popcorn widget loads per page. If a page already has one (for example the storefront script with **Show on my store** on), a second snippet is ignored.

## Test it before going live

Use the **Preview** panel on **Integrations → Website chat**: it is a working chat with your agent that reflects your title, messages and design as you edit them. To test the agent's answers in depth, use the agent's test chat (see [Test and publish](https://docs.trypopcorn.ai/agents/test-and-publish.md)).

## Related

* [Channels overview](https://docs.trypopcorn.ai/channels/overview.md)
* [Add a WhatsApp button to your website](https://docs.trypopcorn.ai/channels/whatsapp-button.md)
* [Channel troubleshooting](https://docs.trypopcorn.ai/channels/troubleshooting.md) if the bubble does not show


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.