I will put 2 scenarios over here. I have created following csv file to upload data into my org, where
External Site Id
is External Id
(unique is not selected)
External Site key
is External Id
and also unique
Scenario 1:
By default, Batch size of dataloader is "200"
So, if we perform upsert based on External Site Id
or External Site Key
, then in both the cases, Salesforce will try to process both the records in single batch and it will throw the error "Duplicate External Ids"
Scenario 2:
Change batch size to "1"
Perform upsert based on External Site Id
or External Site Key
, then in both the cases, Salesforce will try to process both the records in two different batches and successfully uploads the data.
2 things to be noted here:
You will NOT receive any errors during upload. both of the records will be processed.
Most importantly, Salesforce will update data with latest record that has been updated. So, in SFDC we will find single record (here the last record) with External Site Id