Revert Merge Operation on HubSpot Records

monster-count-boxes.png

How to Restore Merged HubSpot Records 

Maintaining the integrity of your CRM relies on effective duplicate record management, but merging duplicates can sometimes yield unexpected results. In such cases, you might need to reverse the merge process.

While HubSpot's knowledge base states that unmerging records is not possible, Insycle offers some workarounds. Although it may not offer a full recovery, Insycle can partially restore merged duplicates and undo the changes to the master records.

Unmerging HubSpot Contacts

This workaround allows you to re-create contacts. 

Process Summary

  1. Remove "Additional Emails" from the master records 
  2. Prepare and clean up the CSV report.
  3. Import merged contacts back into the CRM.
  4. Fix associations for master records and duplicates.

Step-by-Step Instructions

Remove Additional Emails from Master Records

When you ran the merge operation, you should have received an email containing the CSV report.

If you can't find the email, you can download the file from the Activity Tracker. Click on the relevant Run ID to download the CSV of records affected by the merge operation.

activity-tracker-merge-duplicate-operation-run-id-w-arrow.png

When contact records are merged, the email address from the master becomes the primary email, and the duplicate record email addresses are added as Additional Email Addresses. These additional emails need to be cleared from the master because when you add the duplicate records back in, the emails need to exist only on the duplicate record so they can be used as the unique identifier. If these aren't removed from the master, Insycle will identify them as existing records instead of new records needing to be imported.

Open the CSV report, and extract the Master record rows into a new CSV file. Include only the Record ID in the new file.

unmerge-duplicates-csv-master-record-rows.png

In the Data Management > Magical Import module, upload the new CSV of master records

magical-import-unmerge-duplicates-import-masters-select-csv.png

In Step 1, resolve any warnings that appear.

Under Step 2, set the Identity field to the Record ID.

magical-import-unmerge-duplicates-import-masters-step-2.png

In Step 4, under the Bulk Update tab, select the Additional Email Addresses field, and in the New Value dropdown, select Delete.

magical-import-unmerge-duplicates-import-masters-step-4.png

Under Step 5, click Import.

Learn more about importing from a CSV using Magical Import.

Prepare and Clean Up the CSV Report

Open the original CSV report. Remove columns of read-only fields like Deeplink, and Create Date, and the merge operation columns- Master Record ID, Duplicate Group, and Result. 

Import Merged Duplicate Contacts to the CRM

In the Data Management > Magical Import module, upload the updated CSV

Under Step 2, set the Identity field (Email is a good one for contacts), and set the Records Mode to "Only create net new." 

magical-import-unmerge-duplicates-re-import-merged-step-2.png

Under Step 5, click Import.

All the duplicate records should import, and the masters won't since they already exist.

magical-import-unmerge-duplicates-re-import-merged-step-1.png

Fix Associations for Master Records and Duplicates

Remove Extra Associations from Master Records

When the duplicates were merged, all existing associations from the duplicates were automatically assigned to the master record—these associations need to be removed.

In the RevOps Acceleration > Associate app, you can use the Replace feature to remove any non-primary associations.

The Remove non-primary associations between Contacts and Companies template is a good place to start.

Under Step 1, filter for records where the "Primary Associated Company ID" exists, and also include criteria to target the records that have the associations you want to remove. Click Search and check to make sure the records you want to update are what appear in the Record Viewer at the bottom of the page.

bulk-operations-remove-non-primary-associations-step-1.png

Under Step 2, select the Replace action and configure the association. Set up the fields for the association your records should have. Don't worry about what currently exists, Insycle will take care of all the cleanup automatically.

bulk-operations-remove-non-primary-associations.png

Preview the changes and when this looks good, Update the records in HubSpot.

Learn more about using Insycle to add or remove HubSpot associations.

Add Associations to Duplicate Records

By default, HubSpot will automatically associate the records to Companies based on the email domain, but if you need more control over what association is added, or want to make additional associations, you can use Insycle's Associate app. 

Explore the templates for an existing solution that may be close to what you need.

