Deduplicate HubSpot & Salesforce While Keeping the Sync Active

deduplicate salesforce and hubspot


Deduplicating across HubSpot and Salesforce while the sync is active is incredibly complicated.

Often, attempting to deduplicate contacts in both HubSpot and Salesforce with the sync active leads to the sync breaking and a complicated manual process for figuring out what happened and how to ensure the records stay synced moving forward.

You have to ensure that all available duplicates in both platforms are merged down to the same "master record" and that those records remain synced throughout the process.

How It Works

When you merge duplicates in HubSpot and Salesforce, you merge records down into a master record, which retains the data. But between both platforms, there is no simple way to ensure that you merge down into the same master record. When the master record differs, this breaks the sync between the two platforms.

Insycle allows you to ensure that you merge down into the same synced master record on both HubSpot and Salesforce, keeping the sync active. To do this, we create a custom field named "Deduplication Master Record" in both platforms, and Insycle automatically tags the correct record to ensure the sync doesn't break.


Insycle makes it easy to deduplicate records across HubSpot & Salesforce while ensuring that the sync remains active.

To do this, you must set your sync settings correct, then create a "Deduplication Master Record" field in Salesforce and HubSpot to tag the master record. Then, you deduplicate both platforms using Insycle, merging down into the tagged master record in both HubSpot and Salesforce.

This allows you to ensure that both platforms merge down into the same record, maintaining the sync.

Step 1: Setup Your HubSpot+Salesforce Sync Settings Correctly

First, make sure your HubSpot and Salesforce sync settings are set up for this process to work. Having the wrong setting could result in lost data on HubSpot.

Navigate to the HubSpot and Salesforce sync settings in HubSpot.

First navigate to Settings > Integrations > Connected Apps > Salesforce "Actions" Button > Go to settings.

sync settings

On the Salesforce app settings page, click on the Sync Settings tab, then on the Salesforce→HubSpot sub-tab.

Here you can choose whether or not a contact or lead is deleted when the corresponding contact has been deleted in Salesforce.

If HubSpot contacts are set to be deleted when the corresponding Salesforce contact is deleted, when you merge in Salesforce, the duplicate contact in HubSpot will be deleted and not merged into the corresponding master in HubSpot. That could result in lost data.


We especially want to make sure that these settings are in place:

  • When a Salesforce lead is deleted → Do Nothing In HubSpot
  • When a Salesforce contact is deleted → Do Nothing In HubSpot

This ensures that the duplicates are not automatically deleted when you merge in Salesforce. Later, we will use Insycle to merge the corresponding records in HubSpot so that the sync remains active.

Step 2: Create Custom Fields to Tag the Master Record

First, we have to add a field to tag the correct master record in both HubSpot and Salesforce. We'll need to create a custom field on both platforms. This is a one-time setup.

The new custom field needs to be named “Deduplication Master Record” and needs to be added to any record you plan to deduplicate.

Insycle will automatically populate this field with the right value. To prevent users from accidentally changing its value, you may want to hide this field from the default layout or make it non-editable from the view.

Add the Custom Field in Salesforce for Accounts

  • Label: Deduplication Master Record
  • API name: Deduplication_Master_Record__c
  • Data type: checkbox

Add the Custom Field in HubSpot for Companies

  • Label: Deduplication Master Record
  • API name: deduplication_master_record
  • Data type: single checkbox
dedup salesforce hubspot

Next, in the Sync Settings, you'd need to set it to copy the value of the custom field from Salesforce into HubSpot (one way).

Simplifying the Synced HubSpot and Salesforce Deduping Process-1

You can follow the same process for Contacts, Leads, Opportunities, and Deals, create the appropriate custom field, and sync mappings.

Step 3: Deduplicate Salesforce Contacts in Insycle

Go through the deduplication process just as you would if you were doing so without the sync in place. Learn more about Insycle's deduplication features.

find duplicates

During this process, you can set flexible rules for choosing a “master record” that all of the other duplicate records will merge into.

master selection rules

Insycle also gives you the ability to pick which data to retain in the master record on a field-by-field basis.

Then, the master record will be decided based on the rules that you set but may pull values in fields from several different records from the duplicate group, based on the rules that you set in the Fields tab.

By-field duplicate feature

As part of the merge process, Insycle will automatically populate the “Deduplication Master Record” with the value “TRUE” for the record that is chosen as the master, based on the Master Selection rules.

Step 4: Use Insycle to Deduplicate Your HubSpot Records

After the merge in Salesforce, the value of “Deduplication Master Record,” which was set by Insycle, will automatically sync from Salesforce to HubSpot and can be used in the "Master Selection" criteria.

In the “Master Selection” step, set only one rule “Deduplication Master Record” is True (or "Yes," both Yes/True and No/False are treated the same).

master record is yes

This will ensure that the master record on HubSpot aligns with the master record on Salesforce. The “Deduplication Master Record” value is available in HubSpot due to the sync.

And just like that, you've deduplicated in both HubSpot and Salesforce, merging into the same master record and keeping the sync active.

Preview Changes Before They Go Live

With Insycle's Merge Duplicates module, you can preview the changes that you are making to your data before those changes are pushed to your live database. That way, you can check to ensure your deduplication template is working as expected.


You can set up ongoing automated deduplication for HubSpot and Salesforce records with Insycle on the module level, using Recipes, or integrating with Workflows on the HubSpot side. You can view all scheduled automations on the “Automations” page on your dashboard.

You can schedule your Merge Duplicates templates to run on an automated, set schedule. You do this by clicking the Review button at the bottom of the module page.

Then, you go through a three-step process to run the operation. In the third step, you can choose the "Automate" tab, and schedule your template to run on a set schedule.

merge duplicates salesforce automation

By doing this, you can consistently ensure that HubSpot and Salesforce are deduplicating while keeping the sync active.

Audit Trail and History

The Activity Tracker lets you review all changes made through Insycle. At any time you can download a CSV report of the operation and records affected.

Frequently Asked Questions

Can I merge HubSpot and Salesforce companies and accounts without breaking the sync?

Yes. HubSpot doesn't let you merge companies when the sync is active. To learn more click here.

Does it matter which platform I run the original deduplication process in?

For contacts, you can deduplicate in HubSpot or Salesforce first and the "Deduplication Master Record" field will be populated automatically.

Do I have to create the deduplication master record field for this to work?

Yes, you do have to create the field for deduplicating across HubSpot and Salesforce without breaking the sync. Keeping the master records consistent across both platforms is how you are able to keep the sync active, and there is no workaround aside from time-consuming manual processes.

Does HubSpot allow you to merge companies while the sync is active?

HubSpot doesn't let you merge companies when the sync is active, but Insycle does.

Additional Resources

Related Blog Articles

Related Help Articles

Additional Resources