Salesforce

How do I mass delete HubSpot records in Salesforce?

Last updated: November 1, 2017

Available For:

Marketing: Pro, Enterprise
Sales: Professional

If you wish to mass delete any HubSpot records (HubSpot Intelligence, HubSpot Logs, HubSpot Log Messages, HubSpot Activities) from Salesforce, you will need to generate a list or the IDs to be deleted and use a data loading application to do so.

You can delete orphaned HubSpot Intelligence records with no repercussions, but if you delete HubSpot Intelligence records that are attached to leads and contacts, those records will no longer sync with or display HubSpot information.

You may also delete HubSpot Logs/Log Messages (these records are purely for troubleshooting purposes), but if sync errors are still actively occurring, more Log Messages will be created as syncs continue to fail.

  • To find a list of orphaned HubSpot Intelligence records to delete, create a report of the HubSpot Intelligence where both the lead and contact are blank.
    • In Salesforce, create a report with the type HubSpot Intelligence
    • Click Add next to Filters and select Cross Filter (1)
    • Create a cross filter for HubSpot Intelligence | without | Contacts
    • Repeat this process to create another cross filter for HubSpot Intelligence | without | Leads
    • Add the field HubSpot Intelligence: ID to the table (2)

    • Click Savename your report, then click Save and run report.
    • Click Export details to export the report data to a .csv file and save to your desktop–be sure to include the record ID, as this it what you will need to run the delete
  • Download a data management system from the App Exchange Marketplace (such ad Apex Data Loader) or go to https://dataloader.io
  • Using the data loader, upload the .csv and run the delete function - this will remove the records in the file from Salesforce
    • It is important to note that the Salesforce recycle bin can only hold a finite number of records - once this limit is hit, the oldest records will be permanently deleted

This process can be used to mass delete any record from Salesforce, standard or custom. If you wish to delete all records of a certain type, you can run a report in Salesforce of the object you wish to delete, making sure to include the Record ID. You may also use the data loading application to run this query. Once you have a list of the IDs to delete, run the delete task in the data loader.

Was this article helpful?