6 Replies Latest reply on Mar 20, 2018 11:16 AM by Yaron Meiner

    Webhook response and lead association / merge

    Yaron Meiner

      Hi all,

      I am integrating Intercom with our systems. and i use webhooks to complete the data that SF gets from intercom by using a webhook and it works basically great buy one thing - Merging with the munchkin of the user.


      Since the user is already traveling the site and using the chat in the site, it already has a munchkin id. I can send the munchkin id through intercom. What i am missing is how to map the munchkin id in a way that will merge the annonymous data with the current lead that was created by sf.


      the sync looks like that website -> qualified lead in intercom -> sf -> marketo (by sf <-> marketo sync), webhook with email from intercom -> data is in marketo.


      * Please avoid giving Zapier ideas, i do maintain my own api and trying to avoid the extra link in the chain.

        • Re: Webhook response and lead association / merge
          Sanford Whiteman

          You can do this with a webhook in one of 2 ways:


          • Have the webhook loop back to Marketo and call the REST AssociateLead endpoint (seemingly most professional, but creates a possible DoS vuln because it consumes one API call for public events)
          • Have the webhook loop back to Marketo and POST to the Forms 1.0 /save or Forms 2.0 /save2 endpoint (more primitive in most senses, but leaves your REST API calls alone)
          • Re: Webhook response and lead association / merge
            Yaron Meiner

            The way i did it:


            • I added the munchkin token (_mkto_trk cookie) to every lead in intercom.
            • Lead is synced to sf and from there to marketo (takes about 10 minutes, since we already have bizdev in touch with the lead it is ok by us) - intercom deliveres - Name, email, company.
            • When lead arrives to marketo - webhook to intercom to complete all additional details  - country, state/province, ip, etc. in this call we also get the munchkin token.
            • With the stored munchkin token - second webhook to marketo itself - /save2 that includes  email & mkt_trk, (we created a dedicated form i named associate lead) - this associates the lead to the anonymous lead the user was in the beginning.


            Zero code integration achieved (well, except for the embed and mapping of fields to intercom but that's local JS).


            * Yes i did submit a form from marketo webhook to marketo save2 and it works, saves the need to authenticate.


            What we are missing, is the ability to associate lead as a smart campaign, it could save a webhook, but it works.