The Chat Window
The Bavard chat window is the interfaces through which users on the web interact with Bavard virtual agents (and live chat with human agents). The window in two variants: popup and embed.
The popup window is the default variant used by the embedding script. This window appears in the lower right and can be opened or closed using the trigger button. When new messages arrive will the window is closed, popup messages appear, but these can be turned off completely from the settings page in the chatbot builder.
The embed window is simply a rectangular div that can be placed anywhere on the page. The chatbot is loaded into an IFrame inside that div. The width and height of the div container are completely up to you but we recommend at least 375px in width and 500px in height.
The Embedding Script
The embedding script looks like this:
Receiving Events for Chatbot Interactions
The parent window can listen for interaction events happening inside the chat window and react as it wishes.
Here's an example of how that works: