Patterns
advancedintegration

Data Sync Bridge

Keep records synchronized between two or more systems. Handles create/update/delete propagation with conflict resolution. Essential for multi-system environments.

Views23
BPMN 2.0
On this page

Visual Flow

Rendering diagram…

When to Use This Pattern

Use a data sync bridge when:

  • The same data exists in two or more systems (CRM + ERP, HR system + AD, etc.)
  • Changes in one system must be reflected in the other(s)
  • You can't replace either system with a single source of truth
  • Manual data entry across systems causes errors and delays
Important

Bidirectional sync is significantly more complex than one-way sync. Start with one-way unless you truly need changes flowing both directions.

How It Works

One-Way Sync (Simpler)
Source System  →  Detect Change  →  Transform  →  Target System
(Salesforce)      (trigger/poll)    (map fields)   (SharePoint)
Bidirectional Sync (Complex)
System A  ←→  Change Detection  ←→  Conflict Resolution  ←→  System B
              (both directions)      (who wins?)

Implementation Guide

Step 1: Map the Data Model
Source Field (Salesforce)Target Field (SharePoint)Transform
Account.NameCompany TitleDirect copy
Account.PhonePhone NumberFormat: +1 (xxx) xxx-xxxx
Account.IndustryIndustry DropdownMap picklist values
Account.AnnualRevenueRevenueConvert USD string to number
Account.LastModifiedDateLast SyncedStore for conflict detection
Step 2: Choose a Change Detection Strategy
StrategyProsCons
Event-driven (webhooks, triggers)Real-time, efficientRequires webhook support
Polling (check every N minutes)Works with any systemDelay, more API calls
Change log (query audit logs)Catches all changesNot all systems expose logs
Timestamp comparison (last modified > last sync)Simple to implementClock skew issues
Step 3: Handle Create / Update / Delete

For each detected change:

Change TypeAction in Target
New recordCreate record with mapped fields
Updated recordFind matching record by sync ID, update changed fields only
Deleted recordSoft-delete (flag as inactive) or hard-delete based on policy
No match foundLog orphan warning, create new if appropriate
Step 4: Resolve Conflicts (Bidirectional Only)

When both systems change the same record:

StrategyRuleBest For
Last write winsMost recent timestamp winsNon-critical data
Source of truthDesignated system always winsOne system is authoritative
Field-level mergeTake each field from its most recent updateComplex but accurate
Human reviewFlag conflict for manual resolutionCritical data
Step 5: Maintain a Sync Log

Track every sync operation:

FieldPurpose
Sync IDUnique identifier for the sync pair
Source record IDID in source system
Target record IDID in target system
Last sync timestampWhen the records were last synced
Sync statusSuccess, failed, conflict
Error detailsIf failed, what went wrong

Tips & Best Practices

Warning

The #1 cause of sync failures is infinite loops: System A changes → syncs to B → B's change triggers sync back to A → repeat. Always mark synced changes so they're ignored on the return trip.

  • Use a sync marker field. Add a "SyncedBy" or "LastSyncSource" field to both systems. When your workflow updates a record, set this field to "workflow". When detecting changes, ignore records where SyncedBy = "workflow".
  • Start with one-way. Get one-way sync working reliably before attempting bidirectional.
  • Batch your syncs. Instead of syncing one record at a time, collect changes and sync in batches every 5-15 minutes. This is more efficient and easier to monitor.
  • Plan for backfill. You'll need an initial sync to populate the target system with all existing source records. Build this as a separate, one-time workflow.

Related patterns