Webhooks Use Case: Adding Intercom Messages to Prospect Profile

Overview

At times it is useful to add custom activities to a prospect profile. One example would be with Intercom. If someone on your website opens a chat, or emails your support email, having a copy of that request on the Prospect profile can be invaluable. We will show you how to accomplish this using Zapier and webhooks.

Instructions

This can be done by the following 4 steps:

  1. Create a Zapier account

  2. Create a Custom Activity in OneFocus

  3. Create an API Key in OneFocus

  4. Create the Zapier link

Create a Zapier account

The Zapier Tasks needed are Premium, so a paid membership to Zapier will be needed.

If you do not already have a Zapier account, you will need to visit https://zapier.com/ and create one.

Create a Custom Activity

Go into your account settings, select Custom Activity from the side bar, then new in the top right.

After clicking on New, you will be presented with a handful of options to setup the name of the Activity, it’s picture, and what information you can attach to it. For Intercom messages, these are the options we found work best.

Create an API Key

From the Account Settings page, this time select API from under Integrations, then Create a new one. The only option it will ask for is a Name to describe the API.

If you do not see the option for API, your account may not be licensed for API access. Contact your Sales Manager or Client Success Manager for more information on obtaining an API license.

Create the Zap

Now it’s time to pull everything together.

Inside Zapier you will start with creating a new Zap, and select:

  • Intercom as the App

  • New conversation as the type

  • Connect your account if not yet connected, select the connected account if it was previously connected

  • Test the trigger

Next for Action, you want the first of 2 Text Formatting that will be required. The text formatting is needed just as a validation step as if someone includes a quote character (“) in the subject or body, it will break JSON and cause the final steps to fail. These Text formattings will solve that.

For Action select:

  • Formatter by Zapier

  • Text

  • Replace

  • Set Input as 'Intercom - Subject

  • Set Find as “, replace as \”

Continue and Test the integration, it should pass

Click the '+' to add another step to the bottom, repeat the last step but use Intercom - Body as the Input

Save and Test again

Click '+' one more time to add the 4th step, which will be the actual API call to OneFocus

For Action, select Webhooks By Zapier, and Custom Request

Configure the Webhook call as follows:

  • Set Method to POST

  • Set URL to https://api.leadliaison.com/v1.0/prospects/add_activity.json?api_key=[apikey]. Replace [apikey] with the one created in Step 3 above (Create API Key).

  • Set Data Passthrough to false

  • Set Data to:

{"email": "[intercom email]", "activity_identifier" : "support_request__c", "activity_info": " [Intercom name or email]","activity_fields_data":{"subject__c":" [Data Formating Subject]","body__c":" [Data Formatting Body]","link__c":"[Intercom Link]"}}

For each option above such as [intercom email] or [Data Formatting] you will want to use Zapiers Insert Data options to specify dynamic content. You will also want to make sure the specific field variables such as support_request__c or link__c match what was configured in step 2 (Create Custom Activity) above.

 

Click to continue, and skip testing. You can now set the zap live and any new email or support request inside of messenger will now get transferred to OneFocus and appear on the prospect profile. Congratulations!

  

© 2021 Lead Liaison, LLC. All rights reserved.

13101 Preston Road Ste 110 – 159 Dallas, TX 75240 | T 888.895.3237 | F 630.566.8107 www.leadliaison.com | Privacy Policy