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

# Webchats

> Web chat widgets for your website.

Chat on your websiteDesigned to match your brandOne snippet to install

## **What is a webchat?**

A webchat is the chat bubble in the corner of your website. Visitors select it, ask their question and get an answer from your agent straight away, without leaving the page or picking up the phone.

In Myna, each chat bubble is a **widget**. You design how it looks and behaves in Settings, paste one line of code into your website, and connect it to an agent. Every visitor who chats becomes a contact, and their conversation appears in [Conversations](https://myna.cx/docs/platform/explore/conversations.md) alongside your text messages.

To open your widgets, select **Settings** at the bottom of the sidebar, then **Webchats** under **Communications**.

![The Webchats page with one widget assigned to an agent](https://mintcdn.com/myna-8262a91b/Tuar1ERtE9Pcx59e/images/settings/webchats.png?fit=max\&auto=format\&n=Tuar1ERtE9Pcx59e\&q=85\&s=cef3bad8f8e07f7bc21df676d46b124a)

> [!NOTE]
>
> Webchats are part of **Integrations** in role permissions, so workspace owners and admins can manage them by default.

## **How do I set up a webchat?**

Getting a webchat live takes four steps:

**1. **Create a widget****

Select **New widget**, or **Create your first widget** if you don't have one yet. Myna creates it straight away, named **Website chat**, and opens it. Select the name at the top to rename it.

**2. **Design it****

Use the **Appearance** and **Behaviour** tabs to match your brand and decide how the chat opens. The preview on the right updates as you go.

**3. **Connect it to an agent****

Open the agent that should answer, go to its **Channels**, turn on **Web Chat** and choose the widget under **Assigned Webchat**.

**4. **Install it on your website****

Copy the snippet from the **Installation** tab and paste it into your website, then add your website under **Security**.

> [!WARNING]
>
> A widget goes live as soon as it exists. There's no publish step, and every change saves on its own a moment after you make it. The status next to the preview shows **Saving…** and then **Saved**.

## **How do I make it look like my brand?**

The **Appearance** tab covers everything visitors see. The preview on the right is the real widget at full size, and you can type in it to try it out. It always replies with a demo message, so testing costs nothing.

![The Appearance tab with the live preview](https://mintcdn.com/myna-8262a91b/Tuar1ERtE9Pcx59e/images/settings/webchat-appearance.png?fit=max\&auto=format\&n=Tuar1ERtE9Pcx59e\&q=85\&s=b845d217d0ba0324c474c3a26264afb0)

> [accordion] Theme
>
> * **Color mode:** **Light**, **Dark** or **Match system**, which follows the visitor's device.
> * **Primary color:** your brand colour, used for the header, the launcher and the visitor's messages. Type a hex code, pick from the presets, or use the eyedropper to copy a colour from your screen.
> * **Style:** **Solid**, **Gradient** or **Grid**. Gradient and Grid use a **Secondary color** too.
> * **Font style:** **Inter**, **Manrope**, **Geist**, **Georgia** or **Monospace**.
> * **Font size:** **Small**, **Medium** or **Large**, for the messages.

> [accordion] Launcher
>
> The launcher is the button that opens the chat, in the bottom right corner of your website.
>
> * **Launcher style:** **Icon**, **Text** or **Icon + text**.
> * **Launcher text:** the words on the button, such as **Chat with us**.
> * **Launcher icon:** one of eight icons, from a chat bubble to a smile.
> * **Launcher image (optional):** your own image instead of an icon. A 120 × 120 px square PNG with a transparent background works best.

> [accordion] Header
>
> The bar at the top of the open chat.
>
> * **Header text:** the title, such as **Chat with us** or your business name.
> * **Header image:** a small image beside the title. If you leave it empty, the header uses the launcher icon.
> * **Show "Online" status:** adds a green dot and **Online** under the title.

> [accordion] Welcome message
>
> How the chat greets visitors when it opens.
>
> * **Welcome style:** **Banner** shows a centred welcome with an optional round image, **Chat** shows it as the first message, and **None** shows nothing.
> * **Welcome text:** the greeting, such as **How can we help today?** Select **\{ }** to add your business details, such as your phone number, from your [Business Profile](https://myna.cx/docs/platform/explore/settings/business-profile.md).

> [accordion] Agent avatar
>
> * **Show avatar:** shows a picture beside the agent's messages. It uses your persona's picture unless you upload an **Avatar image**.
> * **Show name:** shows the persona's name under each message.
> * **Show reply time:** shows when each reply was sent.

> [accordion] Composer
>
> The box visitors type in.
>
> * **Message placeholder:** the grey hint, such as **Type your message...**
> * **Dictation:** adds a microphone so visitors can speak instead of type, in browsers that support it.
> * **File attachments:** lets visitors send photos and documents. The agent can understand images, which helps when someone wants to show you a problem.

> [accordion] Footer
>
> * **Show "Powered by Myna":** the small credit at the bottom of the chat. You can turn it off.
> * **Disclaimers:** a short notice under the box, such as **Generated by AI, double-check for accuracy.**
> * **Footer links:** up to five links, such as your privacy policy.

> [!TIP]
>
> Images you upload for the launcher, header, banner or avatar can be PNG, JPEG or WebP, up to 1.5 MB each.

## **How do I control how it behaves?**

The **Behaviour** tab decides how the chat starts and what visitors see along the way.

![The Behaviour tab with message status settings](https://mintcdn.com/myna-8262a91b/Tuar1ERtE9Pcx59e/images/settings/webchat-behaviour.png?fit=max\&auto=format\&n=Tuar1ERtE9Pcx59e\&q=85\&s=7cdfc8c49d445803c2805a59ad22d197)

### **Popup message**

Turn on **Show popup message** to show a small message beside the closed launcher, such as **Hi! Have a question? We're here to help.** It appears after the **Delay (seconds)** you choose, 5 seconds by default.

Add up to six **Suggested prompts**, such as **What are your opening hours?** They appear as buttons visitors can tap instead of typing.

### **Message status**

* **Show Delivered** and **Show Read:** small labels under the visitor's messages that reassure them their message went through. **Read** appears after the **Read delay (seconds)** you set.
* **Show typing effect:** an animation while the agent is writing its reply. Choose from ten styles, from simple **Dots** to **Composing** or **Weaving**.

### **Landing menu**

Turn on **Show landing menu** to give visitors a choice of ways to reach you before the chat opens. Add up to five options under **Channels**: **Chat**, **SMS**, **Email**, **WhatsApp** and **Submit Form**, and give each a label if you like.

> [!NOTE]
>
> **SMS**, **Email** and **WhatsApp** in the landing menu open the visitor's own messaging app, addressed to your business. SMS uses the agent's phone number, Email uses your business email, and WhatsApp uses the agent's WhatsApp number or, if it has none, its phone number. Only **Chat** and **Submit Form** happen inside the widget.

### **Form**

A form collects details before the chat starts, so your agent knows who it's talking to and you have a way to follow up.

**1. **Turn it on****

Turn on **Require form before chat**. With a landing menu, it's called **Include a form option** and appears as **Submit Form** in the menu instead.

**2. **Choose the fields****

It starts with **First name** and **Phone**. Select **Add a field…** to add any of your [contact fields](https://myna.cx/docs/platform/explore/settings/contact-fields.md), including your own, and tick **Required** for the ones visitors must fill in.

**3. **Add consent lines, if you need them****

Under **Acknowledgements**, add checkboxes such as **I agree to the Privacy Policy**, with links to your policies.

**4. **Decide what happens next****

Set the **Submit button label**, then choose **After submit**: **Open chat** starts the conversation, and **Confirmation** shows a thank-you message instead, for a contact form without a chat.

What visitors enter is saved straight onto their contact record. Myna checks that phone numbers and emails look right before the form is sent. Visitors outside the US and Canada are asked to start their phone number with their country code.

## **How do I connect it to an agent?**

A widget doesn't answer anyone until an agent is assigned to it. Assign it from the agent's side:

**1. **Open the agent****

Open the agent in [Agents](https://myna.cx/docs/platform/explore/agents.md), or in Workflow Studio, and go to its **Channels**.

**2. **Turn on Web Chat****

Select the **Web Chat** tile. An agent can have **SMS** and **Web Chat** on together.

**3. **Choose the widget****

Under **Assigned Webchat**, pick the widget. Select **Create new** if you haven't made one yet.

Each widget answers for one agent, and each agent has one widget. A widget that already belongs to another agent shows **Assigned** and can't be picked. The **Webchats** page shows which agent each widget belongs to under **Assigned Agent**.

> [!WARNING]
>
> A widget with no agent still appears on your website, and its form still works, but visitors who send a message are told **Sorry, we can't chat right now. Please try again later.** Assign an agent before you install it.

## **How do I put it on my website?**

Open the **Installation** tab and select **Copy** to copy the widget's code snippet. It looks like this, with your own widget's details filled in:

```html theme={null}
<script
  src="https://…/public/webchat.js"
  data-widget-id="your-widget-id"
  data-public-key="pk_…"
  async
></script>
```

**1. **Paste it into your website****

Paste the snippet just before the closing **\</body>** tag, on every page where the chat should appear. Most website builders, such as WordPress, Wix, Squarespace and Webflow, have a place for custom code in the footer.

**2. **Publish and check****

Publish the page, then open it to check that the launcher appears in the bottom right corner.

**3. **Approve your domain****

Add your website under **Security**, as described below, before you go live.

You only need to install the snippet once. The widget loads its latest design every time, so changes you make in Myna appear on your website without touching the code again.

## **How do I keep it secure?**

The **Security** tab decides which websites can show your widget.

![The Security tab with the public key and approved domains](https://mintcdn.com/myna-8262a91b/Tuar1ERtE9Pcx59e/images/settings/webchat-security.png?fit=max\&auto=format\&n=Tuar1ERtE9Pcx59e\&q=85\&s=06d89563a88989dff777134e40aeb59d)

Under **Approved domains**, type your website's address without **https\://**, such as **brightsmiledental.com**, and select **Add domain**. Once at least one domain is listed, only those sites can load the widget. With none listed, any site can, so add yours before you go live.

A domain covers both **brightsmiledental.com** and **[www.brightsmiledental.com](http://www.brightsmiledental.com)**. Other subdomains, such as **book.brightsmiledental.com**, need adding separately.

### **What is Signed-in users only?**

**Signed-in users only** is for developers putting the chat inside a mobile app or a members' area. When it's on, your own server signs a short-lived token for each signed-in user with the widget's **Identity secret**, and the widget refuses anyone without one. The chat then follows the same person across devices.

> [!WARNING]
>
> Turning on **Signed-in users only** stops the website snippet from working for that widget, since normal website visitors have no token. Use a separate widget for your public website.

## **How do I manage my widgets?**

The **Webchats** page lists every widget with its **Assigned Agent** and when it was **Updated**. Select a widget to open it, or use the **⋮** menu at the end of its row:

* **Edit:** opens the widget.
* **Installation:** opens it straight on the **Installation** tab.
* **Duplicate:** makes a copy with the same design and approved domains, but no agent. Handy for a second website.
* **Delete:** removes the widget. The contacts and conversations it created are kept.

## **What happens when a visitor chats?**

> [card] **They become a contact**
>
> Their first message or form creates a contact with the channel **Web Chat**, assigned to the widget's agent.

> [card] **The agent replies**
>
> The agent waits a moment in case they're still typing, then answers all their messages together, just like it does by text.

> [card] **Your team can join in**
>
> Replies sent from [Conversations](https://myna.cx/docs/platform/explore/conversations.md) appear in the open chat straight away.

> [card] **They can come back**
>
> Returning visitors on the same browser see their earlier messages and carry on where they left off.

## **Common questions**

> [accordion] Does webchat cost extra?
>
> The webchat channel itself is free, with no charge per message like there is for SMS. [Billing](https://myna.cx/docs/platform/explore/settings/billing.md) explains how your agents' AI replies are charged.

> [accordion] Why doesn't the chat appear on my website?
>
> Check three things: the snippet is on that page before **\</body>**, the page has been published, and your domain is listed under **Security**, or the list is empty. If the widget was deleted, the launcher disappears too.

> [accordion] Why can't visitors get a reply?
>
> The widget probably has no agent. Check **Assigned Agent** on the Webchats page, then assign one from the agent's **Channels**.

> [accordion] Can I move the launcher to the left?
>
> No. The launcher always sits in the bottom right corner of the page.

> [accordion] Can I have more than one widget?
>
> Yes. Create one per website, or one per agent, for example a booking agent on your main site and a support agent on your help pages.


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