2.18A developer question you're likely to get
Interviewer:
Why don't you just query Salesforce first and determine whether to create or update?
You can say:
“If the source system provides a reliable external identifier and Salesforce has that field configured appropriately, I'd normally prefer upsert. It reduces the round trip, eliminates explicit query/create/update branching, and helps make retries idempotent.”
Excellent answer.
Instead of:
Query
↓
Choice
├─ found → Update
└─ missing → Create
you get:
Upsert
MuleSoft itself describes Upsert as creating or updating based on a custom identifier and recommends it in many situations to avoid duplicate records.