Bulk removing invalid emails from Salesforce

Hey, who ever thought they’d see a Salesforce how-to on this blog? One of the things I do at work is put together our newsletter and send it to our leads and contacts. But our list of contacts has built up over the years and some of the email addresses are no longer valid. So here (largely for my own reference later) are the steps I use to clear out the invalid emails. There may be an easier way, this is just what I’ve figured out.

  1. Export bounced emails from Constant Contact
  2. Put bounces in a¬†spreadsheet tab called “CC”
  3. Export your Leads from Salesforce (just get the ID and email fields)
  4. Put the Leads into another tab on the spreadsheet
  5. Use this formula to identify addresses that need to be removed (because they exist on the CC tab):
    =IF(ISERROR(VLOOKUP(B2,CC!$E$2:CC!$E$2000, 1, FALSE)),"", "REMOVE")
  6. Sort by ColumnC Z->A
  7. Copy the LeadID column for anything with REMOVE into a new sheet
  8. Add a second column header called “Email”
  9. Save as CSV
  10. Open the Salesforce DataLoader
  11. Select Update
  12. Login
  13. Select Lead or Contact as appropriate and add your CSV file
  14. Create the field mapping
  15. Run that puppy
  16. (repeat steps 3-15 for Contacts)

Leave a Reply

Your email address will not be published. Required fields are marked *