Use this article to delete records from your CRM based on CSV rows in the Magical Import module and interpret the results in the follow-up report.

header-cleaning.png

With the Magical Import module, you can upload a CSV containing records you know need to be deleted, match the CSV rows to CRM records, and easily delete the data in bulk.

Before You Begin

Decide whether you may need to refer to this data or restore it later. If so, create an export first to act as a backup — see Exporting CRM Data Based on CSV Rows.

What Your Initial CSV Requires

Your CSV only needs to include the fields used in your Matching Criteria, such as record IDs or other unique identifiers. 

In the example CSV for deleting contacts below, you could use email addresses, or a combination like first name + last name + phone number, or first name + last name + company name, as the Matching Criteria:

magical-import-contacts-sample-csv-for-deleting-records-700w.png

The image above shows a sample CSV with columns for Email, First Name, Last Name, Company Name, and Phone Number, illustrating a CSV built for deleting contact records.

In the example CSV for deleting companies below, you could use the CRM's record ID, company name, website URL, or any combination of these as the Matching Criteria:

magical-import-companies-sample-csv-for-deleting-records-700w.png

The image above shows a sample CSV with columns for Record ID, Company name, and Website URL, illustrating a simple CSV built for deleting company records.

Selecting CSV Rows for Deletion

Once you've configured your Data Mapping and Matching Criteria, you can choose which CSV rows to include in the delete process. By default, Insycle runs the delete against every row in your CSV. To delete only specific records, return to the Preview and check the boxes beside the records you want to include. Leave all checkboxes blank to delete every matched record.

magical-import-salesforce-accounts-preview-checkboxes-700w.png

The image above shows the Preview panel in the Magical Import module, with the Filter set to "Show Only Valid Rows." The CSV Column header row displays Account ID, Company Domain Name, Industry, and Country/Region. An arrow points to a checked checkbox next to row 27, and row 28 is also checked, while the other visible rows remain unchecked, illustrating how to select specific records for the operation.

Running the Deletion

Running the delete process matches your CSV rows to existing CRM records using your configured Matching Criteria, then removes those records from your CRM.

  1. At the bottom of the Magical Import page, under Action to take with the CSV, select the Delete tab.
  2. Click the Delete button to run the operation.
  3. Click Yes to confirm.
  Important: The delete action has no preview step. Once you confirm, the matched records are removed from your CRM immediately.
magical-import-hubspot-companies-delete-40-700w.png

The image above shows the "Action to take with the CSV" panel in the Magical Import module, with the Delete tab selected. A checkbox to email the CSV report to an address is checked, and a "Delete 40 Companies" button appears below.

After you confirm, the emailed report shows how many rows from your CSV matched records in your database and were deleted, along with details for rows without a clean match.

The Result column may show:

  • Deleted - A match for the CSV row was found in the CRM, and the record was deleted
  • Failed - An issue prevented a clean match. The Message column provides details so you can troubleshoot

The Messages indicate:

  1. Succeeded - A match was found, and the record was deleted from the CRM
  2. No record in [object type] has matching value - There is no match for the CSV row in the CRM
  3. Validation: [record ID]: Duplicate row X - The same value appears in more than one CSV row 
  4. Matching Hierarchy: Cannot match to a single record because X [object type] records have the same value. Deduplicate or use different Matching Hierarchy in Data Mapping - There are multiple records in the CRM that match your CSV row based on the selected Matching Criteria. Try adjusting the Matching Criteria to refine the matches, or it may indicate you need to deduplicate the records in your CRM
magical-import-hubspot-companies-delete-CSV-numbered-700w.png

The image above shows a portion of the follow-up CSV report from the Magical Import module, with columns for Result, Message, Row, ID, Company name, and Deeplink. Four rows are highlighted with numbered callouts corresponding to distinct Message values: (1) "Succeeded," where a match was found; (2) "No record in Companies has matching value," where no match was found; (3) "Validation: companyId: Duplicate row 2," where the same value appeared in more than one CSV row; and (4) "Matching Hierarchy: Cannot match to a single record because 3 Company records have the same value. Deduplicate or use different Matching Hierarchy in Data Mapping," where multiple records matched.

Additional Resources

Troubleshooting — Review the Magical Import Troubleshooting article if you're not seeing the results you expect when deleting records.

Frequently Asked Questions — Check out the Magical Import FAQs for a complete list of questions about importing data into HubSpot using the Magical Import module.

Related Help Articles