UNABLE_TO_LOCK_ROW retries from middleware are duplicating records — is upsert on an External ID the right fix?
UNABLE_TO_LOCK_ROW and retried writes We have an Apex integration where inbound middleware retries a request whenever the first attempt fails partway through — for example after a row lock contention error such as UNABLE_TO_LOCK_ROW, or when our own Queueable retry logic re-enqueues a job. The Apex side currently performs a plain insert, so every retry after