Skip to main content

Merge lead and user profiles

How to manually and automatically merge lead and user profiles, so a user's information is tied to a single profile.

Written by Bobby Stapleton

If an existing user chats to you in the Messenger anonymously, via incognito browser mode for example, a new lead profile will be created for them in Intercom. This means you’ll have both a lead and user profile for the same person. 

In Intercom, a lead is an unidentified contact who has engaged via the Messenger but hasn't been authenticated. A user is an identified, logged-in contact.

Use this article to manually merge a lead into a user from the Inbox, set up automatic merging, or trigger a merge via the REST API. It also covers how to troubleshoot cases where a merge doesn't happen as expected.

When this happens, you can merge the lead profile with the user profile, so all of their information is tracked and stored in one place.


How lead and user profiles can be merged

A lead can be merged into an existing user’s account either manually, automatically or via the REST API. Merging a lead into a user means that any information associated with the lead will be transferred over to the user profile. 

Duplicate profiles can also arise from several common scenarios: cookie clearances, inconsistent user IDs, or email-only communication without linked identifiers. Another scenario is when a person is identified with a different user_id, creating a new profile even if the email matches.

There are certain types of profiles you can (and can’t) merge:

  • A lead can be merged into a user profile.

  • 2 leads cannot be merged.

  • 2 users cannot be merged. 

  • A user profile cannot be merged back into a lead profile.

Note: Because 2 users cannot be merged, if you need to consolidate conversation history from one user to another, you'll need to use the API workaround described below.

How to migrate conversations between users via the API

Note: This workaround requires developer access to the Intercom REST API.

Since merging two user profiles isn't supported, developers can use the Conversations API to manually migrate conversation history from one user to another. The steps are:

  1. Retrieve all conversations for the source user using the List conversations API — this requires only the contact's Intercom Contact ID.

  2. Recreate those conversations under the destination user's profile.

  3. Archive or delete the duplicate source user record to clean up.

Note: If you want to filter conversations by User ID rather than Contact ID, you must include the Intercom-Version header with a value of 2.5 or lower. Support for listing conversations by user was deprecated in API version 2.6 in favour of the Search conversations API, which works with all current API versions.

Here’s how to merge two profiles:

How to manually merge a lead into a user

There are two ways to trigger a manual merge:

Method 1: Change the lead's email address. Open the lead's profile, locate the Email field, and update it to match an existing user's email address.

Screenshot of a lead's profile in Intercom showing the email address field being changed to match an existing user's email, which triggers a manual merge.

The lead profile will then be automatically merged into the matched user's profile the next time the user visits your website or refreshes the page.


If there are two or more users with that email, the user who was most recently active will be merged with the lead.

Method 2: Import via CSV (comma-separated values). Import a file containing the lead's data.

Note: The lead will need to have the same email address as that of an existing user in order for a merge to happen. Also, if a lead already exists in Intercom, importing a CSV will not merge the existing lead into a user. A lead imported from a CSV will only merge into a user if it is a brand new lead.

Screenshot of the Intercom CSV import interface, showing the option to import a CSV file containing lead data. When a lead's email matches an existing user's email, the import triggers a merge.

Once the import is complete, any lead that meets the merge conditions will be automatically merged into the matching user profile. You can verify the merge by checking the user's profile in Intercom — the lead's conversations and attributes will appear there.

How to manually merge potential duplicates from the Inbox

Note: This option is available to any teammate with Inbox access. The merge option appears when viewing a conversation with a lead where a duplicate user profile has been detected.

The potential duplicates feature will warn you via the Inbox if there are any duplicate leads or users for the person you're currently speaking with. If the conversation is with a lead and the detected duplicate is a user, you can click Merge Lead into User. You'll see a preview of exactly what the merge will change before you confirm it. Learn how to read the merge preview After the merge, the lead profile will be deleted, and the user profile will remain as the surviving record. The conversation in the Inbox will now show under the merged user profile.

