Conflict Resolution
The rules for deciding what survives when two connected systems change the same record differently.
See it
What it is
Conflict resolution is the rulebook for a sync when both sides changed the same logical record. Common policies are source-of-truth wins, latest timestamp wins, merge non-overlapping fields, or stop and ask a human. The right answer is often per field: billing status may belong to Stripe while a display name belongs to your app. Think of a Git merge conflict with nobody at the terminal to resolve it.
Define the policy before enabling two-way sync. Keep a last-synced snapshot or version so you can tell a genuine conflict from an ordinary one-sided edit. Automatic merging works for independent fields; money, permissions, inventory, and destructive changes usually need one authoritative owner or an explicit review queue.
Last-write-wins sounds objective but depends on trustworthy clocks. Clock skew, offline edits, and delayed webhooks can make the older decision arrive with the newer timestamp. Tombstones matter too: without a durable deletion marker, a stale copy can resurrect a record the other side deleted. Log the winning rule and both input versions so an operator can explain and undo the result.
Ask AI for it
Add conflict resolution to this two-way Salesforce sync. Store the last synced snapshot, local version, and Salesforce SystemModstamp for each record. On every run, perform a three-way comparison between the snapshot, local row, and Salesforce row. Merge fields changed on only one side, make Salesforce authoritative for Status__c, make the local app authoritative for displayName, and send same-field conflicts to a manual review queue. Represent deletes as tombstones, reject stale versions, and write an audit record containing both candidates, the chosen rule, and the winner.