Defaults shown as
undefined mean no value is supplied. Read each option’s behavior: some inherit organization settings, while streaming, personal connections and page permissions require explicit opt-in. Defaults shown as language-specific (e.g. for textContent) come from the active language translation, not a single hard-coded string.Initialization
token
string
required
Your organization’s widget token. Find it in Channels → AI Chat Widget. The widget will not load without it.
Widget v5 options
These options require v5. See Install Widget for version selection and Companion mode for complete examples.displayMode
'popover' | 'companion'
default:"popover"
Choose the classic corner popover or the Companion launcher and workspace. Ignored when
inline is true. This controls the layout. Streaming requires explicit embed opt-in and organization support, in either layout.companion
object
Options used with
displayMode: 'companion'.Set
companion: { bubbles: false, avatars: true } to show avatars with flat replies. These controls apply to Companion; the popover always shows avatars.compact also accepts maxWidth (440), minWidth (280), minHeight (420), maxHeight (640), viewportHeightRatio (0.65) and borderRadius (20). Dimensions are pixels except the viewport-height ratio.features
object
Per-embed switches for
preamble, inlineUi, dictation, attachments, pageContext, clientTools and pageActions. In Widget 5.0.0, pageContext, clientTools and pageActions each default to off and require explicit true as well as organization permission. Actions require all three and visitor approval. For the other switches, omission leaves the organization setting in charge. false always disables the capability in this embed; true cannot override an organization restriction.These defaults are enforced by the updated widget. Earlier v5 beta widgets can inherit enabled organization settings when a flag is omitted. Until you upgrade, use explicit features: { pageContext: false, clientTools: false, pageActions: false } to disable page access. Changing organization settings or updating the server alone does not give an older embed the new defaults.Manage web capabilities in Channels → Web chat and progress updates in Settings → Advanced. attachments: false hides file uploads in this embed; widget versions without this option ignore it. To refuse files for every embed and custom client, turn off File uploads in Web chat settings. Turning off pageContext does not remove host-supplied context from outgoing messages, but the new agent excludes that context and historical page selections from its prompt.streaming
boolean
Omitted or
false uses polling for saved messages, preserving v4 delivery. Set true to opt into streamed replies when the organization supports them. Enabled progress updates can arrive on a poll before the final reply. Changing delivery does not change the agent version or require Companion. A runtime transport change waits for an accepted send and its reply to settle.streamingFetch
typeof fetch
The
fetch used to send and resume streamed replies. Omitted uses the global fetch, which every other widget request uses. In React Native, pass the fetch from expo/fetch; see Stream in React Native. Available from Widget 5.1.0.presentation
object
Narrow what this embed shows. Organization limits in Channels → Web chat → Reply display apply to live replies, reconnects and history.
An embed can show less than the organization allows, never more. Hiding activity does not stop tools from executing. Selectable questions and page highlights retain the data needed for their visible interaction. Polling can return saved progress updates and completed replies; it does not deliver live activity events.
capabilities
object
Set
connections: true to opt into personal connection controls and requests; omission or false keeps them off. Signed user/account access and streaming are also required for connection requests.Declare which interactions your client can render: structuredQuestions, richReplies and pageEffects. Enabling a capability does not enable the organization’s feature.The standard widget declares its built-in support. A headless client must explicitly declare support after implementing the corresponding renderer or page-effect handler. Custom message or rich-reply renderers must declare their own support. Set an individual capability to false to opt out. Clients without support receive ordinary replies; the agent can still ask clarifying questions in text. The polling transport does not support these structured interactions.This reference describes Widget 5.0.0. Earlier beta defaults differ; see Migrate to v5 before upgrading a beta integration.
mentions
object
Configure the
@ picker using either items (a fixed array) or search (a function returning an array or a promise of one). Use one source, not both.Each record needs type, id and title, with optional description, icon, iconName and meta. preview defaults to true and shows the selected item’s description when the layout has room. Mentions require page context to be enabled. See mention examples.Branding
assets
object
default:{}
Brand visuals shown around the chat — organization logo and launcher icons.
bot
object
Identity of the AI shown in the widget header and AI message bubbles.
humanAgent
object
Default appearance applied to every human agent after .
theme
object
Colors, panel sizing, spacing, and other layout-level visuals.
cssOverrides
string
Custom stylesheet that targets widget parts via
data-component selectors. Use when the theme options are not enough.Inspect the DOM to find selectors like data-component="chat/input_box/root". If a part you need to style does not yet have a selector, contact us and we will add one.language
string
default:"en"
Language code used for built-in widget copy.Supported codes:
arArabicdaDanishdeGermanenEnglishesSpanishfiFinnishfrFrenchitItaliannlDutchnoNorwegianplPolishptPortugueseroRomaniansvSwedishtrTurkish
Need another language? Contact support or open a pull request.
textContent
object
Override built-in copy on individual screens. Defaults come from the active
language.translationOverrides
{ [key in Language]?: Partial<TranslationInterface> }
default:{}
Override individual translation strings per language. See
language for the list of supported codes.timestamps
object
default:{}
Display timestamps in the conversation.
disableTooltips
boolean
default:false
Disable the in-widget hover tooltips on UI controls (e.g. header buttons). Has no effect on documentation tooltips.
inline
boolean
default:false
Embed the widget inside its parent element instead of floating over the page.When
true, the widget content fills its parent container, the widget stays open, and the launcher button is hidden. Useful when you want a chat panel built into a page section.headerButtons
{ sessionsScreen?: Array<HeaderButton>; chatScreen?: Array<HeaderButton> }
default:{}
Custom header buttons for the sessions and chat screens — expand-shrink the widget, close it, resolve the session, and so on.
User
collectUserData
boolean
default:false
Show a built-in form on the welcome screen that asks for the visitor’s name and email. The submitted values create a non-verified .Use
prefillUserData and extraDataCollectionFields to tailor the form. For verified identity, see Authentication.prefillUserData
object
default:{}
Initial values for the
name and email inputs in the welcome screen. Requires collectUserData to be true.extraDataCollectionFields
Array<string>
default:[]
Extra free-text fields to add to the welcome form, beyond
name and email. Requires collectUserData to be true.user
object
default:{}
Verified or non-verified contact data passed from your app. If omitted, an anonymous contact is used.See Authentication for the full setup, including how to mint a verified token from your backend.
Chat
initialMessages
Array<string>
default:["Hello, how can I help you?"]
Messages the visitor sees in a new chat session. They disappear after the visitor sends their first message.
advancedInitialMessages
Array<{ message: string; persistent?: boolean }>
Same idea as
initialMessages with per-message persistence control. When set, this overrides initialMessages.When persistent is true, the message stays pinned at the top of the chat; otherwise it disappears after the first reply.initialQuestions
Array<string>
default:[]
Suggested starting questions shown at the top of a new chat. Clicking one sends it as the visitor’s first message.To require a selection before visitors can type, enable
requireInitialQuestion.requireInitialQuestion
boolean
default:false
Require a visitor to select an
initialQuestions option before typing in a new session. In the popover, the message box is hidden until selection. In Companion, starter pills appear above the composer and the composer stays visible but disabled. Selecting a question sends it as the first message and enables follow-ups.Each new or reset session requires another selection. Resuming a session with messages keeps the message box available. If there are no initial questions, or all questions are empty or whitespace-only, the message box stays available.The popover supports both initialQuestionsPosition values. Companion places starter pills above its composer. Leave this option off to let visitors type their first message freely.Available in Widget 4.0.63 and Widget 5.0.0. Earlier v5 betas, including beta.10, do not include this behavior.initialQuestionsPosition
'above-chat-input' | 'below-initial-messages'
default:"above-chat-input"
Where the suggested questions appear relative to the chat input.
thisWasHelpfulOrNot
object
Prompt the visitor to confirm whether the latest AI reply solved their issue. Renders as two buttons: “This was helpful” and “I need more help”, after an AI reply that might have solved the issue.
Behavior
isOpen
boolean
default:false
Whether the widget is open. Use to open the widget on first render (e.g. inside a webview) or to control its open state from your app.
openAfterNSeconds
number
Open the widget automatically after N seconds on the page.
oneOpenSessionAllowed
boolean
default:false
When
true, the New conversation button is hidden while an open session already exists. See Conversation Sessions for the user-facing effect.router
object
Override the default screen routing.
anchorTarget
'_top' | '_blank'
default:"_top"
Target attribute applied to all links rendered in AI or human-agent replies.
_top— open links in the same tab._blank— open links in a new tab.
disableSendingWhenAwaitingAIReply
boolean
default:true
By default the send button is disabled while the AI is generating a reply. Set to
false to let the visitor send another message before the AI finishes — the typing indicator stays visible; only the send button’s disabled state is dropped.Context & custom data
context
object | (() => object)
Runtime data sent with each visitor message so the AI can tailor its response. In v5, pass a function to read current state on each send. The
page key accepts url and optional title; entity accepts type, id, title and optional meta and can appear as a context pill.Exclude query strings and fragments from page URLs. If a path or title contains private information, use an approved route label or omit it.For record changes without navigation, dispatch opencx:context-changed to refresh the pill. Have the callback read a ref or store so it reflects the record visible when the visitor sends. Host context is still sent when features.pageContext is false. See page context guidance.messageCustomData
object
default:{}
Per-message metadata attached to each visitor message. Intended for human agents — the AI does not see it and it does not influence replies.
sessionCustomData
Record<string, string | number | boolean>
default:{}
Metadata attached to the session when it is created. Intended for human agents and for filtering sessions in the inbox — the AI does not see it.
Keys prefixed with
opencx__ are reserved for OpenCX-specific controls. Set
opencx__ai_agent_version to 'v2' to upgrade that session to the latest AI
agent. A session can only upgrade, never downgrade, so a lower value has no
effect. The value is stored as session data, so you can also filter on it in the
inbox. Omitting it uses the version from your channel settings.AI action requests
These options attach data to every HTTP request the widget makes when the AI calls one of your APIs. For secure credentials, configure them in General settings instead.headers
Record<string, string>
default:{}
Custom headers added to every AI action request.
queryParams
Record<string, string>
default:{}
Custom query parameters appended to every AI action request URL.
bodyProperties
Record<string, string>
default:{}
Custom properties merged into the body of every AI action request.
Components
modesComponents
Array<ModeComponent>
default:[]
Custom React components rendered in the canvas while a is active. See Custom Components for the surrounding implementation guidance.
Accessibility
accessibility
object
default:{}
Accessibility options for the widget UI.
Related Documentation
Configuration
Job-first guidance — pick the right options for branding, launch flow, and visitor experience.
Playground
Try options live and copy a working snippet.
Authentication
Identify signed-in visitors and protect conversation history.
Custom Components
Render richer UI for AI action results and conversation modes.