Supportly
SupportlyDocs
/

Getting Started

Getting Started

Widget Integration

Widget Integration

AI Configuration

AI Configuration

API Reference

API ReferenceAPI Playground

Team Management

Team Management

Billing

Billing

FAQ / Troubleshooting

FAQ & Troubleshooting
Get started free
SupportlyDocs

Widget Integration

Widget Integration

The widget is a standalone bundle served from Supportly and mounted inside a Shadow DOM. That keeps host-site CSS from leaking into the chat UI while still allowing simple script-based installation.

Embed options by framework

The simplest installation is a script tag in plain HTML, but the widget can also be loaded from framework lifecycle hooks when you need environment-aware key selection or conditional loading.

Embed snippets

Choose the pattern that matches your host application. All variants eventually load the same widget bundle.

index.htmlhtml
1<script
2 src="https://your-supportly-domain.com/widget.js?v=YOUR_WIDGET_VERSION"
3 data-workspace-key="ws_live_xxxxxxxxx"
4></script>

Configuration options

SettingPurposeRecommended default
Primary colorControls brand emphasis in the launcher and chat UIUse the brand accent already used for calls to action.
Welcome messageSets the first interaction expectationKeep it under two sentences and action oriented.
Pre-chat fieldsCaptures routing data before the first messageOnly enable name and email if agents truly need them.
Auto-open delayOpens the widget after a delayUse sparingly on pricing or checkout help pages only.

Avoid over-configuring pre-chat

Every extra field lowers start rate. If the agent can gather context naturally in the first turn, prefer that over a long pre-chat form.

Passing customer context

When you create widget sessions through the public API, include only the context that improves resolution speed: customer identity, page URL, browser data, or known account metadata.

Supportly stores this context on the conversation so it can inform AI responses, operator handoff, and later ticket review.

Create a widget session

This request creates or resumes a conversation and returns the token used for widget transport.

create-session.shbash
1curl -X POST "https://your-supportly-domain.com/api/widget/session" -H "Content-Type: application/json" -H "x-api-key: ws_live_xxxxxxxxx" -d '{
2 "customerName": "Amina Khalid",
3 "customerEmail": "amina@example.com",
4 "metadata": {
5 "pageUrl": "https://example.com/pricing",
6 "browser": "Chrome",
7 "plan": "pro-trial"
8 }
9 }'

Previous

Getting Started

Next

AI Configuration

On this page

Embed options by frameworkConfiguration optionsPassing customer context