function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jenna HildebrandJenna Hildebrand 

Checking List Against Records in Salesforce

Hi there,

What is the best way to check a list—like an excel spreadsheet—against existing records in Salesforce? This seems like a super basic question, so I might be missing an obvious solution. I've been given a spreadsheet of 3,000+ leads that our Marketing department will take action on. However, they first want to know if any of these leads in the spreadsheet already exist in Salesforce as leads or contacts.

If the list is small, I can pull a report matching by email address or something like that. However, with thousands of leads needing to be checked, that process is less feasible. I'd really appreciate any advice you can offer!

Thanks!
Alain CabonAlain Cabon
Hi,

A trick could be:
  1. Create a csv file with two columns: emailmkt_dept__c
  2. Create the new custom fields: mkt_dept into Lead and Contact
  3. Upsert your file with the data import wizard or the dataloader using the email as a standard external Id
  4. Create a report filtering on mkt_dept is not null
  5. Delete the fields mkt_dep now useless
That could be sufficient
Jenna HildebrandJenna Hildebrand
Hi Alain, I like this! Thanks for the workaround. Really appreciate your feedback.
Alain CabonAlain Cabon
The first advantage is that the upsert will not create the non-matching records by the emails because it lacks some mandatory fields for the contacts and the leads for the inserts (only the updates should work). The non-matching records will be just rejected.
The second advantage is that the Excel export of the result of a report is not restricted for the number of rows.