Skip to main content
Type

open()

Shows the assistant.
  • Bubble: opens the panel. The iframe is created on the first call.
  • Inline bar: focuses the bar.
  • ⌘K bar: shows the overlay and focuses the bar.

close()

Folds the assistant. The bar gets its pill size back and its text is cleared. The bubble panel closes. The iframe stays, hidden. The conversation is still there on the next open().

setSession(token)

string
required
A new session token for the same customer.
Hands a new token to the running assistant. The conversation stays on screen. Use it to renew a token yourself; onSessionExpired already does it for you.
Not for a different customer. The iframe loads history once, so the previous customer’s questions would stay visible. Call destroy() and init() again instead.

destroy()

Removes the launcher, the iframe and every listener the assistant added to the page. The token held in memory goes with it. Call it when the customer logs out, or when your component unmounts. The React component does it for you. A destroyed instance cannot be reused. Create a new one with init().