0

Intercom, an in-product messenger has several JavaScript functions including one to show their messenger: https://developers.intercom.com/installing-intercom/web/methods/

We are trying to call this function using a Lightning Component so that upon clicking a button, the messenger window should open using this function: Intercom('show'); So far we have had no luck. Any ideas what's wrong?

COMPONENT

<aura:component implements="forceCommunity:availableForAllPageTypes" access="global" >
    <div class="slds-p-around_medium">
        <lightning:button name="showMessenger" label="Show me how to submit a great case" onclick="{!c.handlerAction}" variant="brand"></lightning:button>
    </div>
</aura:component>

CONTROLLER

({
    handlerAction : function(component, event, helper) {
        Intercom('show');
    }
})
1
  • 1
    The code that you present here appears to me the least interesting. Could you please add the code that provides the Intercom library code to Aura?! Are you sure there is an Intercom object attached to the windows object? What is your error message? Commented Oct 27, 2023 at 20:42

0

You must log in to answer this question.

Browse other questions tagged .