Integrating Intercom into your SuiteCommerce Advanced (SCA) website is a great way to enhance customer communication and support. Intercom provides a range of tools for real-time chat, email marketing, and customer engagement. Here’s a step-by-step guide to integrating Intercom into your SCA website:
You can customize the window.intercomSettings object to include user-specific information. For example, you can set the user’s name, email, or company name by dynamically generating this data based on the user’s session in SCA.
Initialize Intercom:
After adding the code to your SCA templates and customizing the settings, you can initialize Intercom by adding the following script to your page:
<script>
(function() {
var w = window;
var ic = w.Intercom;
if (typeof ic === "function") {
ic('reattach_activator');
ic('update', w.intercomSettings);
} else {
var d = document;
var i = function() {
i.c(arguments);
};
i.q = [];
i.c = function(args) {
i.q.push(args);
};
w.Intercom = i;
var l = function() {
var s = d.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = 'https://widget.intercom.io/widget/YOUR_APP_ID';
var x = d.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
};
if (w.attachEvent) {
w.attachEvent('onload', l);
} else {
w.addEventListener('load', l, false);
}
}
})();
</script>
Replace 'YOUR_APP_ID' with your actual Intercom App ID.
Test Your Integration:
Once you’ve added the code, load your SCA website and ensure that the Intercom chat widget appears as expected.
Further Customization:
- You can further customize your Intercom integration by using Intercom’s JavaScript API to trigger messages, events, and more based on user interactions or specific events in your SCA website.
By following these steps, you can integrate Intercom into your SuiteCommerce Advanced website and provide enhanced customer communication and support capabilities. Be sure to refer to Intercom’s documentation for more advanced customization and usage options