---
title: "Behavior"
description: "Control how the web widget behaves: its welcome message, suggested prompts, custom open buttons, and which websites can embed it."
seo:
  title: "Web Widget Behavior"
---

Open your agent, go to **Deploy → Web Widget**, and select the **Behavior** tab.

## Welcome message

The first message visitors see when they open the chat, for example:

> Hello! How can I help you today?

## Suggested prompts

Suggested prompts are short questions shown as buttons when the chat opens. Visitors can tap one instead of typing.

Select **Add prompt** to add one, for example "How does pricing work?". Drag rows to change their order. Keep the list short: three or four prompts work best.

## Custom open selector

Open the widget from your own buttons or links. Enter a CSS selector, and clicking any matching element opens the widget when it's closed. For example:

| Selector | Matches |
| --- | --- |
| `#open-chat` | The element with `id="open-chat"` |
| `.open-chat` | Every element with `class="open-chat"` |
| `[data-open-chat]` | Every element with a `data-open-chat` attribute |

It also works for elements added to the page after it loads.

```html
<button data-open-chat>Chat with us</button>
```

## Allowed embed domains

Restrict which websites can show your widget. This is an allowlist: when it has entries, the widget only loads on those sites. Leave it empty to allow every site.

Select **Add domain** and enter one of:

| Format | Example | Allows |
| --- | --- | --- |
| Domain | `example.com` | That domain |
| Wildcard | `*.example.com` | Every subdomain of `example.com` |
| Local | `localhost` or `http://localhost:8888/` | Local development |

You can add up to 20 domains.

:::tip
Add your domains before you share the install script publicly. It stops other sites from copying your script and using your credits.
:::
