If you would like to see any of the Roadmap features, something else or have feedback on the existing API, reach out to liam@botbrains.io.
$botbrains.
The SDK ships by default and we will expand the API based on user needs. See Roadmap.

Prerequisite
The SDK will assume you run the code via the launcher integration.Use Cases
Hide Launcher on specific pages
Hide Launcher on small devices
Integrated Product Help - Buttons
Annotate User Data
Identify Users
We also support identifying users against our system. Please talk to liam@botbrains.io for get an introduction.Change the suggestions
Docs
You can then use the$botbrains object via .push immediately below adding our script.
.push allows you to call .do .set .on and .off without errors.
If you need .is or .on, store a callback in window.BOTBRAINS_ON_LOADED.
.isto branch your code based on our state.doto trigger actions, don’t return values.setto modify state, annotate users and more.onand.offfor registering/unregistering callbacks.getreturns a Promise
$botbrains.help() to see all command names.
Commands
do-Commands are by default async and don’t return anything. This allows you to call them at any point, even before the SDK is ready.
Conditionals
Personalization - Theme and Localization
By default, we will automatch user preferences and choose the most fitting value. You can manually control them.Events
chat.readyframe.loadedchat.openedchat.closedmessage.sent
message.sent
Fires whenever the user sends a message. Use it to track conversations in your own analytics or trigger actions on your page.Users
Data
You can annotate user data and additional arbitrary JSON underexternal_attributes up to 8 KB.
Identify
You can also identify users, which enables cross device session continuity by setting anexternal_id. Be careful, you may only set external_id once. Two users with the same external_id will be able to read messages of the other user. Please check your implementation by reading our Complete Guide to Users or talking to ben@botbrains.io.
Debugging
If you have issues, enable verbose logs withwindow.BOTBRAINS_DEBUG = true or ?botbrainsDebug=true in the URL.
Roadmap
There are many ways we could expand the API to control more parts of the Chat.- Support Attachments