Print this page

How do I mass delete Campaign Members?

Knowledge Article Number 000005104
Description

How do I mass delete Campaign Members?

Resolution

It is possible to delete individual members from a Campaign by navigating to the Lead or Contact in question, then deleting the Campaign from the Campaign History related list.

Although there is no mass delete function for Campaign Members in the Salesforce CRM GUI,
you can mass delete via the Data Loader.  This functionality is available to Enterprise and Unlimited users.

Campaign Members - both Leads and Contacts - do not show up as related list or field in GUI.

IMPORTANT: To obtain the Campaign Member ID, you cannot run a Contact or Lead report. Likewise do not export Contacts or Leads using Data Loader.

Instead, run a Campaign Member Report or do a Data Loader export of the Campaign Members to get a list of Campaign Member Id's, which then you can use the Data Loader to delete.

**For instructions on how to run the Campaign Member report, or how to create a custom link to show each Campaign's members refer to the article How do I get a list of Campaign members (contacts and leads)


How it works: Deleting a Campaign Member removes the association between the Lead/Contact record and the Campaign.

Always create a backup of your data before doing any mass deletes or updates.

Method 1 (using Campaign Member reports and Data Loader):
1) BACKUP - Make a backup of Campaign Members:
Data Loader > Export > Show All Objects > Campaign Members > Fields: Id, Campaign Id, or all fields
Determine SOQL condition such as Campaign Id <equals> (Campaign Id value), or export all records
**This backup can also be performed by exporting the Campaign Member report**

2) EXPORT
a) Navigate to the Campaign from which Members will be deleted
b) Click the "View All Campaign Members" link (if the Member ID column does not appear on the report, be sure to customize and add the Member ID column)
c) Export this report to a CSV file by clicking on the Export Details button. 

3) Delete - Compile a list of the Campaign Members who should be deleted.  The Delete command will delete each Campaign Member listed in the file!
Data Loader > Delete > Show All Objects > Campaign Members
IMPORTANT: Map fields: Member Id (CSV file) to Id (Salesforce CRM Campaign Members object)
Select a directory to where the error and success files will be saved and Click Finish.
Method 2 (using only the Data Loader):
1) BACKUP - Make a backup of Campaign Members:
Data Loader > Export > Show All Objects > Campaign Members > Fields: Id, Campaign Id, or all fields
Determine SOQL condition such as Campaign Id <equals> (Campaign Id value), or export all records

2) EXPORT - Extract list of Campaign Member Id's for later update
Data Loader > Export > Show All Objects > Campaigns > Fields: Campaign Id, Campaign Member Id(s)
Determine SOQL condition such as Campaign Id <equals> (Campaign Id value), or export all records

3) Delete - Compile a list of the Campaign Members who should be deleted.  The Delete command will delete each Campaign Member listed in the file!
Data Loader > Delete > Show All Objects > Campaign Members
IMPORTANT: Map fields: Campaign Member Id (CSV file) to Id (Salesforce CRM Campaign Members object)
Select a directory to where the error and success files will be saved and Click Finish.





promote demote