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.

  1. Popup Window

    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.

  2. Embed Window

    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.

  3. The Embedding Script

    The embedding script looks like this:

    The first script tag registers an event handler to load the chat window once the main bundle finishes loading. The second script tag loads the main JavaScript bundle.

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: