# Web Chat
**Lodgestory CRM › Settings → Connections → Web Chat**
> **Drop a branded chat widget on any website and land the conversation in the same inbox as WhatsApp, Email, and Instagram.**
> **TL;DR**
>
> * **What it is —** a floating chat widget you embed with a single snippet. Visitors chat with a bot journey, a human agent, or both, from any page on your site.
> * **Who it's for —** Account Owners and Admins configure the widget. Anyone visiting the site can chat in. Team members answer from the unified inbox.
> * **Top outcome —** every website visitor can start a real conversation in the browser — and it lands in the same inbox as every other channel.
## At a glance
| | |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Plan tiers** | All paid tiers. |
| **Who can use it** | Admins configure and rotate the widget. Site visitors chat in. Team members answer from the inbox. |
| **Channel relationship** | Web Chat is itself a channel, listed alongside WhatsApp, Instagram, Messenger, and Email. You can assign a bot journey to it like any other channel. |
| **Integrations** | Live message delivery, file uploads, and the standard bot-journey flow. |
| **Top limits** | One live bot journey per widget. Configurable maximum file size per upload (1 KB to 50 MB, default 10 MB). Per-session rate limits to prevent abuse. |
| **API** | Yes — admin API for configuration and secret rotation; a public API that the embedded widget calls from visitor browsers. |
## How to find it
**Sidebar: Settings → Connections → Web Chat** (nested under Connections).
**Direct URL:** `https://app.lodgestory.com/crm/settings/connections/webwidget`
\[SCREENSHOT: web-chat-landing.png — list of configured widgets with status]
## What is Web Chat?
### The problem it solves
Chat is the lowest-friction inbound channel on the internet — if it's connected to the rest of your operation. Most chat widgets are silos: messages in a widget inbox, tickets in another tool, the CRM somewhere else. Team members context-switch; customers repeat themselves three times; the data never fully reconciles.
Web Chat is a first-class inbound channel inside the same Lodgestory inbox that handles WhatsApp, Instagram, Email, and voice calls. Messages land in Home with a contact attached, a bot journey routing the reply if you've set one, and the same ticket-creation and agent-assignment you use everywhere else.
### What you get
* **Admin configuration for every part of the widget.** Theme (colour, logo, position), welcome greeting, teaser nudge, audio cues, offline message, business hours, pre-chat form, allowed domains, upload limits.
* **Copy-paste install for popular stacks.** Plain HTML, React, Next.js, Vue, Nuxt, Svelte, Angular, WordPress, and Shopify each get a ready-made snippet on the install tab.
* **Bot journey per widget.** Same pattern as every other channel — pick a deployed journey and a bot identity, save, and the widget starts replying.
* **Secret rotation with a 24-hour grace.** When you rotate the widget's secret, the old one stays valid for 24 hours so existing site deployments keep working while you roll out the new snippet. After 24 hours, only the new secret works.
* **Domain allowlist with wildcards.** List the domains where the widget is allowed to load. A wildcard like `*.example.com` matches every subdomain without listing each.
* **The same message types as every other channel.** Visitors can send text, images, and files. Agents and bots can send text, media, interactive buttons, lists, location, and call-to-action links — the widget renders them all.
* **Live delivery.** Messages arrive instantly, with typing indicators and read receipts.
* **Offline form.** When no agent is available (or it's outside your business hours), the widget collects the visitor's contact and a single message, and the team picks it up on the next shift.
* **Server-side uploads.** Visitors upload files through Lodgestory rather than directly to a third-party store, which keeps your domain allowlist simple and the flow safe.
* **Per-session rate limits.** Abuse protection is built in — 30 messages a minute per chat session, 10 new session opens a minute per visitor, 60 ephemeral events a minute per session.
### How it's different
* **Full bot-journey parity with WhatsApp.** Every bot journey step works on Web Chat. Buttons render as buttons, lists render as lists, call-to-action links are clickable. You don't rebuild flows for the web.
* **Secret rotation with a 24-hour grace.** No downtime when you rotate. Roll out the new snippet on your sites over the window, and everyone lands on the new secret cleanly.
* **Wildcards in the origin allowlist.** Running 40 subsites under `*.example.com`? List the wildcard once.
* **Style isolation.** The widget renders inside its own styled environment, so your site's CSS can't leak into it and the widget can't leak out.
### Customer scenarios
* **Marketing site with pre-chat form.** An Admin turns on a pre-chat form asking for name, email, and reason. The visitor fills it, chats, and the fields are already attached to their contact record when a team member picks it up.
* **Multi-brand agency.** An agency runs 40 subsites under `*.example-group.com`. One widget, the wildcard listed once, a single embed snippet deployed via the shared head-tag include.
* **Rotating a leaked secret.** A staff laptop is stolen. Admin rotates the widget's secret. Live sessions continue for up to 24 hours on the old secret; during that window the Admin rolls out the new snippet across all sites. After 24 hours the old secret is dead.
* **Outside business hours.** A visitor arrives at 2 AM. The widget switches to the offline form, collects their details plus one message, and agents pick it up the next morning as a new chat.
### How it fits with the rest of Lodgestory CRM
Web Chat is nested under [Connections](connections.md) and shows up as a channel everywhere the platform talks about channels:
* **[Home / Unified Inbox](../workspace/home-unified-inbox.md)** — widget chats land here with a Web Chat badge.
* **[Bot Journeys](bot-journeys.md)** — per-widget journey assignment.
* **[Contacts](../workspace/contacts.md)** — pre-chat form responses seed new contacts.
* **[Campaigns](../workspace/campaigns.md)** — Web Chat doesn't support outbound broadcasts, but chat-initiated flows are standard.
## Core concepts
| Term | What it means |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Widget** | A single chat embed with its own theme, secret, domain allowlist, and bot journey. |
| **Secret** | The value that authorises your website to talk to Lodgestory on behalf of this widget. Rotate when needed; the old secret stays valid for 24 hours. |
| **Domain allowlist** | The exact origins where the widget is allowed to load. Supports wildcards like `*.example.com`. |
| **Pre-chat form** | An optional form shown to the visitor the first time they open the widget. |
| **Business hours** | A weekly grid that controls when the widget is live versus when it switches to an offline form. |
| **Offline form** | The fallback form shown outside business hours or when no agent is available. |
| **Session** | A single visitor's conversation on the widget. Survives page reloads using the browser's local storage. |
## Quick Start — embed Web Chat on your website in 5 minutes
### Step 1 — Open Web Chat and create a widget
**Settings → Connections → Web Chat** → **+ New Widget**.
\[SCREENSHOT: web-chat-qs-1-create.png]
### Step 2 — Configure
* **Display name** — an internal label (e.g. *Marketing site widget*).
* **Theme** — primary colour, logo upload (up to 1 MB), widget position (bottom-left or bottom-right).
* **Welcome message** — the first line the visitor sees.
* **Teaser** — an optional popup text that nudges the visitor to open the chat.
* **Allowed origins** — the domains where this widget can embed. Wildcards like `*.example.com` supported.
* **Pre-chat form** — toggle on if you want to collect name, email, or phone before chatting.
* **Business hours** — optional weekly grid.
* **Offline message and offline form** — what to show outside business hours.
* **Max upload size** — 1 KB to 50 MB (default 10 MB).
Save — the widget is created and a secret is generated.
### Step 3 — Assign a bot journey (optional)
Same pattern as other channels — pick a deployed journey, pick a bot identity, save.
### Step 4 — Copy the embed snippet
The widget detail page has an Install Instructions tab with snippets for nine popular stacks. Here's the plain-HTML version:
```html
```
Paste it before `