Deploy a Bot to a Widget
The SendSeven Widget is the easiest way to put a bot on your website. The embed is a single <script> tag; everything else — appearance, channel selection, bot wiring — is configured in the dashboard or via data attributes.
This guide covers attaching an AI Assistant to a widget. For the widget's general capabilities (media support, agent handoff, conversation routing), see the Live Chat guide.
Prerequisites
- A SendSeven account and a Widget configured.
- An AI Assistant you want to attach.
- Access to your website's HTML.
Embed snippet
Paste this just before the closing </body> tag of any page where the widget should appear:
<script
src="https://widget.sendseven.com/widget-support.js"
data-widget-id="WIDGET_ID"
data-tenant-id="TENANT_ID"
async
></script>
Replace WIDGET_ID and TENANT_ID with the values from the widget's settings page. Both are visible at the top of the widget editor.
Widget variants
Two pre-built variants are available:
| Variant | Script URL | Best for |
|---|---|---|
| Support | https://widget.sendseven.com/widget-support.js | Conversational live-chat. Bot + human handoff. Persistent conversation history. |
| Newsletter | https://widget.sendseven.com/widget-newsletter.js | One-shot opt-in capture (email, phone, WhatsApp number). No conversation thread. |
Use support for bot deployment — newsletter widgets don't run bots.
Widget types (form factor)
When you create a widget in the dashboard, you pick a type:
| Type | What it looks like | When to use |
|---|---|---|
BUBBLE | Floating chat bubble in the page corner. Click to expand. | General website live chat. |
CARD | Inline card embedded directly in the page. | Landing pages, contact pages, post-purchase pages. |
Both types can run a bot. The choice only affects appearance.
Data attributes
The embed snippet supports a small set of data attributes for per-page customization:
| Attribute | Description |
|---|---|
data-widget-id | Required. Widget ID. |
data-tenant-id | Required. Your tenant ID. |
data-locale | Force a UI language (e.g., de, en, fr). Default: auto-detect from the browser. |
data-contact-email | Pre-fill the contact's email (useful on authenticated pages). |
data-contact-phone | Pre-fill the contact's phone. |
data-context | Arbitrary JSON-string of context passed to the bot's session (e.g., current page URL, plan). |
Example with context:
<script
src="https://widget.sendseven.com/widget-support.js"
data-widget-id="wgt_abc123"
data-tenant-id="tnt_xyz789"
data-locale="de"
data-context='{"page":"pricing","plan":"trial"}'
async
></script>
Channel selection inside the widget
A single widget can offer the visitor a choice of channels (live chat, WhatsApp, Telegram, Email). Configure this in the widget editor under Channels:
- Toggle which channels are visible in the channel-picker.
- For WhatsApp / Telegram / Messenger / Instagram, the visitor is redirected to a
click-to-chatlink. - For Live Chat and Email, the conversation happens in-widget.
The bot only runs on live chat conversations started inside the widget. For WhatsApp / Telegram / Messenger / Instagram, attach the same bot via Deploy to Channels instead.
Attach the bot via the Publish step
The fastest way to attach a bot to a widget is the Publish your bot step of the bot editor (the final step of the create/edit wizard).
- Open your bot in the Automation area.
- Click Publish (the final wizard step).
- Choose Attach to widget and pick a target:
- Create a new widget — spins up a fresh Support widget pre-wired to this bot.
- Attach to an existing widget — pick from the list of your existing support widgets. Newsletter widgets are not offered here (they don't run bots).
- If the existing widget you pick already has a bot attached, you'll be prompted to:
- Replace — detach the previous bot from this widget (it remains as a configured bot and can be reused elsewhere).
- Create a new widget instead — opens the new-widget shortcut so both bots stay live.
- Confirm. The bot is wired to the widget immediately.
Attach the bot via Activation Rules (advanced)
For more advanced wiring — multiple widgets per bot, schedules, after-hours fallback — use Activation Rules directly:
- Open your bot in the Automation area.
- Go to the Activation Rules tab.
- Click Add rule.
- In the rule editor:
- Widgets — pick the widget(s) the bot should run on.
- Schedule — optional. Restrict to business hours or specific weekdays.
- Require no agents online — optional. When on, the bot only runs when no human agent is available. Use this if the bot is the after-hours fallback.
- Priority — lower number wins when multiple bots match. Default
100.
- Save the rule.
- Toggle the bot Active.
Reload your website. The next visitor to open the widget should be greeted by the bot.
You can have a different bot per widget. A common pattern: one widget on the pricing page that runs a Sales Assistant, a different widget on the help center that runs a Support Assistant.
Verifying the bot is live
- Open your website in an incognito window.
- Open the widget.
- Send a test message that you know is in the KB.
- The bot should reply within a few seconds with a grounded answer.
If you get the live-chat default greeting and no bot reply:
- Check the bot is Active.
- Check the Activation Rule includes this widget ID and that the schedule (if any) is in effect.
- Check the Bot Sessions view — every bot run creates a session row, with the trigger reason logged.
Conversation handoff
When the bot escalates (low confidence, escalation keyword, or max_failed_attempts reached), the conversation transitions to human-needs state. Your team gets a notification in the inbox and can take over. The widget visitor sees a smooth transition — no UI change required.
What's next
- Build an Assistant — review configuration if your bot isn't behaving right.
- Deploy to Channels — extend the same bot to WhatsApp/Telegram/etc.
- Live Chat reference — full widget capability matrix.