Skip to content

How to Manage Duplicate Contacts and Companies with the HubSpot Salesforce Integration

Introduction

In this article, we’ll explore how to address duplicate contacts and companies when the Salesforce integration is enabled.

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. This built-in functionality helps prevent duplicates and keeps data clean without manual intervention. To avoid duplication issues, consider disabling automatic company association or creation in HubSpot. This is particularly important when syncing Salesforce leads to HubSpot. Since Salesforce leads are not associated with accounts, they won’t create a company in HubSpot during the initial sync. However, a duplicate company may later be created when a related contact or company is created in Salesforce.

2. Contact Merging is possible
Merging duplicate contacts is supported in HubSpot when the Salesforce integration is active.

    • If the duplicate exists in both Salesforce and HubSpot: Merge in Salesforce first.
    • If the duplicate exists only in HubSpot: Merge directly in HubSpot.

3. Company Merging is not possible
Merging companies is not possible in HubSpot or with Koalify while the Salesforce integration is enabled. Instead, identify duplicate companies in HubSpot and delete them. While contact merging is supported with the integration active, company merging is not.

4. Avoid Disabling the Integration
HubSpot strongly advises against disabling the Salesforce integration to merge duplicates in HubSpot. Doing so may break the integration and disrupt the data sync. Instead, manage duplicates within Salesforce or use deletion for duplicate companies in HubSpot.

Salesforce Custom Properties in HubSpot

HubSpot Operations Hub provides data sync features to seamlessly sync data between the two platforms, allowing you to transfer data from Salesforce to HubSpot and vice versa.

  • Operations Hub Free: Supports standard mappings (e.g., Contact ID, Lead ID, First Name, Last Name).
  • Operations Hub Starter: Allows custom field mapping, enabling synchronization of unique Salesforce fields like date of birth, mobile phone numbers, as well as any properties created by your business that are unique to it.

These synchronized properties can be leveraged with Koalify duplicate rules to identify duplicates and define the primary record during merging.

salesforce-contact-mappings


 

Detect Duplicate Contacts with HubSpot Salesforce Integration Enabled

It’s common to have duplicate contacts in HubSpot, particularly when using HubSpot for marketing purposes. These duplicates may exist even if each contact has a different email address. If you have HubSpot integrated with Salesforce and a duplicate corresponds to just one Salesforce lead or contact record, you can safely merge the duplicates in HubSpot.

A. When Both Duplicate Contacts Sync with Salesforce

  • Merge duplicates in Salesforce first to ensure the sync remains intact.
  • Deduplicating in Salesforce will automatically remove the duplicate in HubSpot if settings are correctly configured.
  • If you merge duplicates in HubSpot first, only the primary contact will continue syncing, and the secondary contact’s sync will stop.

contacts-tab

B. When Only One Contact Syncs with Salesforce

  • Merge duplicates directly in HubSpot.
  • Koalify makes it easy to detect duplicates in HubSpot by matching property values, even when contacts have different email addresses. It also prevents merging contacts with different Salesforce Contact or Lead IDs by using these IDs as additional filters in the rule, set to "Is Equal to or Unknown." By adding filters like "Salesforce Lead ID matches property (or is unknown)" or "Salesforce Contact ID matches property (or is unknown)," you can ensure that only contacts without conflicting Lead or Contact IDs are included.  These are some example rules:

      • First Name, Last Name & Company Name Match

        • First Name matches property First Name
        • Last Name matches property Last Name
        • Company Name matches Property Company Name
        • Salesforce Lead ID matches property (or is unknown)
        • OR Salesforce Contact ID matches property (or is unknown)

      • First Name, Last Name & Mobile Phone Match

        • First Name matches property First Name
        • Last Name matches property Last Name
        • Mobile Phone matches property Mobile Phone
        • Salesforce Lead ID matches property (or is unknown)
        • OR Salesforce Contact ID matches property (or is unknown)

      • First Name, Last Name & Phone Match

        • First Name matches property First Name
        • Last Name matches property Last Name
        • Phone matches property Mobile Phone
        • Salesforce Lead ID matches property (or is unknown)
        • OR Salesforce Contact ID matches property (or is unknown)

  • 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.

    For example, if you are syncing both leads and contacts, you can create a rule to automatically prioritize the contact with a Salesforce Contact ID or Salesforce Lead ID as the primary record. This approach ensures the merged record remains correctly linked to Salesforce and avoids disruptions in data sync:

    • Salesforce Contact, Lead ID is known, Unsubscribed from all is not true

      • Salesforce Contact ID is known
      • Salesforce Lead ID is known
      • Unsubscribed from all email is none of True

primary rules

Bulk merge Duplicate Contacts with the HubSpot Salesforce Integration Enabled

With these strict duplicate and primary rules in place, you can bulk merge duplicates using Koalify’s workflow action.

Set the following enrollment criteria:

  • Koalify is Primary Duplicates is equal to False
  • Koalify Duplicate Rules is any of
    • Koalify Duplicate Rules is any of First Name, Last Name, Company Name, Different Salesforce Contact ID 
  • Optionally add extra criteria on:
    • Salesforce Contact ID is Unknown 
    • Salesforce Lead ID is Unknown

Then, add the Koalify Workflow Action: "Merge Duplicate Contact"

Salesforce Automated Contact Merges

Manually merge Duplicate Contacts with the HubSpot Salesforce Integration Enabled

For precise control, Koalify detects duplicates automatically and then enables you to manually merge duplicate records. When viewing a contact with a potential duplicate, you can easily merge or reject the suggestion using the actions button. 

Here is an example of a merge where the Salesforce Contact ID is used in combination with First Name and Last Name.

Additionally, here is an example of a merge where the Salesforce Lead ID is used in combination with First Name and Last Name.

After clicking the actions button, you will have the option to merge or reject the suggestion.

 

Detect Duplicate Companies with HubSpot Salesforce Integration Enabled

Unlike with contacts, you can't merge duplicate companies in HubSpot when the HubSpot Salesforce integration is active. In case both duplicates are synced via Salesforce, you can merge in Salesforce. When at least 1 Company is not Synced to Salesforce it's recommended to delete this company in HubSPot. Koalify can help you detect these records that can be deleted.

A. When Both Duplicate Companies Sync with Salesforce

  • Merge duplicates in Salesforce first to ensure the sync remains intact.
  • Deduplicating in Salesforce will automatically remove the duplicate in HubSpot if settings are correctly configured.

B. When Only One Company Syncs with Salesforce

Create a view of your duplicate companies. Make sure to exclude records that are synced to Salesforce:

  • Duplicates: Koalify Number of Duplicates > 0
  • Not Synced: Salesforce Account ID is Unknown

These are some extra filters to consider; ensuring that you're only excluding irrelevant records:

  • Inactive companies: Last Activity Date, Next Activity Date
  • Irrelevant industries or locations: Industry, Country
  • Number of Associated Deals is unknown
  • Number of associated contacts is equal to 0
  • Number of form submissions is unknown
  • Number of times contacted is unknown
  • Next activity date is unknown
  • Last activity date is unknown

Create a view of duplicate companies that are not synced