Categories

How to add web chat to your website?

< All Topics

Webchat allows your business to have a chatbot on your own website that doesn’t depend on any other platform like Facebook, Telegram, WhatsApp, or Google. Your customers no need to create an account to start interacting with your chatbot.

If you collect email or a phone number on the webchat, your business will be able to send SMS or email at any time.

Adding the code to your website

1 – Include the below code in the body or footer of your website.

<script src="https://app.botsumo.io/webchat/plugin.js"></script>
<script>
      ktt10.setup({ pageId: YOUR_PAGE_ID});
</script>

This simple code will add a webchat similar to the below image.

The webchat plugin is very flexible and allows many customizations

Option NamePossible Values/DescriptionDefault
typefloating/window/container
container: include the chatbot inside any HTML element
window: the chatbot will open on a new window
floating
elementOnly used if “type” is “container”. example “#div1”
colorany color name or color code#007BFF
hideHeaderHide the session that contains the business name
true/false
false
refany ref/flow/step ID to be sent automatically
once the user clicks on the chat ICON.

Set ref as “get_started_button” to automatically
send the Welcome flow.
showPersonatrue/falsefalse
hideComposertrue/falsefalse
templatetemplate1/template2
iconthe chat icon that shows on bottom | right
rightDistance of the icon from the left edge of the screen20px
bottomDistance of the icon from the bottom edge of the screen20px

Changing Color

<script src="https://app.botsumo.io/webchat/plugin.js"></script>
<script>
      ktt10.setup({ pageId: YOUR_PAGE_ID, color: "#ff0000"});
</script>
Webchat-botsumo-io

Changing template

Currently, we offer only 3 templates for the webchat. We will create more templates soon.

<script src="https://app.botsumo.io/webchat/plugin.js"></script>
<script>
      ktt10.setup(
        { 
            pageId: YOUR_PAGE_ID, 
            color: "#007BFF", 
            hideHeader: true, 
            template: "template1"
        }
      );
</script>
Webchat-botsumo-io
<script src="https://app.botsumo.io/webchat/plugin.js"></script>
<script>
      ktt10.setup(
        { 
            pageId: YOUR_PAGE_ID, 
            color: "#007BFF", 
            hideHeader: true, 
            template: "template2"
        }
      );
</script>
Webchat-botsumo-io

Show the page image as persona

<script src="https://app.botsumo.io/webchat/plugin.js"></script>
<script>
      ktt10.setup({ pageId: YOUR_PAGE_ID, showPersona: true});
</script>

Webchat-botsumo-io

Change the chat icon

<script src="https://app.botsumo.io/webchat/plugin.js"></script>
<script>
      ktt10.setup({ pageId: YOUR_PAGE_ID, showPersona: true, icon: "YOUR_IMAGE_URL"});
</script>
Webchat-botsumo-io
Table of Contents