Skip to main content
Answered

Can I install the Messenger within Salesforce Lightning Community?


Hi Everyone, if there are any possibilities to embed a javascript intercom chat widget in Salesforce Lightning Community. All my attempts to do this faced that widget script blocking by the Salesforce Locker Service. Although it is indicated that Salesforce is fully supported by Intercom

 

Perhaps there is any best practice or documentation describing how to embed a script in Salesforce Lightning.

Best answer by Eric Fitz

Hey @user172​, apologies for the delay in my reply. While we couldn't find the old document, one of our internal engineers has kindly put together this document which will guide you on how to install the Intercom Messenger on Salesforce Experience Cloud.

View original
Did this topic help you find an answer to your question?

22 replies

Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • October 26, 2021

Hey @dmitry s​, our own community is built on Salesforce and we successfully installed the Intercom Messenger! However, the engineer who did this has since moved on from the company, sadly 😓 let me do some digging to see if I can find any documentation they may have shared with me.


  • New Participant
  • 1 reply
  • October 28, 2021

Find that man! My job is on the line.


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • Answer
  • November 1, 2021

Hey @user172​, apologies for the delay in my reply. While we couldn't find the old document, one of our internal engineers has kindly put together this document which will guide you on how to install the Intercom Messenger on Salesforce Experience Cloud.


  • Author
  • New Participant
  • 2 replies
  • November 2, 2021

Hi Eric, thanks, we will use this approach.


  • New Participant
  • 4 replies
  • November 4, 2021

Thanks so much for this Eric! Can you confirm that this is the list of all URLs that need to be added to trusted sites?


  • New Participant
  • 4 replies
  • November 4, 2021

Also @eric f11​, I've actually now added all of those URLs however I'm getting the error message "Refused to connect to 'https://api-iam.intercom.io/messenger/web/ping#39; because it violates the following Content Security Policy directive: "connect-src 'self'". Please see attached my security settings here (the upload file button isn't working for me for some reason). As you'll see, https://api-iam.intercom.iois added as a trusted site so I'm a bit confused.


  • Author
  • New Participant
  • 2 replies
  • November 4, 2021

Hi Erick, we are have used your approach, but it was unsuccessful, we were also needed to redevelop js script for the widget, and add more URLs to the whitelist, not only for the community but in the SF setup also. But then we were able to see the widget, finally!!! 

Thank you so much for that!

 

However, could you share a full listing for the js script, because it is could not be seen fully on your images, but it definitely a different one than is listed in the official intercom documentation, and also the full list of URLs that needs to be whitelisted?

 

I just want to be sure that I'm using the correct script version or my changes is correct and the whitelist is contained all needed URLs


  • New Participant
  • 4 replies
  • November 4, 2021

Please ignore! I've now managed to get it appearing by adding the URLs to the Content Security Policy Trusted Sites section in Setup.

 


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • November 4, 2021

Hey @george m11​, glad you were able to set this up! I wonder if you might be able to help @dmitry s​ with the issue they're experiencing?


  • New Participant
  • 4 replies
  • November 5, 2021

We're still yet to test the user hash code as we're having some issues accessing the login pages in our Partial Environment. @dmitry s​ , we'll let you know when we make more progress on this. Did you manage to get anywhere debugging the issues? What errors were you getting?


  • New Participant
  • 1 reply
  • May 11, 2022

@george m11​ do you have an example of the aura component you used? i'm working my way though this document with no success as have no detail on what 'intercom_messenger' aura component does


  • New Participant
  • 1 reply
  • January 3, 2023

Bumping this up as I am looking to add Intercom to our Salesforce communities. I followed the instructions listed by Eric but I can only see Intercom when in the Salesforce Experience Builder, not while in the community as a user. I'm assuming this is a permission issue in Salesforce for the chatbot to be visible to users. Does anyone have a solution for what I am experiencing?


  • New Participant
  • 1 reply
  • July 20, 2023
Eric Fitz wrote:

Hey @user172​, apologies for the delay in my reply. While we couldn't find the old document, one of our internal engineers has kindly put together this document which will guide you on how to install the Intercom Messenger on Salesforce Experience Cloud.

