0

I have built a REST endpoint, which writes data(Accounts) to Salesforce. Currently, for a single record, there could be multiple (20-30 times) upserts within 1-to-5 seconds. Behind the scenes, it's a complicated scenario. Also, I can not make it asynchronous using staging object.

Why Upsert: As I may have to query the record before deciding on insert/update(which would slowdown the service, as the records are in millions)

Now the error I face is

DUPLICATE_VALUE, duplicate value found: UNIQUE_ID__c duplicates value on record with id: 0010Q00000ABDA

What could be possible solution to this?

  • Breaking down upsert into insert/update is more efficient than using upsert. You may actually like to go that route. – Jayant Das Apr 3 at 17:22

Your Answer

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

Browse other questions tagged or ask your own question.