Install Messenger Using the Custom Code Snippet
How to configure and install a custom Messenger code snippet
Last Updated:What's in this article?
About Installing Messenger
Our Messenger Product is currently in Beta so if you configure your Web Chat instance from Settings, you will be given the Web Chat code snippet. In order to install Messenger, you will need to use the new Messenger Code snippet below.
Even with using the code snippet below, you will need to configure a Web Chat instance under Settings > Channels in order to create the Integration ID.
Standard Messenger Code Snippet
Copy the code snippet below and paste it into a text editor. You will need to update the IntegrationID, PartnerToken, and PartnerTeam with the proper IDs for your organization. You can find these IDs from the snippet of code that CXMEngine displays when you go to Settings > Channels > Web Chat Integration > Install Code.
<script> ; (function () { window.OvationMessenger = window.OvationMessenger || {} window.OvationMessenger.config = { integrationId: '[integrationId]', partnerToken: '[partnerToken]', partnerTeam: '[partnerTeam]', } var loadMessengerConnect = function () { var script = document.createElement('script') script.type = 'text/javascript' script.async = true script.src = 'https://messenger.goboomtown.com/js/messengerConnect.js' document.body.appendChild(script) } if ( document.readyState === 'complete' || document.readyState === 'interactive' ) { loadMessengerConnect() } else { document.addEventListener( 'DOMContentLoaded', loadMessengerConnect, false, ) } })() </script>
Configuration Options Reference
This is a reference of the configuration options passed when initializing the Messenger app.
Option | Details |
---|---|
partnerToken [String] | (required) Public token identifying the partner. Provided automatically in the snippet that can be copied out of the Boomtown App. |
partnerTeam [String] | (required) Team Id for the chat support channel. Provided automatically in the snippet that can be copied out of the Boomtown App. |
integrationId [String] | (required) Integration Id for the chat support channel. Provided automatically in the snippet that can be copied out of the Boomtown App. |
Hidden [Boolean] | (optional) Configuration for controlling hidden mode. Defaults to false. Setting to true will set the app in Hidden mode. The app can still be opened using smart buttons or the OvationMessenger browser API. You can learn more here. |
parentElement [String] | (optional) HTML Element selector to embed the app. Including a valid selector sets the application to embedded mode, where it will show in a div instead of on click of a floating button. You can learn more here. Examples: “.container-for-messenger” “#container-for-messenger” |