Hi Eric,

Can you let me know the link to the document mentioned?

Thanks!


Eric Fitz wrote:

Hey @user172​, apologies for the delay in my reply. While we couldn't find the old document, one of our internal engineers has kindly put together this document which will guide you on how to install the Intercom Messenger on Salesforce Experience Cloud.

Hey Eric, hope you are doing great, is there any way you could post again that doc? Just bumped with this discussion and not being able to find it 🤔 or maybe @Dmitry S @George M11  @Robert B12 could help with that?

Thank you!


  • Employee
  • 1 reply
  • September 7, 2023

Hey @Federico Delfino and @Tian Li 🤘

It looks like the doc Eric had linked was lost when we migrated our community platform to Gainsight. 

 

Here is the content from that doc 👇 

 

Setting up Intercom Messenger on Intercom Salesforce Community

Configure Intercom Messenger in Communities

To set up Intercom messengers in the communities, one possible solution we will be using is  Lightning Web Components (LWC) for the UI and Apex code on the server-side since lightning components are intended to modify their own scope (See Lightning Locker for a full explanation), to initialize the Intercom javascript we need to make use of Head Markup.

 

Configuring messenger in the community using LWC

 

  1. Create an LWC Project ‘intercom’, under which we will create LWC and server-side Apex code.
  2. On creating LWC, three files, intercom.html, intercom.js-meta.xml, and intercom.js, will be created under force-app/main/default/lwc

 

intercom.html

HHgDcfJ4dbqzcfnJSpbItnmciMvc2yX5qrCLLaMxxM8CsZ7ITmXUOgh84h98bi_tEfVQW5H1yPnvFZHqCnoyegUa1zDq68IFgpUvUv7BviL_Gzv4taofktuLvbgCxmSqIkt_JfV0sJjQeAjbXHFBT84

intercom.js-meta.xmlH7iiu1QUCzObC1AHeZ5feA2o6TUPltct0SZDzjPcy5-3Ibpo7d3VxqBjO0V4Z7N88_0reP6PyxP8Jtfx-vf9EJ6IbHL0ZuQKcbdYyfd___dmxxllHr_PeH_6qUVa2rDmDwCwhegqX9L-5wTgsdtV0oM

intercom.jsyBKksA4w51e_ENKX-1IUejyeZkAKlJCH3Ns6c4eTCENTBxKXkP_ueC62puMxR26nIOkGXCQpaAK8Db4nV4zICl4b_XjqWoL6wP7xxsGANg7qwkSD8BL09G3R457gEPi6nEPrPeY4mQ2h7zw4rIidTDY

 


Thank you @Matthew P11 !

Luckily I was able to solve this a while ago with some help from your support team but is great to have this publicly available to everyone here.


  • New Participant
  • 1 reply
  • January 11, 2024

@Federico Delfino we are planning to do a similar implementation on our support portal built on Salesforce Experience Cloud. Could we connect to get more details around this implementation. 

 

@Matthew P11 could you share more details related to this asap.


  • New Participant
  • 1 reply
  • July 11, 2024
Eric Fitz wrote:

Hey @user172​, apologies for the delay in my reply. While we couldn't find the old document, one of our internal engineers has kindly put together this document which will guide you on how to install the Intercom Messenger on Salesforce Experience Cloud.

Hi Eric, we are also planning to do a similar implementation. Do you mind sharing the link to the documentation on how to install the Intercom Messenger on Salesforce Experience Cloud? I couldn’t find it in your previous response.

Thank you!


  • New Participant
  • 2 replies
  • September 20, 2024

Hey guys, anyone who implemented this happen to have it documented? I am planning on implementing the same. Do you mind sharing it? tia!


  • New Participant
  • 2 replies
  • October 4, 2024
eugene mutya wrote:

Hey guys, anyone who implemented this happen to have it documented? I am planning on implementing the same. Do you mind sharing it? tia!

FYI - I was able to solve this for non-authenticated users :)


@eugene mutya Were you able to find a documentation regarding this? Thanks.


@Matthew P11 The links you shared for Configuring messenger in the community using LWC seems to be broken. Are there any alternate links? 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings