Installation
Using npm
Using a script tag
Usage
Use theTextWidget component and provide your organizationId:
Props
Config data
All properties described below are used for initialization on the first render and later updates of the chat widget with new values on change.Event handlers
All event handlers listed below are registered if provided for the first time. They unregister on the component cleanup or the property value change. Descriptions of all events are available after clicking on the associated links.- onReady
- onAvailabilityChanged
- onVisibilityChanged
- onCustomerStatusChanged
- onNewEvent
- onFormSubmitted
- onRatingSubmitted
- onGreetingDisplayed
- onGreetingHidden
- onRichMessageButtonClicked
Composition API
This package exports a set of Vue Composition API utilities that allow for consuming reactive data from the chat widget in any place of the application as long as theLiveChatWidget or TextWidget component is rendered in the tree.
useWidgetState
Access the current chat widgetavailability or visibility state if the chat widget is loaded.
useWidgetIsReady
Check if the chat widget is ready using the boolean flagisWidgetReady.
useWidgetChatData
Access thechatId and threadId of the chat if there’s one currently available.
useWidgetGreeting
Access the current greetingid and uniqueId if one is currently displayed (received and not hidden).
useWidgetCustomerData
Access theid, isReturning, status, and sessionVariables of the current customer if the chat widget is loaded.