When you run HubSpot and Salesforce side by side, duplicates cause problems for marketing, sales and reporting. They're harder to clean up than in a HubSpot-only portal, because one wrong merge can break the link between the two systems. This guide shows you how to manage and reduce duplicates without breaking your Salesforce–HubSpot integration.
These are 4 key concepts that you need to know:
1. Salesforce as the Source of Truth
Treat Salesforce as the primary source of truth, especially for company and account records. HubSpot automatically deduplicates Salesforce accounts into HubSpot companies using the Salesforce Account ID property. To avoid duplication issues, consider disabling automatic company association or creation in HubSpot. This matters most when syncing Salesforce leads to HubSpot. Salesforce leads aren't associated with accounts, so they won't create a company in HubSpot during the initial sync. A duplicate company can still be created later, when a related contact or company is created in Salesforce.
➡️ Learn more about HubSpot deduplication
2. Merging Duplicate Contact in HubSpot
HubSpot allows you to merge duplicate contacts, even with the Salesforce integration enabled. Here's how:
➡️ Learn more about how to merge HubSpot contacts
3. Merging Duplicate Companies in HubSpot with Koalify
HubSpot does not support merging companies while the Salesforce integration is active with the older version of the Salesforce integration. That’s where Koalify comes in. Koalify offers a merge-like behavior for company records, even when the Salesforce integration is enabled.
➡️ Learn more about how to merge HubSpot companies (when the Salesforce integration is disabled)
4. Avoid Disabling the Integration
HubSpot strongly advises against disabling the Salesforce integration to merge duplicates in HubSpot. Doing so can break the integration and disrupt the data sync. Instead, merge duplicates in Salesforce first, then merge the leftover records in HubSpot with Koalify rather than deleting them.
HubSpot Data Hub (formerly Operations Hub) syncs data in both directions between HubSpot and Salesforce.
These synchronized properties can be leveraged with Koalify duplicate rules to identify duplicates and define the primary record during merging.
HubSpot doesn't support native company merging with the Salesforce sync enabled with the old version of the integration, but Koalify provides a workaround.
A. When Both Duplicate Companies Sync with Salesforce
Don't merge companies that have different Salesforce Account IDs in HubSpot, because this can break the sync. Merge the accounts in Salesforce first. To stop Koalify suggesting these pairs, add a Salesforce Account ID filter to your duplicate rules:
Company Name (& Domain Name / Phone / Street Address) & Salesforce Account ID
B. When 1 Duplicate Companies sync with Salesforce
If one duplicate has a Salesforce Account ID and the other does not, make sure the synced record is retained as primary. Set a primary duplicate rule like:
Salesforce Account ID & Last Activty Date
Duplicate contacts are common in HubSpot, especially when you use it for marketing. HubSpot matches Salesforce leads and contacts on email address only, so two records for the same person with different email addresses are treated as two people. If a duplicate corresponds to just one Salesforce lead or contact record, you can safely merge it in HubSpot.
A. When Both Duplicate Contacts Sync with Salesforce
If both HubSpot contacts are linked to different Salesforce records, the duplicate exists in both systems. If you merge in HubSpot first, only the primary contact keeps syncing. The secondary contact's sync stops, and the duplicate stays in Salesforce. So work in this order:
Step 1: Merge in Salesforce first.
Choose the Salesforce record that is currently syncing with HubSpot as the primary. To find it, open the HubSpot contact, view all properties, and copy the Salesforce Contact ID or Salesforce Lead ID. If you pick a different primary, the HubSpot contact shows as no longer syncing, and you'll need to click Resync on its Salesforce Sync card.
Step 2: Decide what happens to the leftover HubSpot record.
This depends on your Salesforce integration settings:
Step 3: Let Koalify pick up the merge automatically.
After a merge in Salesforce, three things change on the leftover HubSpot record:
With its Salesforce ID gone, the leftover record no longer conflicts with the synced record. Your duplicate rules (see section B below) now flag the pair, and the Koalify workflow merges it automatically. Salesforce decides which records are the same person, and HubSpot follows.
💡 Check this in your own portal: create a contact view filtered on Salesforce Deleted is true, and add columns for the last Salesforce sync date and Salesforce Contact ID. Open a record you recently merged in Salesforce and check its property history. The Salesforce ID should have been cleared. If it hasn't, Koalify will keep holding that pair back.
B. When Only One Contact Syncs with Salesforce
First Name, Last Name & Company Name Match
First Name, Last Name & Mobile Phone Match
First Name, Last Name & Phone Match
💡 When you add a new rule, activate it first so it only flags duplicates, and make sure your merge workflow doesn't enrol that rule yet. Review the matches, then add the rule to the workflow. The email domain rule is generally safe to merge automatically once you've excluded free email domains such as Gmail and Outlook.
When merging contacts in HubSpot, it’s generally best to prioritize the contact synced to Salesforce as the primary record to ensure data continuity and proper synchronization. Koalify’s Primary Rules help you determine which contact to designate as the primary one during a merge.
Salesforce Contact, Lead ID is known, Unsubscribed from all is not true
With these strict duplicate and primary rules in place, you can bulk merge duplicates, and keep merging new ones, with Koalify's workflow action. This includes the leftover records from Salesforce merges.
Set the following enrollment criteria:
Then, add the Koalify Workflow Action: "Merge Duplicate Contact"
Should I merge duplicates in Salesforce or HubSpot first?
If both records are synced with Salesforce, merge in Salesforce first and keep the record that's currently syncing with HubSpot. If only one record, or neither, is synced, merge directly in HubSpot.
What happens to the HubSpot contact after a merge in Salesforce?
If deletion sync is on, HubSpot deletes it. If it's off, the contact is marked Salesforce Deleted = true, stops syncing, and loses its Salesforce Contact or Lead ID. Koalify then detects it as a duplicate and merges it into the synced record.
Why can't I merge companies in HubSpot when Salesforce is connected?
HubSpot disables native company merges while the Salesforce integration is active with old Salesforce - HubSpot integration. Koalify's merge-like behaviour for companies works with the integration enabled and keeps the Salesforce Account ID intact.