BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
42 / 81 · Module 12 — Idempotency and Duplicate Prevention · filtered: interview← prev⊞ allnext →

12.24Versioning

Now suppose events can arrive out of order.

Current state:

version 42
status = SUSPENDED

Then stale event arrives:

version 41
status = ACTIVE

If you simply upsert:

status becomes ACTIVE

Wrong.

So store/check:

sourceVersion

and apply only if:

incomingVersion > currentVersion