I already have the data available in our salesforce org. Now I have new excel files coming in which has update to existing records and some new records. We have to upload these into org. I am thinking of Upsert operation in Apex data loader.

Please correct me if I am wrong. Any insights would be appreciated.

Thank you.

  • 1
    HI Reddy, you are in right direction !! Commented May 6, 2015 at 15:35
  • Thanks man. How to extract the record ids for the existing records. If there is any material, please redirect me to that. Commented May 6, 2015 at 15:36

4 Answers 4


If you have an external Id defined in the object which is also present in your csv file, you can go ahead and do the upsert right away. Otherwise, you'd first have to export the existing records, use a VLOOKUP in Excel to match the Salesforce record Id with your csv file, and do the upsert afterwards.


As your excel file has data for both new and existing records you would need to do an Upsert. It will update the existing records, and insert the new records.

The only thing you'll need to ensure is that for the records that need updating, that they have the ID field or a unique external Id field populated that will ensure they match up to the correct records in Salesforce.


Dataloader.io provides an option to do an upsert using a unique field to "match" to existing records in Salesforce. The field you use to match does not need to be an "External ID" field in the schema.

For example, if you were importing Leads for an upsert, you could choose to match on "Lead.Name" and Dataloader.io would figure out which were existing records (and update those) and which ones were new (and insert them).


You can check this post to understand how upsert operation works without need of actual Salesforce Id , and this article might also be helpful.

Basicaly you need to identify which field is unique in your excel sheet and make sure that field is marked as External Id in your Salesforce schema.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .