Intercom Integration


#1

Hi,

I just started the free trial of unbounce. Since I want to create a landing page to offer a voucher to my new customers. I would like to send automatically emails to those new leads through Intercom.

So I would like to know if it is possible to integrate Intercom to unbounce and if yes how does it work ?

Thank you for your help,

Best,

Victoire


#2

Hi Victoire, 

You have a couple of options when it comes to integrating with Intercom:

  1. You can use Zapier to send form submissions to Intercom and create/update users. 

  2. You can use Unbounce’s webhook feature to connect to Intercom’s API and again create/update users. 

Zapier is a paid monthly service and using the webhook would require writing a bit of backend script to accept, parse and forward the data to Intercom.

The decision really comes down to how many leads you are planning on pushing to Intercom.
At a certain point, a custom webhook might be cheaper then Zapier.

Best,
Hristian

EDIT: You can also try one of the built-in integrations Unbounce offers (ex. MailChimp) to send these vouchers. Of course, that depends on how important it’s for you to use Intercom for these vouchers. 


#3

HI Hrisitian,

Thank you for your help. I think I am gonna try Unbounce’s webhook.

Best,

Victoire


#4

Hi,

At the end I used Zapier. I made a Zap to create a new user in Intercom each time there is a new form submitted in Unbounce.

It seems my Zap is working (see screenshots). And in Intercom once we got a new user, Intercom sends automatically an email to this new user.

Therefore to test the landing page I filled and completed the form but I never received any emails.

How can I check if I made an error on my landing page ?

Thank you for your help,

Best,

Victoire


#5

Hi Victoire, 

Quick question:

Does the zap successfully create a new user in Intercom when you submit the form?

If the new user is successfully created then the problem must be with the set up inside Intercom.

Best,
Hristian


#6

Hi Hristian,

Thank you for your reply. 

In fact Intercom got the new users create thanks to the Zap but the user shows as unknown (see screenshots).


Normally I should have a profile like the one below in Intercom :

Is there may be a problem regarding the form I made in Unbounce, which is only “first name” and “email” ?

Thank you for your help,

Best,

Victoire


#7

Hi Victoire, I thought I’d pitch in a little here, I believe that User ID that says unknown in your screen shot is actually set by you and not the automatic user ID set by the system which is where I think the confusion may come from. 

Intercom needs at least a User_ID or an email address but doesn’t insist on both being provided at the time of creating a new user. I think in this instance you might not be supplying Intercom with enough data to fully cover your use case.  Try adding User_ID into your Unbounce form and passing a string with your Zap as a test and see if that helps. 

Also just so you’re aware you can just send the form data to their user API via a post (meaning you don’t have to use Zapier if you don’t want to). The post URL for creating a new user is: https://api.intercom.io/users

Just include your APP ID and API Key in hidden fields on your Unbounce form and send the data to that URL. 

All API requests must be sent over HTTPS. An App ID and API Key must be included in the request - Basic Authentication is used to submit these details, where the App ID and the API key should be be used as the username and password respectively. Please note that you will need an API Key with write permissions to perform POST  and  DELETE  requests.
Here  is a link to the resource page which will tell you which fields are required, which are automatically set and which ones are linked/related or optional. 

https://developers.intercom.io/reference#create-or-update-user

I hope that helps a little, the documentation is pretty well set out so if you need any help with this it should be fairly straight forward, just shout out again :slight_smile:

Cheers

Stuart.


#8

Hi Stuart,

Thank you for your reply. That really helps a lot :slight_smile:

I have a question regarding the user_id in the form. How can I generate an automatic user_id ? Or should I ask like a phone number to turn it in user_id ?

Thank you for your help,

Best,

Victoire


#9

Hi Victoire,

I just picked up a bit of script from Stackoverflow…

I’d take this approach…

Something that’s going to be unique(ish) to the customer + a random number, so for instance you could take their first name, john then add a randomly generated number so their user ID becomes john98765432.

This means it would be extremely unlikely to get A) 2 Johns with B) The same random number generated and hence you’d get unique user names with a very very small probability of getting the same username generated. 

If you wanted to ensure the username was 100% unique you’d need to store the ones you’ve already generated and used and check against that list or go for a sequential user ID and track which number is next globally, bit more of a pain and not worth the very very tiny chance of crossover.

Bit of JS code for generating a random number and converting it into a string 

function guid() {
function s4() { return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); } return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); }Then call it using the following…

//pull in the firstname value from your form
var user_id =   $("#firstname").val();

//add the random number on the end
user_id = user_id + guid(); 

//update hidden user_id field in the form to have the new value
$("#user_id").val(user_id);

This assumes that your first name field in your unbounce form is called firstname and your user_id field in the form is named user_id. Change the targeting for the relevant element if needed. 

Hope that gives you one possible solution, it doesn’t contain any error trapping or logic and you’ll need to set it up to trigger on something, either button submission or the onChange event for first name but it should give you the general idea.

Cheers

Stuart.


#10

@Victoire_Losseau @Hristian

You can also try Automate.io’s Unbounce to Intercom Integration

You can create leads, users or add events in Intercom when Unbounce form is filled.

unbounce intercom integration