Show
Displays the widget. The widget is displayed by default on page load. You don't need to call show to display the widget unless you use hide.
Hide
Hides all parts of the widget from the page. You can invoke it before or after page load.
Open
Opens the messaging Web Widget. Chat become visible
Close
Closes the messaging Web Widget.
Set locale
Sets the locale of the messaging Web Widget. For a list of supported locales and associated codes, use the following Zendesk public REST API endpoint
Set zIndex
Sets the CSS property z-index on all the iframes for the messaging Web Widget.
Set cookies
The messaging Web Widget uses a mixture of cookies as well as local and session storage in order to function.
Set conversation fields
Allows values for conversation fields to be set in the client to add contextual data about the conversation. To learn more about Messaging Metadata, see Introduction to Messaging Metadata.

example fields: [{id: "123456789", value: 100.5}]
Set conversation tags
Allows custom conversation tags to be set in the client to add contextual data about the conversation. To learn more about Messaging Metadata, see Introduction to Messaging Metadata.

example tags: ["sales", "computer_accessories"]
Login
If your application has a login flow, or if a user needs to access the same conversation from multiple devices, you can use the loginUser API.

This command cannot wotk in this demo since token is xyz
Logout
Your app may have a logout function that brings users back to a login screen. In this case, revert the messaging Web Widget to a pre-login state by calling the logoutUser API.

insert API KEY

Flags:

isOpen: false

unreadMessages: undefined