How to Merge Duplicates in Salesforce and HubSpot

11 minutes read
Sarah - 24.11.2023
How to Merge Duplicates in Salesforce and HubSpot

Does merging HubSpot contacts have any impact on the Salesforce database?

In short, no.

Merging contacts in HubSpot does not have any effect on Salesforce in the HubSpot Salesforce Sync. However, only the primary record selected in HubSpot will continue to sync with Salesforce once you have merged the two records. When using the HubSpot Salesforce integration, managing duplicates can be quite challenging. Unless you are able to completely prevent duplicate data (which, let's be honest, is not always easy), here's a guide on how to merge duplicate leads and contacts in Salesforce when integrated with HubSpot.

Why Is Duplicate Data So Common?

Every CRM I have encountered has consistently expanded its number of records. Without preventing duplicate data entry, any cleanup effort becomes pointless.

One of the primary causes of duplicates in Salesforce and poor data quality arises during data imports. For example, inconsistent naming conventions or data formatting errors during the import process can result in duplicate entries. Moreover, when importing data from various sources such as different departments or external sources, the likelihood of duplicates increases.

If you enter data manually, you will inevitably encounter more duplicate data. With multiple users inputting data, maintaining consistency across the board can be a challenge. Additionally, some users may inadvertently create duplicate records if they are unaware of existing data in the system, especially when communication and training regarding data entry are unclear.

Regardless of the cause, duplicate data can be a headache for anyone attempting to make sense of their data. It not only leads to inefficiencies and inaccuracies but also hampers the ability to derive meaningful insights and make informed decisions based on reliable data.

Implementing effective measures to prevent and manage duplicates is crucial for maintaining data integrity and maximising the value of your CRM system.

Identify Duplicates to Merge

When managing duplicates in Salesforce-HubSpot integration, it's common for users to leverage third-party deduplication tools such as dedupe.ly or DataGroomr. However, the integration process presents certain limitations, particularly regarding unique identifiers and matching criteria.

In both Salesforce and HubSpot, certain fields serve as record-matching criteria, often referred to as unique identifiers. In the case of HubSpot, the email address is considered the unique identifier for contacts records.

Unlike HubSpot, Salesforce uses multiple properties as unique identifiers.

When you sync Salesforce with HubSpot, the data from these fields is compared. If the values in these fields match between the two platforms, the system recognises the records as representing the same contact or lead. This is how duplicates are usually identified and prevented.

However, if Salesforce has been configured to use other fields (beyond the default ones) for matching and identifying duplicates - perhaps due to the custom matching rules your organisation has set up - these won't necessarily be recognised by HubSpot.

For example, let's say your organisation uses a custom field called 'Customer ID' in Salesforce to match contacts. You've set up a custom matching rule in Salesforce that identifies duplicates based on this 'Customer ID'. However, when you sync Salesforce with HubSpot, HubSpot won't recognise 'Customer ID' as a matching field unless you've specifically mapped it to a corresponding field in HubSpot. As a result, if there are two contacts with the same 'Customer ID' in Salesforce, but different email addresses, HubSpot might not flag these as duplicates

 

Caution Before Merging

Before merging identified duplicates in Salesforce, it's essential to consider the nuances of the integration.

Ensure that any fields you're using for matching in Salesforce are also recognised and utilised by HubSpot. Otherwise, you could end up with duplicates in HubSpot that aren't flagged as such, due to the differences in matching rules between the two platforms.

 

 

Understanding the HubSpot - Salesforce Sync

Before we dive into the steps for merging duplicates, it's essential to understand how Salesforce leads and contacts match HubSpot contacts.

When a new contact is created in HubSpot, it initiates a scan in Salesforce to identify any leads or contacts with the same email address.

Here's where it gets interesting: Salesforce returns these matching records in a random order. This means there's no predetermined rule or order (like alphabetical or chronological) determining which record gets returned first. Because of this randomness, the first Salesforce record that matches the new HubSpot contact could be any of the existing leads or contacts with that same email.

HubSpot then syncs with this first returned record from Salesforce. This forms the initial link between that particular Salesforce lead/contact and the new HubSpot contact.

However, this initial link isn't fixed. After the first sync, HubSpot will sync with the most recently updated record with that same email in Salesforce. This means if another lead or contact in Salesforce with the same email gets updated, HubSpot might break the initial link and form a new link with this most recently updated record.

This behaviour ensures that HubSpot always maintains sync with the most up-to-date information in Salesforce. But it also means that the HubSpot contact could end up being associated with a different Salesforce record than it initially synced with.

Merging Salesforce Leads or Contacts with the Same Email Address

Merging Leads and Contacts in Salesforce involves a series of systematic steps to ensure data consistency and accuracy.

Merging Leads or Contacts in Salesforce using HubSpot:

  1. Identify the duplicate leads or contacts to merge: First, figure out which leads or contacts are duplicates.

  2. Open the lead or contact in HubSpot: Once you've identified a duplicate, go to your HubSpot account and open the details of that lead or contact.

  3. Navigate to the Salesforce Lead ID or Salesforce Contact ID property: Within the details of the lead or contact in HubSpot, find the Salesforce Lead ID or Salesforce Contact ID property. This ID is unique to each lead or contact in Salesforce and serves as a link between the two platforms.

Managing Duplicates in Salesforce

  1. Find the Lead or Contact that matches the Salesforce ID of the record in HubSpot: Now, go back to Salesforce and use this ID to search for the corresponding lead or contact.

  2. Use that Lead or Contact as the master record: Once you've found the lead or contact in Salesforce that matches the Salesforce ID in HubSpot, consider this as the master record for merging. The master record is the one whose information will be kept in HubSpot after the merge. 

  3. Merge the records: In Salesforce, select the duplicate records and initiate the merge process, choosing the identified master record. Salesforce allows you to merge up to three duplicate records per object at a time and you'll be able to select which fields to keep on the master record from each of the merged records. The duplicate management tool in Salesforce shows you a list of all fields containing different values and you can pick which values to keep on the final master record. This information will then sync with the corresponding record in HubSpot. 

 

Managing Merged Contacts in HubSpot

Within the settings of your HubSpot Salesforce Integration, you have the ability to configure the actions that will occur in HubSpot when contacts and leads are removed from Salesforce.

We recommend deleting the record from your HubSpot account when it is deleted in Salesforce.

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

It's important to consider the activity history of each contact in HubSpot before merging records in Salesforce. If the contact being merged (and subsequently deleted in HubSpot) has valuable history, it's best to merge the contacts in HubSpot as well to preserve this data.

For example...

Let's imagine you have two contacts in Salesforce: "Jane Francis" and "Jane F". Both of these contacts also exist in HubSpot, and they each have activity histories.

Jane Francis has been very active - she's opened a lot of your emails, filled out several forms on your website, and visited your site multiple times. Jane F, on the other hand, doesn't have much history. She's opened a few emails but hasn't engaged much beyond that.

Now, you've decided to merge these two contacts in Salesforce, choosing Jane Francis as the master record because she has more complete information.

If your settings in HubSpot are set to delete the contact that is merged in Salesforce, then when you merge Jane Francis and Jane F in Salesforce, Jane F's record in HubSpot will be deleted.

If Jane F didn't have much history in HubSpot, this might not be a big deal. Her minimal interactions aren't crucial to your understanding of your audience's behaviour or your marketing efforts.

However, if Jane F did have a significant history in HubSpot, like Jane Francis, her deletion would mean losing all of that valuable information. If both Jane Francis and Jane F had important activity histories, you'd ideally want to merge their records in HubSpot at the same time you merge them in Salesforce. That way, you retain the activity history from both contacts under the merged record.

Merge Contacts in HubSpot

To preserve the activity history of both contacts in HubSpot when merging in Salesforce, you can either turn off the auto-delete setting in HubSpot or promptly merge the corresponding contacts in HubSpot after the Salesforce merge.

  1. Turn off the auto-delete setting: HubSpot has a setting that will automatically delete a contact in HubSpot if that same contact is deleted in Salesforce. If you're merging contacts in Salesforce and don't want to lose the associated activity history in HubSpot, you can turn off this setting. This way, even after the merge in Salesforce, the 'non-master' contact in HubSpot (in your previous example, Fred) won't be automatically deleted.

  2. Merge quickly in HubSpot: If you can't or don't want to turn off the auto-delete setting, another option is to quickly merge the contacts in HubSpot right after you merge them in Salesforce. You would have to do this before the next sync between HubSpot and Salesforce occurs.

Merging Records Post-Salesforce Merge

Once you've completed the merging process in Salesforce, head over to the master record in HubSpot. Choose Actions > Merge. Now, locate and select Jane F (the contact you plan to merge into the master record) and finalise the merging of contacts.

 

 

Dealing with HubSpot Error: Contact No Longer Syncing with Salesforce


If you opted to keep Jane F's record instead of the most recently synced one in HubSpot, you'd encounter a syncing error on the remaining HubSpot contact. This error message indicates that the Salesforce record that HubSpot was previously syncing with no longer exists. To resolve this, click Resync beneath the error. While this solution is straightforward, it can become labour-intensive if you're dealing with hundreds or thousands of duplicates where the incorrect master record was chosen.

refresh-no-longer-syncing-with-salesforce

 

Merging Salesforce Leads or Contacts with Varying Email Addresses


HubSpot won't identify contacts with different email addresses as duplicates when they're synced with Salesforce. When merging these fields in Salesforce or a third-party tool, open both Jane Francis and Jane F's records in HubSpot and merge them just like you did in Salesforce.

Alternatively, if Jane F doesn't have a significant history, you can merge the contacts or leads directly in Salesforce and allow HubSpot to delete the merged contact (Jane F).

Managing duplicates between HubSpot and Salesforce might seem like a daunting task, but Six & Flow has got you covered. As experts in HubSpot Salesforce Integration, we possess an in-depth understanding of the complexities and intricacies involved in this process.

We're here to help you navigate the tricky landscape of data management, making sure your records are accurate and well-maintained. We'll take care of identifying duplicates, deciding on the master record, and conducting merges in both Salesforce and HubSpot while preserving crucial activity histories. So you can focus on what you do best - growing your business - while we take care of the rest.

Get in touch to get the most out of your HubSpot Salesforce Integration.

 

Unleash the power of RevOps

Maximize revenue and sales today.

Begin experiencing faster growth by managing revenue generation cross-functionally. Download the complete guide to RevOps to learn how you can align your teams and scale revenue.

Get The Guide