All Collections
Contacts
Tracking, filtering & grouping your customers
What is user_id and why would I want to use it?
What is user_id and why would I want to use it?
Beth-Ann Sher avatar
Written by Beth-Ann Sher
Updated over a week ago

All users have two IDs within Intercom, one that we automatically generate called the Intercom ID, and one that is manually set as user_id .

We use the following hierarchy to determine which value is going to be used to identify a user:

  1. Intercom ID

  2. User ID

  3. Email

With this in mind, if you update a user and specify an Intercom ID and user_id, we'll use the Intercom ID to look them up and set the user_id to the value that you've passed to us.

To get the Intercom ID for a user, you just need to use the Get a contact endpoint and note the id attribute.

Then, to update them you'd use the Update a Contact endpoint:

{
id: 'idFoundFromLookingUpUser'
user_id: 'newUserID'
}

Why would I want to use user_id?

You may want to send Intercom a user id (a unique user identifier that won't change) instead of, or in combination with an email address.

  • One reason to do this is that while the user's email address is subject to change in most apps, you can control the unique identifier that is sent to us, therefore maintaining a consistent user record in Intercom even if the user changes their email address.

  • Another reason to use the user id is if you are very concerned with user privacy and do not want to send an email address at all (just remember that if you don't send an email we won't be able to send email messages for you).

  • If you use phone numbers, and not email addresses, to identify your users, user_id acts as a unique identifier

Why do users have multiple matching emails?

The issue you are seeing here is due to the fact that you are only identifying your users on Intercom via email, and not using User ID.

Intercom uses email and User ID values as ways of uniquely identifying and matching an end-user with their corresponding Intercom profile, with User ID taking priority, if it is used.

If you are sending user data containing just the email (and no User ID), and there are multiple users on your Intercom workspace that have the same email address, then Intercom doesn't know which one to identify with the end-user, resulting in an error.


💡Tip

Need more help? Get support from our Community Forum
Find answers and get help from Intercom Support and Community Experts


Did this answer your question?