4

I am integrating with the Salesforce REST API and am upserting Lead records against an External ID using a Patch method.

For some crazy reason I am seeing duplicate records on the Salesforce side, even though I am making the call only once from my external Java code. I know that I need to make my external ID enforce unique values, but shouldn't using patch keep this from happening too?

About 10% of my records per day are getting created at least 2 times (and the timestamps are identical).

Edit

I just dug through my logs - my external system is getting hit with requests to send back to SF half a second apart - this is creating near-simultaneous calls to SF and the dupe records. I'm going to put some queueing in place on the external system to throttle this.

  • 1
    Are you sure that the external ids are the same? Are you sure you don't have duplicates being upserted from the external system? – Mike Chale Aug 1 '13 at 18:19
  • I am making the api call once per record from my code and the Lead records are completely identical. Could server load cause calls to be fired in parallel? – Ed Berman Aug 1 '13 at 18:26
  • Upserts don't create duplicates, though, unless the external ids are different. Are you sure the external ids are the same? Or that duplicates don't already exist? – Mike Chale Aug 1 '13 at 18:43
  • I just dug through my logs - my external system is getting hit with requests to send back to SF half a second apart - this is creating near-simultaneous calls to SF and the dupe records. I'm going to put some queueing in place on the external system to throttle this. – Ed Berman Aug 1 '13 at 19:20
  • 2
    Don't forget to write that up as the answer! – Mike Chale Aug 2 '13 at 11:25

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.