Attributes

This page details the possible attributes that can be used when Installing the widget

Widget

Widget init attributes

These attributes will modify the behaviour of the widget and how the agent will respond to messages.

AttributeTypeDescription

apiKey

string

The API key of your project can be found in your project/implementation page.

language

The current language of your website visitor. Must be ISO 639-1

open

boolean

Standard open the widget

hide

boolean

Hide or show the widget on your website.

config

Widget specific configuration. This will change the behaviour of your widget

context

record<string, Boolean | number | string | undefined>

Extra context that should be used by the agent to provide accurate answers. Closed beta feature

customerData

Data to identify the current customer.

Widget embed attributes

These attributes will modify the behaviour of the widget and how the agent will respond to messages.

AttributeTypeDescription

apiKey

string

The API key of your project can be found in your project/implementation page.

selector

string

Select the HTML tag where in the widget must be embedded.

Works the same as document.querySelector

language

The current language of your website visitor. Must be ISO 639-1

context

record<string, Boolean | number | string | undefined>

Extra context that should be used by the agent to provide accurate answers. Closed beta feature

customerData

Data to identify the current customer.

Config attribute

These attributes are used to change the behaviour of your widget

AttributeTypeDescription

notificationsEnabled

boolean

Allow notifications to be shown when widget is closed. Default this is enabled.

Customer data

These attributes are used to identify the current customer

AttributeTypeDescription

id

string

The id of the customer in your system

email

string

Customers emails

firstName

string

Customers first name

lastName

string

Customers last name

avatar

string

Avatar to display for the customer

Ensure compliance with GDPR laws when setting customer data.

Last updated