How automatic cookie-based merging works

Automatic merges require no action on your part. When a person visits your website in a logged-out state, they’re given an Intercom cookie to uniquely identify them. Once they start a conversation or reply to a message, they become a lead. 

Diagram showing how an anonymous visitor becomes a lead in Intercom when they start a conversation while an Intercom cookie is present in their browser.

If they log in or sign up to your product while the Intercom cookie is present, their lead profile will be automatically merged with their user profile. 

Diagram showing a lead profile being automatically merged with a user profile in Intercom after the user logs in while the Intercom cookie is present.

How to enable email-only automatic merging

Note: This setting requires workspace admin access to configure.

You can enable "Merging of unverified Leads into Users" in your Security Settings. This will change lead-user merging logic to merge leads into users based on email address alone. Leads and users won't be required to share the same device, cookie or session for a merge to go ahead. Before enabling this setting, ensure that "Secure the Messenger with JSON Web Tokens (JWTs)" is turned on in the Messenger installation's Security settings. Use the correct workspace secret when generating user_hash for test and production environments.

To minimize duplicates, enable identification settings across relevant pages. This is particularly important for single-page applications where logged-in data must be passed consistently. Additionally, ensure that your integration updates the default Email attribute in Intercom whenever a customer changes their email in your app to prevent the creation of separate profiles.

If you wish to enable this, you must enable Identity Verification beforehand as this ensures your user requests come from the users they claim to be.

Note: Any automatic merges will take place the next time the user logs into Intercom.

How to merge profiles using the API

Note: This section is intended for developers with REST API access.

You can also use the REST API to convert a lead to user. Use the following JSON structure for the merge request: { "from": "<lead's Intercom ID>", "into": "<user's Intercom ID>" }. After a successful merge, the lead is deleted, and the user becomes the surviving record.

A successful merge returns the updated user contact object. You can verify the merge by retrieving the user via the Contacts API.

Note: After merging a lead into a user, the frontend must re-initialize Messenger with the verified user_id and a computed user_hash (an HMAC-SHA256 cryptographic hash of user_id, signed with the Messenger Secret Key) to comply with enforced Identity Verification. Return these values in the one-time password (OTP) verification response so the frontend can boot Messenger as the correct user.


Common questions about merging profiles

What data is included in the merge?

  1. Attributes from the lead profile (only if the existing user profile contains no value for those attributes)

  2. Conversations (all conversations associated with the lead and user profile will be included)

  3. Events (the first/last occurred and the event count; no metadata is included)

To see exactly what will happen to a specific pair of profiles — including which values survive and how many conversations, tickets, notes, tags, and phone calls move across, use the merge preview.

Why didn’t a lead merge?

Most of the time, lead, and user profiles merge immediately. But since it's an background process (not instant), small delays can occur. For example, when a user logs in and there are one or more leads marked as requiring merging (based on cookie and email), the automatic merging process will begin on that user's next ping (page refresh). To troubleshoot this, ensure that user data passed to Intercom includes correct identifiers such as user_id and email. Also, confirm that the user's browser retains the necessary cookies, as expired or deleted cookies may prevent successful merges.

Leads created via the REST API don't have a browser session cookie, so they won't merge automatically the way cookie-based leads do. The following scenarios all result in no automatic merge:

  • If you create a lead via the API, and then a user with the same email address who didn't previously exist sends in a ping (by logging into your app), the lead and user profiles will not be merged automatically. Intercom only does asynchronous merging when the lead and user have the same anonymous_id (a unique identifier stored in the browser's session cookie). Leads created via the API do not have cookies. Instead you can manually merge via the API.

  • If you create a lead via the API and a user with the same email address already exists, then when that existing user sends in a ping (by logging into your app), the lead and user records will not merge automatically.

  • If you create a lead via the API, then create a user via the API, the lead profile won’t be merged automatically into the user profile when this user sends in a ping (by logging into your app).


💡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?