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
Salesforce P1Salesforce P1 

reference Id for upsert Operation over API

Hi,

Salesforce sObject Tree API supports Reference Id to tag each individual record instance in the Request. Same Reference Id is used in response as well, which will make the external system easy to identify the response against each record instance in the Request. However the same is not supported in the UPSERT operation over sObject collection. Is there a way to identify the response against each record instance in request apart from salesforce Id in the response.

Thanks
 
SwethaSwetha (Salesforce Developers) 
HI ,
The sObject collection API does not work in the same way that Composite and Graph does. The objects in the upsert response are returned in the same order as the request. You just need to have some kind of counting mechanism in your client side code. 

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you