window.vivo_api.destroy(); // when leaving the page / the widget is no longer needed
How does setRegion work? When the application locale (for example, “en”) is passed to it, the Vivo application is not translated into English on launch.
Currently the widget language is determined by the channel setting in the VivoChat admin panel. setRegion allows routing a conversation to the selected channel, see more in “Conversation Routing”
How can we find out exactly when the Vivo application has loaded after calling run(), so that we can show a preloader or allow the widget to be opened? Until the application has loaded, calls to vivo_api.open() do not work.
To update the data, you need to “remove” the widget after the end user’s target action and reinitialize the widget with the updated information
The correct call order: