How does HubSpot's Salesforce integration handle duplicate Contacts or Leads?

Last updated: November 20, 2017

Applies to:

Marketing Hub Professional, Enterprise

Both HubSpot and Salesforce advise against using duplicate records, as it can lead to data corruption. HubSpot automatically deduplicates contacts based on email address. In Salesforce, you can set up a process for managing duplicate records.  

Some sales teams may create new Lead records when a known Contact re-engages or becomes a new opportunity. The integration will not create new records if a record with a matching email exists, so the recommended solution for managing Lead re-engagement is to either create new tasks or new opportunities and associate them with the existing Contact record.  That being said, it may sometimes be impractical to change your current processes and duplication may be unavoidable. If you do have duplicate records in Salesforce, here's what you can expect:

  • If multiple records with the same email address exist in Salesforce, but the record is being created for the first time in HubSpot, HubSpot searches Salesforce for records with that email address. Salesforce returns all records that match (this does not occur in any consistent order, but in general the first record returned is the oldest), and HubSpot syncs with the first record returned. 
  • When syncs are triggered going forward, HubSpot will sync with whichever record has been most recently updated in Salesforce. 
  • HubSpot deduplicates based on email address. If you have records with the same name or other matching fields (e.g. Name) in Salesforce, you may consider this a duplicate, but to HubSpot this will appear as two unrelated records.

If you are attempting to clean up duplicate records in Salesforce by merging records, you should always choose the currently syncing record as the master. To do this, look for the record in Salesforce with data in the HubSpot Intelligence Visualforce window. If you have mapped the HubSpot contact property Last Salesforce Sync Time to a custom field on your Leads and Contacts in Salesforce, you can also use that field to determine the syncing contact during the merge process. This property in HubSpot is updated each time a record syncs from HubSpot to Salesforce, so it will always indicate the Salesforce record that is most up to date.

If you accidentally merge to a record that is not currently syncing with HubSpot, the corresponding record in HubSpot will be unable to sync and a message will appear indicating that the record in Salesforce has been deleted. If this is the case on only a few records, you can manually Resync from the contact record in HubSpot.  If you have accidentally bulk merged records incorrectly, please contact HubSpot Support.  


If there are multiple records in HubSpot with different email addresses that correspond to one record in Salesforce (represent one individual), you should merge the HubSpot records. When doing so, select the record that's syncing with the newly merged record in Salesforce as the primary record in HubSpot. For instructions on merging HubSpot contacts, click here.

If you have enabled the setting to delete HubSpot contacts when a Salesforce Lead/Contact is deleted, the secondary contact within HubSpot will be deleted when its matching record within Salesforce is merged into the Master record.