Commands
Methods on window.GetResolved for opening, hiding, and configuring the chat panel.
Once the widget is installed, the methods below are available on window.GetResolved. All methods are safe to call after the widget has loaded — see Installation for readiness hooks.
Open the chat
Opens the chat panel. No-op if already open.
GetResolved.open();Close the chat
Closes the chat panel. No-op if already closed.
GetResolved.close();Toggle the chat
Toggles the chat panel between open and closed.
GetResolved.toggle();Hide the widget
Hides the floating button and panel entirely. Chat state is preserved.
GetResolved.hide();Show the widget
Brings the widget back after hide().
GetResolved.show();Example: custom "Chat with us" button
Wire any element on your page to open the chat.
<button onclick="GetResolved.open()">Chat with us</button>Auto-hide behaviors
Make the floating button and panel disappear entirely when the user clicks outside the widget or closes the panel. After the widget hides, call GetResolved.show() or GetResolved.open() from your own trigger to bring it back.
Runtime — call any time after the widget loads:
GetResolved.configure({
hideOnOutsideClick: true,
hideOnPanelClose: true,
});Install-time — set on window.GetResolvedConfig before loading the script:
window.GetResolvedConfig = {
chatKey: "YOUR_CHAT_KEY",
hideOnOutsideClick: true,
hideOnPanelClose: true,
};Detecting clicks outside the widget
The widget renders a single root container on document.body with a stable id and data attribute. Use one of the hooks below instead of matching internal class names, which may change between releases.
window.GetResolved.contains(el)— returnstrueifelis inside the widget.window.GetResolved.root— the container element.#getresolved-widget-containerand[data-getresolved-root]— stable DOM selectors for the same element.
document.addEventListener("click", (event) => {
if (!window.GetResolved?.contains(event.target)) {
window.GetResolved?.hide();
}
});