JavaScript Embed Features
Widget Control
Wire the widget to your own UI events — open it from a header link, reset on logout, close after a successful checkout.
The global object
Once the embed mounts, control methods will land on window.chatmount:
Methods
js
// Open / close
window.chatmount.open();
window.chatmount.close();
// Reset — clears the visible conversation, starts a new session.
// Configuration and custom initial messages are preserved.
window.chatmount.resetChat();Common patterns
- Bind
open()to a header link or empty-state CTA so the chat opens from contexts other than the bubble - Reset on logout — clears any pre-chat lead-form state tied to the previous user
- Reset 24 hours after the last message — keeps long-running sessions from accumulating context
- Close after a successful action (booking, ticket created) so the user lands back on the host page
Related