BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
853 / 1048 · Module 17 — Interview System-Design Scenarios← prev⊞ allnext →

17.5Why Upsert?

Don't do:

Query Account
 ↓
if exists
    Update
else
    Create

unless you actually need current Salesforce state.

Instead:

Upsert
by External_Customer_ID__c

Advantages:

fewer API calls
simpler flow
concurrency safer
retry safer
naturally idempotent