Sea of Knowledge

Merge Salesforce Contacts when Synced with HubSpot

Written by Lauren Ryan | July 2021

If I merge contacts in Salesforce, will the corresponding HubSpot contacts merge also?

No, but wouldn’t that be cool?

When the HubSpot Salesforce integration is installed, duplicate management is a headache. Unfortunately, there’s really no way around it (except keeping your data clean 100% of the time). So, if you’re imperfect like us, here’s an overview of how to merge duplicate leads and contacts in Salesforce when integrated with HubSpot.

Identify Duplicates to Merge

Many companies use a third-party deduplication tool like DataGroomr to manage Salesforce duplicates. While Datagroomr is an efficient way to merge Salesforce contacts and leads, it can cause problems when integrated with HubSpot.

HubSpot uses the email address on the contact object to deduplicate Salesforce leads and contacts. Other fields that may be used to match in Salesforce (based on the standard or custom Salesforce matching rules) will not flag the contact as a duplicate in HubSpot.

So, when you’ve identified a duplicate in Salesforce using matching rules or a third-party tool like DataGroomr, explore the following scenarios before clicking ‘Merge.’

Merging Salesforce Leads or Contacts with the Same Email Address

How Salesforce Leads and Contacts Match to HubSpot Contacts

When a contact is created for the first time in HubSpot, HubSpot will scan Salesforce for contacts and leads with the same email address. HubSpot will then sync with the first record that Salesforce returns. Salesforce returns these records in random order, so there is no exact science as to which record will associate with the HubSpot contact. After the initial sync, HubSpot will sync with the most recently updated record with that email in Salesforce. This record may be different from the record in the initial sync.

Merging Leads and Contacts in Salesforce

  1. Identify the duplicate leads or contacts to merge.
  2. Open the lead or contact in HubSpot and navigate to the Salesforce Lead ID or Salesforce Contact ID property.
  3. Find the Lead or Contact that matches the Salesforce ID in HubSpot.
  4. Use that Lead or Contact as the master record.

Managing Merged Contacts in HubSpot

Integration Deletion Settings

In your HubSpot Salesforce Integration settings, you can determine what happens in HubSpot to contacts and leads that are deleted in Salesforce. Usually, companies choose to delete the contact in HubSpot when the Lead or Contact is deleted in Salesforce. This is also the path we’d recommend.

Check this setting by navigating to HubSpot Settings > Integrations > Connected Apps > Salesforce > Sync Settings > Salesforce → HubSpot

If this setting is set to delete the HubSpot contact, the contact that you chose to merge into the master record in Salesforce (let’s call that record Fred) will be deleted. If Fred didn’t have a history in HubSpot (emails, form submissions, website visits), this is fine. Fred can go. However, if Fred had a history that’s worth remembering, this deletion will erase it. If Fred and the master record he was merged into have activity histories, it’s best to merge the HubSpot records as you merge the Salesforce records.

Merge Contacts in HubSpot

In order to keep the activity history from both contacts in HubSpot, either turn off the integration setting to auto-delete HubSpot contacts when Salesforce Leads or Contacts are deleted or merge the contacts in HubSpot quickly after you merge them in Salesforce. The HubSpot Salesforce integration refreshes in 15-minute intervals or when certain sync triggers occur. If the setting is not turned off before the sync occurs, you will lose all of Fred’s history, and his record will be deleted.

When you’ve completed the merge in Salesforce, navigate to the master record in HubSpot and select Actions > Merge. Then, find Fred (the record you’d like to merge into the master) and complete the contact merge.

HubSpot Error Message: This Contact is No Longer Syncing with Salesforce

Uhoh! If you chose to keep Fred instead of the most recently synced record in HubSpot, you would receive a sync error on the remaining HubSpot contact. This error message indicates that the Salesforce record HubSpot was syncing with no longer exists. To fix this issue, click “Resync” below the error. While this is easy to fix, it can be very manual to fix this issue for hundreds or thousands of duplicates where the wrong master record was selected.

Merging Salesforce Leads or Contacts with Different Email Addresses

HubSpot will not recognize contacts with different email addresses as duplicates when synced with Salesforce. When merging these fields in Salesforce or a third-party tool, open both contacts in HubSpot and merge the contacts as you did in Salesforce. Or, if the record being merged (Fred) does not have history, merge the contacts or leads in Salesforce and let HubSpot delete the merged contact.

Need help?

Need help managing deduplication in HubSpot and Salesforce? We're experts in the HubSpot Salesforce integration and have spent many hours deduplicating. If you're in need of HubSpot Salesforce integration consulting services, we're happy to help!