- Standard: Embeds the bot in a box with the size of your choice anywhere on your app. This is
what is used on QuickBot homepage: You can also set the width to
100%
and the height to100vh
to make it take the entire page dimensions - Popup: Embeds the bot in a Popup that overlays your website. It can be triggered after a delay or with a click of a button for example
- Bubble: Embeds the bot as a “chat bubble” at the bottom right corner of your site. Can be triggered automatically or with a click. It can also come with a “proactive message”.
- Theme and styling
- Trigger conditions
- User identification
- Pre-filled variables
Integration
You can get the standard HTML and Javascript code by clicking on the “Javascript” button in the “Deploy” tab of your bot. There are also appropriate instructions to deploy your bot in your platform of choice, make sure to head over theDeploy
tab of your bot and select the platform you want to deploy your bot on.
Here we will explain you the general integration steps for any platform.
Code snippet
Copy and paste the following code in your website HTML, ideally in the<head>
section:
Multiple bots
If you have different bots on the same page you will have to make them distinct with an additionalid
prop:
Popup
You can get the popup HTML and Javascript code by clicking on the “Javascript” button in the “Deploy” tab of your bot. Here is an example:Bubble
You can get the bubble HTML and Javascript code by clicking on the “Javascript” button in the “Deploy” tab of your bot. Here is an example:Custom button position
You can move the button with some custom CSS on your website. For example, you can place the bubble button higher with the following CSS:Commands
Here are the commands you can use to trigger your embedded bot:-
QuickBot.open()
: Open popup or bubble -
QuickBot.close()
: Close popup or bubble -
QuickBot.toggle()
: Toggle the bubble or popup open/close state, -
QuickBot.showPreviewMessage()
: Show preview message from the bubble, -
QuickBot.hidePreviewMessage()
: Hide preview message from the bubble, -
QuickBot.setPrefilledVariables(...)
: Set prefilled variables. Example:For more information, check out Additional configuration. -
QuickBot.setInputValue(...)
: Set the value in the currently displayed input.
Callbacks
If you need to trigger events on your parent website when the user interact with the bot, you can use the following callbacks:Variables
You can prefill the bot variable values in your embed code by adding theprefilledVariables
option. Here is an example:
varURL
variable with “https://my-site.com/account” and the varName
variable with “Francisco”. More info about variables: here.
Note that if your site URL contains query params (i.e.
https://viewer.quick.bot/my-publicid?varName=John&varSurname=Doe), the variables will automatically
be injected to the bot. So you don’t need to manually transfer query params to the bot embed
configuration.