Skip to content

Repository files navigation

OpenCX Widget

For all the available options, check the documentation

Page access in v5

Page reading, pointing and actions are off by default in both popover and Companion. Each permission requires organization support and explicit embed options:

features: {
  pageContext: true, // Read page context and allow visitor marks.
  clientTools: true, // Also allow the agent to highlight controls.
  pageActions: true, // Also allow clicks, typing and selection.
}

Omit pageActions for read-and-point access. Use only pageContext: true for reading and visitor marks. Actions require all three options and a backend that explicitly enables page_actions; older backends cannot grant action access. Beta integrations that previously used clientTools for actions must also opt into pageActions. Existing v4 integrations keep page access off by default.

The styled widget asks visitors to confirm every click, text entry, selection and checkbox change. Text requests show the proposed value; dropdown requests show the option's visible label. If that option changes before execution, the approval is cancelled. Disabled or ambiguous options are not selected. Declining leaves the page unchanged; pointing needs no action confirmation. This also covers non-English controls and fields that auto-save. A successful page-action result confirms an observed browser change; remote business transactions need their own outcome verification.

Mark sensitive regions with data-opencx-private. Names and marked text exclude private/hidden descendants and form values; screenshots are omitted for regions containing private/hidden content, fields, or opaque embedded media. Mark previews stay local until Send. Captured page URLs omit credentials, queries, and fragments; URL paths and ordinary visible page text can still contain business data.

Host-provided context, message custom data, typed messages, and deliberately attached files remain shared as configured. Page-access flags do not sanitize those explicit inputs.

Initial questions

To require visitors to start with one of your initial questions, set requireInitialQuestion: true in the widget options:

{
  token: 'YOUR_WIDGET_TOKEN',
  initialQuestions: ['Track my order', 'Help with a return'],
  requireInitialQuestion: true,
}

The message box stays hidden until a question is sent, then appears for follow-up messages. This works with either initialQuestionsPosition and in both popover and inline mode. Each new chat requires a choice; conversations with messages stay editable. The option defaults to false and is ignored if there are no non-empty initial questions.

In v5 Companion, initialQuestions appear as floating pills above the quick-ask bar. With requireInitialQuestion: false (the default), visitors can choose a suggestion or type their own question. Set it to true to hide the input until one is selected. Suggestions disappear after the conversation starts and return for a new chat. Popover and inline keep their configured question placement.

About

No description, website, or topics provided.

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages