Configure the Chat Widget
Reference for web chat deployments, appearance, greetings, suggestions, attention grabbers, live chat, behavior, and the MCP tools that manage configurations.
Each web chat configuration controls where one version of the widget appears and how it looks and behaves. A business can have multiple configurations—for example, one for the main storefront and another for a regional subdomain.
Configure them in Settings → Channels → Web Chat. Choose a configuration from the menu at the top of the page, or select Add New Configuration to create one.
Avoid overlapping deployments
If multiple enabled configurations match the same hostname, path, and query conditions, the widget prefers the rule with more query conditions, then the first matching configuration returned by the service. Keep equally specific deployment rules mutually exclusive unless that ordering is intentional.
Deployment and visibility
The Deployment section decides which pages load the widget.
| Setting | MCP field | What it controls |
|---|---|---|
| Domain | deployments[].hostname | Hostname without a path, such as example.com. www.example.com and example.com are treated as the same hostname. |
| Path pattern | deployments[].pathRegex | Optional regular expression tested against window.location.pathname, such as ^/products/. An empty or null value allows every path on that hostname. |
| Query conditions | deployments[].queryConditions | Optional parameter rules evaluated against the parsed query string. Every condition must match. |
| Enable deployment | deployments[].enableDeployment | Turns that domain/path/query rule on or off without removing it. |
| Hide other chat widgets | removeCompetitorWidgets | Attempts to remove other known chat widgets when Octocom loads. Test this after changing storefront apps. |
| Streaming mode | enableResponseStreaming | Streams the bot's answer token by token and shows thinking/action status. This bypasses response validators, so enable it deliberately. |
Every hostname needs its own deployment entry. Different paths on the same hostname can be assigned to different configurations with non-overlapping regular expressions.
Each query condition contains parameter, operator, and value. Use equals for an exact decoded value, matches for a regular expression against the decoded value, or exists to require the parameter regardless of its value. Set value to null for exists. Repeated parameters match when any value satisfies the condition. Deployments without query conditions retain the existing domain-and-path-only behavior.
You can also configure a support-hours schedule with supportHours. Outside the configured intervals the widget is hidden. Set it to null to disable the schedule:
{
"timezone": "Europe/London",
"Monday": [{ "open": "09:00", "close": "17:30" }],
"Tuesday": [{ "open": "09:00", "close": "17:30" }]
}Omit a weekday to keep the widget hidden for that entire day. Times use the configured IANA timezone and a 24-hour clock.
Appearance
Most size and spacing values are CSS values, such as 20px, 3rem, or 64px. Colors accept CSS color strings; hexadecimal colors are the simplest choice.
| Area | Configurable fields |
|---|---|
| Top bar | Title, logo, background/text/icon colors, and border (topBarTitle, topBarBackgroundColor, topBarTextColor, topBarIconColor, enableTopBarBorder) |
| Bot messages | Bot icon and message background/text colors (botMessageBackgroundColor, botMessageTextColor) |
| Customer messages | Message background/text colors (customerMessageBackgroundColor, customerMessageTextColor) |
| Desktop launcher | Type (icon, icon_text, or image), text, image/icon, colors, launcher size, and icon size (launcherType, launcherText, launcherBackgroundColor, launcherTextColor, launcherIconColor, launcherSize, launcherIconSize) |
| Mobile launcher | Copy the desktop launcher or configure a separate icon, icon-and-text, or image launcher with the corresponding launcherMobile* fields |
| Desktop position | Bottom offset, left or right offset, and stacking order (positionBottom, positionLeft, positionRight, zIndex) |
| Mobile position and window | Bottom/left/right offsets and optional window width/height percentages (mobilePositionBottom, mobilePositionLeft, mobilePositionRight, mobileWidthPercentage, mobileHeightPercentage) |
Set only one of positionLeft and positionRight, and only one of mobilePositionLeft and mobilePositionRight; set the unused side to null.
Image uploads are managed in the dashboard. MCP returns image file IDs and public URLs when reading a configuration, but the general update tool does not accept image IDs.
Conversation start
Greetings
greetings controls the opening message. Each entry contains:
content: the greeting text.pathRegex: an optional pathname regular expression. Null is a fallback that matches any page.priority: a non-negative number. Higher priority entries are evaluated first, and the first matching greeting wins.
Keep one null-path greeting at the lowest priority when you want a default.
Suggested replies
firstMessageSuggestions displays buttons before the visitor's first message. Each entry has displayText, the messageText sent when clicked, and an optional pathRegex.
secondMessageSuggestions can add a second choice after a first suggestion. Each entry contains messageText and an optional firstMessagesAllowed array. Values in firstMessagesAllowed must match the first suggestion's message text, not its display label.
Passing either array through MCP replaces the complete existing array. Read the configuration first when modifying only one suggestion.
Data collection, terms, and text
| Setting | MCP field |
|---|---|
| Ask for an email before the first message | requestEmailBeforeChat |
| Require a yes/no terms choice | requireTermsAndConditionsAgreement, termsAndConditionsYesButtonText, termsAndConditionsNoButtonText |
| Show a disclaimer above the input | enableDisclaimer, disclaimerText, disclaimerButtonBackgroundColor, disclaimerButtonTextColor |
| Input placeholder | messageInputPlaceholder |
| Widget interface language | languageOverride (en, es, lt, no, or ru; null auto-detects the browser language) |
Attention grabbers
Attention grabbers invite a visitor to start a conversation before they open the widget.
- The intro pop-up uses
enableAttentionGrabberIntroMessage,attentionGrabberName, andattentionGrabberMessage. - Manual suggestion buttons use
enableManualAttentionGrabbers,manualAttentionGrabberPathRegex, andattentionGrabberSuggestions(displayTextis shown;messageis sent). - Product-aware suggestions use
enableAiGeneratedAttentionGrabbers,aiGeneratedAttentionGrabberPrompt, andaiGeneratedAttentionGrabberPathRegex. Products must be available for the business. - Appearance and timing use the four
attentionGrabberSuggestionBubble*Colorfields,attentionGrabberDelay,enableAttentionGrabberMobile,enableAttentionGrabberLabel,hideAttentionGrabberIcon, andaltAttentionGrabberStyle.
enableAttentionGrabbers is the legacy master flag. For new configurations, use the manual and AI-specific enable flags.
Live chat
Enable human handoff with enableLiveChat. You can also configure:
liveChatResponseTime: expected response time shown to the visitor, in minutes.liveChatTimeout: maximum wait before the live chat is closed and moved to email follow-up, in minutes.liveChatUseAgentInitialsAsIcon: show each agent's initials instead of a shared uploaded icon.
The uploaded live-chat agent icon is managed in the dashboard. See Live Chat for routing, assignment, and availability behavior.
Advanced behavior
These settings are available through MCP even when they are not shown in the main dashboard form:
| MCP field | Behavior |
|---|---|
hideInitially | Hides the entire widget until it is opened through the JavaScript control API. |
openChatAfter | Opens the chat window after this many seconds when the visitor has not interacted recently. Null disables it. |
autoOpenPaths | Array of pathname regular expressions that open the window immediately on matching pages. |
exitIntentEnabled, exitIntentMessage | Shows an exit-intent prompt, with an optional custom message. |
logLevel | Widget console logging threshold: debug, info, warn, error, or null to disable. |
Interaction buttons and virtual try-on are linked to web chat but have dedicated configuration and MCP tools. See Interaction Buttons and Virtual Try-On.
Manage configurations through MCP
The Octocom MCP exposes six web-chat configuration tools:
| Tool | Purpose |
|---|---|
list_web_chat_configs | List every configuration for a business. |
get_web_chat_config | Read one configuration by ID. |
test_web_chat_url | Explain deployment matching and the greeting, suggestions, language, auto-open, and attention behavior. |
create_web_chat_config | Create a named configuration using Octocom defaults. |
update_web_chat_config | Patch only the supplied fields. |
delete_web_chat_config | Permanently delete one configuration. |
All tools require organizationId and businessId; get, update, and delete also require configId. The create tool intentionally starts with defaults—create it first, then update it.
Example update arguments:
{
"organizationId": "org-id",
"businessId": "business-id",
"configId": "config-id",
"patch": {
"name": "UK storefront",
"deployments": [
{
"hostname": "example.com",
"pathRegex": "^/uk(?:/|$)",
"queryConditions": [
{
"parameter": "campaign",
"operator": "matches",
"value": "^(summer|autumn)-sale$"
},
{
"parameter": "preview",
"operator": "exists",
"value": null
}
],
"enableDeployment": true
}
],
"topBarTitle": "Ask us anything",
"languageOverride": "en",
"firstMessageSuggestions": [
{
"displayText": "Track my order",
"messageText": "Where is my order?",
"pathRegex": null
}
]
}
}For patch fields, omission means “leave unchanged,” while null clears a nullable value. Arrays are full replacements; pass [] to remove every item. Deletion is permanent and is not covered by configuration version history, so list the configurations and confirm the ID before deleting.
Use test_web_chat_url after changing URL-sensitive behavior. Pass the complete URL, including protocol and query string. Its response reports the selected configuration and selection reason, then breaks down the enabled state, normalized hostname, pathname regular expression, and actual values seen by every query condition for every deployment.
For the selected configuration, resolvedExperience also reports:
- the greeting that would be used, its matching rule, and every other candidate;
- the effective first-message suggestions and whether path-specific or default suggestions won;
- the configured conversation-language rule or business-language fallback;
- URL/query-based auto-open matches and the configured delayed-open value;
- AI, manual, legacy, or intro attention-grabber URL eligibility.
Greeting, suggestion, and language rules continue to match the pathname only; query conditions apply to deployment selection. Browser-dependent decisions such as visitor interaction history, device type, the current open state, embed attributes, support hours, and actual AI-generated content are explicitly listed as unevaluated runtime state. The tool is read-only and evaluates configuration data without requesting the storefront URL.