# Chats: add a chat widget to your website

> Create a chat for your website, add its embed code, answer visitors inside Enydea, and optionally let an AI agent reply first.

Source: https://enydea.com/en/documentation/chat-widget · Last updated 2026-10-02

## What Chats does
A chat is a chat button you place on your website. When a visitor sends a message, Enydea opens a **chat room** that your team answers inside Enydea. The same chat can also receive WhatsApp messages. An AI agent can reply automatically, but that is optional and off by default.

The **Chats** screen is English-only in every app language.

## Before you start
- Select a relation in **Current Account** in the sidebar. A chat is stored under that relation, and without one Enydea shows "No relation selected".
- To show the widget on your website you need to edit the page's HTML, or ask your web developer.

## Create a chat and get the code

![The Chat Management screen with an empty chat list and a New Chat button](https://enydea.com/seo-assets/screens/chats.webp)

*Chat Management with no chats yet. New Chat creates the first one.*
1. Click **Chats** in the sidebar.
2. Click **New Chat** (or **Create your first chat**). The new chat is named "new".
3. Type your own **Chat Name**. Visitors see it as the title of the chat window.
4. Click **Get Embed Code**. A dialog titled **Embed Chat Widget** opens.
5. Click **Copy Code**.
6. Paste the code into your page's HTML, just before the closing `</body>` tag, on every page that should show the chat.

The code looks like this, with your own chat ID:

```html
<!-- Enydea Chat Widget -->
<script src="https://app.enydea.com/widget/enydea-chat.js"
        data-chat-id="YOUR_CHAT_ID"
        data-name="Your chat name"
        data-color="#1976d2"></script>
```

`data-name` and `data-color` appear when the chat has them. Add `data-position="left"` to move the button to the bottom left. The window text follows your page's `lang` setting (English, Dutch, German or French).

Under **Appearance Settings**, **Background Color** is the widget's main colour. **Text Color**, **Width**, **Height**, **Chat Avatar** and **Start Icon** style the chat window you see inside Enydea. The website widget keeps its own size and icons. **Embed Code Preview** updates as you change settings.

Test the chat on your live site before you announce it. Send a message from your page. A new room should appear under **Chat Rooms** (reload **Chats** if it does not show yet). If the window opens but no room ever appears, the visitor sees no error, so contact support.

## What visitors see

![A customer website with the chat window open: a welcome message, a visitor question and the reply from the sales team](https://enydea.com/seo-assets/screens/chat-widget-visitor.webp)

*The chat window on a website.*
- A round button at the bottom right. It opens a window with your **Chat Name**, an online or offline status, a welcome message ("Welcome! How can we help you today?") and a message box. You cannot change the welcome message on this screen.
- Four quick-reply buttons with fixed wording: "What do you offer?", "Pricing", "Contact sales" and "AI features". Clicking one sends that text as the visitor's message.
- A "Powered by Enydea" link at the bottom of the window.

## Answer in Chat Rooms
Select a chat to see its **Chat Rooms**: visitor name, company if known, members and date.

![The Chat Management screen with a chat room open: the welcome message, the visitor question and the team reply](https://enydea.com/seo-assets/screens/chat-room.webp)

*A chat room opened from the Chat Rooms list.*

- Each room shows a coloured dot ("Needs reaction") until an attendee is recorded on it. Replying does not record one, so expect the dot on every room. The bell icon (**Show only rooms needing attention**) filters by that flag. **Filter rooms...** searches, and the bin deletes a room.
- Click a room to open it, type your reply and press Enter. Rooms that came from WhatsApp show a **WhatsApp** badge.
- The person who created the chat gets a **System Messages** notification for every new conversation and visitor message. Ticking **Chat notifications** under **Settings** -> **Account** -> **Notification Preferences** adds push or email, as you set there.

## AI Agent Settings (optional)
Tick **Enable AI Auto-Reply** to let the AI answer each visitor message. Your team still sees every message and can write in the room.

| Field | What it does |
|---|---|
| **System Prompt** | Instructions for the AI's personality and scope |
| **Supported Languages** | English, Dutch, German, French, Spanish, Portuguese, Italian. Empty means any language. |
| **Include CRM Context** | Lets the AI use company details, matching CRM records and opportunities. On for new chats. |
| **Include Product Catalog** | Lets the AI use products and services from your catalog. On for new chats. |
| **Max History** | Earlier messages the AI reads (20 for new chats) |
| **Max Response Length** | Characters. Longer replies are cut and end with "..." (500 for new chats). |
| **Reply Delay** | Milliseconds before the reply appears (1500 for new chats) |

> **Warning:** AI replies go to the public. With **Include CRM Context** on, the AI can draw on your CRM when it answers. Switch it off if your CRM holds details visitors must not see.

If the AI service times out or is unavailable, the visitor gets a message that a team member will reply shortly.

### Content filter
**Enable Content Filter** appears when AI auto-reply is on. It is on for new chats. Fill in **Banned Words** (comma-separated, wildcards with *), **Banned Topics**, or **Allowed Topics (Whitelist)**. If you fill in the whitelist, only those topics are answered.

The filter works on AI replies only. If it blocks a visitor's message, the AI answers with a polite refusal. If it blocks the AI's own draft, a generic apology is posted. The visitor's message still reaches your team.

## Office hours
Tick **Enable Office Hours**. Set **Opening Time**, **Closing Time**, **Timezone** and **Working Days**, and write an **Offline Message**. Outside those hours the window shows your message and the message box is disabled, so visitors cannot leave a message. Point them to your email or phone in the text. Empty fields mean 09:00, 17:00, Europe/Amsterdam and Monday to Friday. The window checks the hours when the page loads.

## WhatsApp Integration
Tick **Enable WhatsApp** and enter the **Phone Number ID** and **Business Account ID** to route WhatsApp messages for that number through this chat. They appear as rooms labelled **WhatsApp**. What you type in such a room goes back to the sender on WhatsApp, and AI auto-reply covers WhatsApp too.

If you connected WhatsApp through Meta's signup under **Social Media** -> **WhatsApp Business**, Enydea subscribes to your account's messages itself and fills these fields on that relation's first chat, if it exists ([Social media and WhatsApp](https://enydea.com/en/documentation/social-media-and-whatsapp.md)). The screen also shows a webhook address and Meta instructions, which that route does not need.

## Limits
- Your replies reach the visitor live over a WebSocket connection. If a visitor's network blocks WebSockets, they see your reply when they reload the page.
- The **Chat widget** switch in **Settings** -> **Website Tracking** is a separate, simpler bubble. It does not create rooms in **Chats**. Leave it off when you use this widget ([Website tracking and consent](https://enydea.com/en/documentation/website-tracking-and-consent.md)).
