Defaults shown as
undefined mean the option has no default — the related feature stays off until you set the option. 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 depends on your organization’s configuration.companion
object
Options used with
displayMode: 'companion'.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, pageContext and clientTools. Set a value to false to disable it in this embed. true or omission leaves the organization setting in charge; it cannot enable a disabled capability.Manage web capabilities in Channels → Web chat and progress updates in Settings → Advanced. There is no features.attachments switch. Turning off pageContext does not remove host-supplied context from outgoing messages.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
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> }
Override individual translation strings per language. See
language for the list of supported codes.timestamps
object
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> }
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
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
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.
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”.
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. In beta.0, have the callback read a ref or store instead of relying on replacing options.context after initialization. Host context is still sent when features.pageContext is false. See page context guidance.messageCustomData
object
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>
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>
Custom headers added to every AI action request.
queryParams
Record<string, string>
Custom query parameters appended to every AI action request URL.
bodyProperties
Record<string, string>
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
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.