Developers
Reference
| Method | What it does |
|---|---|
messenger(options) |
Draws the messenger into the page, for the agent with this publishable key. |
identify({ user, userToken }) |
Says who the visitor is, after they sign in or their details change. |
configure({ language, greeting, suggestions, layout, css }) |
Changes what a new conversation offers, such as suggestions for the page the visitor moved to, or how the messenger looks. |
open(), close(), toggle() |
Opens or closes the messenger. |
ask(question) |
Opens the messenger and asks the agent the question in a new conversation. |
on(BindKit.Event.OPEN | CLOSE, listener) |
Calls the listener when the messenger opens or closes. Returns a function that stops it. |
knowledgeBase(options) |
Shows the knowledge base's articles in an element of the page. Returns a function that removes it. |
defineComponent(name, options) |
How the page draws and handles one of the agent's components, and the state its actions set. |
defineAction(name, action) |
An action the page runs itself when the agent calls it, with the visitor's own session:
{ description, parameters, readOnly, run }. null removes it.
See actions without a server.
|
reset() |
On sign-out: removes what BindKit drew and forgets the visitor and their conversations. |
remove() |
Removes the messenger and the knowledge bases, keeping the visitor's conversations for next time. |