I am relatively new to Salesforce. I am struggling to get a solution for my task. I am given a list of 100 accounts (which do not have Salesforce IDs and are obtained outside from Salesforce). I need to find if these 100 accounts are present in Salesforce and if there is a match I need to obtain their Salesforce IDs so that we can continue to work on our project. It's basically matching the given accounts with accounts in our org. So do you have any knowledge how can I match them so that I would be able to obtain their IDs?


Assuming you have this list in csv format, you can match the Accounts on the basis of Account names. But please note, it is possible that multiple accounts may be operating with the same name. In that case, you will be confused which Account to pick up.

I don't think there is anything you can do with apex, this process has to be manual. You can follow something like this:

  1. You need to identify few fields (3 or 4) on the Account whose combination always yields a unique value. Create a new column of this unique combination on the excel sheet.
  2. Now, you need to export the Accounts using a dataloader. It is possible your ORG may have large data volume, so I would suggest you to export the data keeping in some filter condition. Don't forget to include Account id in the export as well because that's what we need. After you have the export, combine the same fields to generate a unique column.
  3. Now you have two different file with same unique column. You can now easily utilize VLOOKUP functionality of excel to get the Account Id of the matched accounts.

I hope that works for you.

|improve this answer|||||
  • Hi, Thanks for your reply. Yes the file is in csv format. But when I verify, the fields on accounts in sales force don't match with the file header names. I think this csv file is taken from some other source completely and they are asking me to find a match. In step 1, I understand that I need to merge 3or4 header names to create a unique value. is that so.? – Mike May 29 '15 at 5:53
  • It will be difficult for you find a match if the fields on Account doesn't match with the file header names. You need to contact that person who created that file to get more information. You can also consider using Account Number if the names are different. This seems to be a tedious task. – the_phantom May 29 '15 at 5:56
  • Yes that's the whole problem. There is no account number too. If at least, the header names matched, we could have used your way. – Mike May 29 '15 at 6:00
  • @Mike - I am not sure what else to look for. This is indeed a big problem. There has to be at least one matching field and header name. – the_phantom May 29 '15 at 6:01
  • The field for Account name in salesforce is "Account Name" where as in the file " Company name" is given. If even this doesn't match I don't know how other fields would match. – Mike May 29 '15 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.