Follow our Getting Started guide to create your bot, and select "Web-based" when prompted.

Once you're ready to deploy your bot, click "Get Embed Code", where you will find Javascript and framing options for displaying your bot on the web.

Copy and paste the embed code on any webpage to display a Bot widget in the lower right of your webpage, just like you see when editing your bot.

If you would like more flexibility in displaying your bot, feel free to frame your webchat URL as you desire, using the URL provided when you generate an embed code.

Please Note

Framing this URL on a high-traffic page will result in many outbound messages being sent. Unless user interaction is likely, you may wish to display the frame only when a user initiates chat.

Persistent Sessions

By default, a webchat conversation lasts only as long as it is open in a user's browser window. Upon refreshing or navigating away from and back to the page, the user would trigger a new conversation, losing any context from previous interactions with your bot.

To override this behavior and enable persistent webchat conversations, you can append a session parameter with an arbitrary value to your webchat URL, i.e. session=user123. The value of this parameter can later be referenced to retrieve the conversation history or send a message from your bot using the /messageHuman API endpoint.

A valid session parameter value can be any combination of letters, numbers, hyphens, or underscores.