Skip to main content

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:

VariantScript URLBest for
Supporthttps://widget.sendseven.com/widget-support.jsConversational live-chat. Bot + human handoff. Persistent conversation history.
Newsletterhttps://widget.sendseven.com/widget-newsletter.jsOne-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:

TypeWhat it looks likeWhen to use
BUBBLEFloating chat bubble in the page corner. Click to expand.General website live chat.
CARDInline 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:

AttributeDescription
data-widget-idRequired. Widget ID.
data-tenant-idRequired. Your tenant ID.
data-localeForce a UI language (e.g., de, en, fr). Default: auto-detect from the browser.
data-contact-emailPre-fill the contact's email (useful on authenticated pages).
data-contact-phonePre-fill the contact's phone.
data-contextArbitrary 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-chat link.
  • 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).

  1. Open your bot in the Automation area.
  2. Click Publish (the final wizard step).
  3. 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).
  4. 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.
  5. 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:

  1. Open your bot in the Automation area.
  2. Go to the Activation Rules tab.
  3. Click Add rule.
  4. 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.
  5. Save the rule.
  6. Toggle the bot Active.

Reload your website. The next visitor to open the widget should be greeted by the bot.

tip

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

  1. Open your website in an incognito window.
  2. Open the widget.
  3. Send a test message that you know is in the KB.
  4. 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