chat-bot-embed
v3.0.3
Published
Embeds the chat bot website into other web apps.
Downloads
1,840
Readme
Currently Under Development and The Below is not accurate for now.
chat-bot-embed
chat-bot-embed
is a lightweight and framework-agnostic package that allows you to easily embed a chat bot into any web application via an iframe. It dynamically appends a chat bot window to the screen.
Usage
Appending the support bot to the dom
Use loadSupportBot to load the widget anonymously, without any user identification.
import { loadSupportBot } from 'chat-bot-embed';
loadSupportBot({
projectId: 'your-project-id',
appId: 'your-app-id',
reAppendOnRefresh: true, // Optional
url: 'https://chat.supportbotcentral.com', // Optional;
});
Booting with User identification
Use bootSupportBot to initialize the chat bot with a user's information. This allows the chat bot to recognize the user across sessions.
import { bootSupportBot } from 'chat-bot-embed';
bootSupportBot({
userEmail: '[email protected]',
userId: null, // Optional
});
Recommended Usage
The support bot widget should be loaded first using loadSupportBot(). The session will be anonymous until the widget is booted using bootSupportBot() with the users information. Once booted all the users information will be transferred and findable under their email.