V2 Messenger

Our ServisBOT V2 messenger can be installed by making sure our install script is available on all of your pages.

The code snippet must be inserted before the main closing body tag ie. </body>. You must also include the code snippet in all pages that require the ServisBot web messenger

Embedding messenger on your site

Add the following script to any web page within your web application which you would like to include the ServisBot web messenger.

<script src="//lightning.production.helium.servismatrixcdn.com/v2/latest/servisbot-utils.js"></script>
<script src="//lightning.production.helium.servismatrixcdn.com/v2/latest/bundle-messenger.js"></script>
<script>        
      function initializeMessenger() {
          const ServisBOT = window.ServisBot.init({
                organization: 'yourOrganization',
                endpoint: 'youEndpointAddress',
                sbRegion: "eu-1",
                version: "2"
            });
            window.lightningLauncher = ServisBOT;
            return ServisBOT;
        }
        window.addEventListener('load', (event) => {
            initializeMessenger();
        });
</script>

Your src for bundle-messenger.js script tag might changed based on your region.

  • For SBRegion eu-1: Use //lightning.production.helium.servismatrixcdn.com/v2/latest/bundle-messenger.js"
  • For SBRegion us1: Use //lightning.us1.helium.servismatrixcdn.com/v2/latest/bundle-messenger.js

Replace ‘yourOrganization’ with the name in which you registered with ServisBOT. Replace ‘yourEndpointAddress’ with the specific endpoint alias.

Troubleshooting

My bot doesn’t load at all with the script on the page.

  • doublecheck that your endpoint has your current domain whitelisted
  • In rare cases your site or page might not work with the src path // you may need to explicitely reference the src with https://