In Step 1, filter the contact records down to those you want to associate to companies.

bulk-operations-hubspot-associate-contacts-to-companies-step-1.png

Under Step 2, define the rules that will create the relationship between the contacts and companies. 

bulk-operations-hubspot-associate-contacts-to-companies-step-2.png

Preview the changes and when this looks good, Update the records in HubSpot.

Learn more about using Insycle to associate HubSpot contacts to companies.

Recovering Merged HubSpot Companies, Deals, Tickets, Custom Objects, and Line Items

Process Summary

  1. Use HubSpot to restore records.
  2. For companies, remove additional domains from master records.
  3. Fix associations for master records.

Step-by-Step Instructions

Recover Deleted Duplicate Records

The HubSpot merge API that Insycle uses when merging companies, deals, tickets, custom objects, and line items deletes the duplicate records after the merge. These records can easily be recovered by accessing HubSpot's recycle bin.

In HubSpot, navigate to the object type. Click the Actions menu and select Restore records

hubspot-restore-records.png

All deleted duplicate records from the merge will be available for restoration on the Restore page, complete with all associations, activities, history, and field values.

Learn more about HubSpot's Restore Records feature.

Remove Additional Domains from Master Records (Companies Only)

When company records are merged, the domains of the duplicates are reassigned into the master record's Additional Domains field. Before restoring the merged companies, these additional domains need to be cleared from the master.  When you add the duplicate records back in, the domains need to exist only on the duplicate record so they can be used as the unique identifier. If these aren't removed from the master, Insycle will identify them as existing records instead of new records needing to be imported.

Open the CSV report from your email or the Activity Tracker, and extract the Master record rows into a new CSV file. Include only the Record ID in the new file.

unmerge-duplicate-companies-csv-master-record-rows.png

In the Data ManagementMagical Import module, upload the new CSV of company master record IDs

magic-import-hubspot-companies-upload.png

In Step 1, resolve any warnings that appear.

Under Step 2, set the Identity field to the Record ID.

magical-import-unmerge-duplicates-import-masters-step-2.png

In Step 4, under the Bulk Update tab, select the Additional Domains field. Leave the New Value field blank to clear any existing values.

magic-import-hubspot-companies-step-4.png

Under Step 5, click Import.

Learn more about importing from a CSV using Magical Import.

Fix Associations on Master Records

When the duplicates were merged, all existing associations from the duplicates were automatically assigned to the master record—these associations need to be removed. Activities such as notes, emails, or tasks from the duplicates that were assigned to the master record cannot be removed.

In the RevOps Acceleration > Associate app, you can use the Replace feature to remove associations.

Under Step 1, filter for records where the number of associated records > 0, and also include criteria to target the records that you are unmerging. Click Search and check to make sure the records you want to update are what appear in the Record Viewer at the bottom of the page.

bulk-operations-hubspot-associate-companies-to-contacts-step-1.png

Under Step 2, select the Replace action and configure the association. Set up the fields for the association your records should have. Don't worry about what currently exists, Insycle will take care of all the cleanup automatically.

bulk-operations-hubspot-associate-companies-to-contacts-step-2.png

Preview the changes and when this looks good, Update the records in HubSpot.

Learn more about using Insycle to add or remove HubSpot associations.

Note that there is no cleanup action needed for the duplicate records since HubSpot's restore function includes all associations and activities.

Tips for Backing Up Data Before Merging

Backing Up Fields from Insycle

When setting up your merge operation in the Merge Duplicates module, add extra fields to be included in the CSV report, in case you need them later for undo and/or just for general review.

Under Step 4, on the Record tab, add any key fields to the bottom of the list. You may need to experiment with the Conditions, depending on the field type.

merge-duplicates-hubspot-step-4-records-w-extra-fields-for-backup.png

Backing Up Complete Records from HubSpot

Before running a large merge operation, export all records directly from HubSpot to CSV file.

In HubSpot, navigate to the object type and click Export. Select file format CSV, and include All properties on records.

hubspot-export-records.png

Additional Resources

Related Articles

Related Blog Posts