# What architectural strategies govern multi-org integration synchronization and master data management in large enterprises?

**Topic:** Integration · **Difficulty:** Medium · **Tags:** Integration, Multi-Org Architecture, Master Data Management

Read it on the site: https://www.forcechallenges.com/interview-questions/what-architectural-strategies-govern-multi-org-integration-synchronization-and-master-data-management-in

## Answer

**Basics:** Companies end up with several orgs (acquisitions, regions, business units) that need to share customers, products or orders. Master Data Management (MDM) decides which system owns each attribute (the golden record) and how other systems receive it. Without that, the same account is edited in three places and conflicts appear.

**How it works:**
1. Choose a topology: hub-and-spoke through an MDM or integration platform (such as MuleSoft), or point-to-point for very few orgs.
2. Assign ownership: for each object and field define the system of record.
3. Add a global ID (external ID field, unique) on each record and use upsert on that ID.
4. Publish changes via Change Data Capture or Platform Events, consumed through Pub/Sub API, or by middleware; on the other side upsert and acknowledge.
5. Add loop guards and monitoring.

**Advanced / deep dive:** Options for sharing without copying include Salesforce Connect (cross-org adapter, external objects) for read-mostly data, and Data Cloud for unified profiles; copy-based sync is used when you need native features (reports, automation) on the data. Legacy Salesforce-to-Salesforce is limited; prefer modern patterns. Circular updates occur when org A's change triggers sync to org B, which triggers sync back. Prevent by filtering on the integration user, an origin/version field, a content hash, or by using ChangeEventHeader (changeOrigin, commitUser, changedFields) and ignoring changes made by the sync itself. Conflict handling choices: field-level ownership, last-write-wins using a timestamp (needs trustworthy clocks), or manual stewardship queue. Data residency, field-level security and PII in transit need design too. Plan for retries, ordering (sequence numbers per transaction) and replay windows (72 hours for platform events and CDC).

**Code / config example:**
```apex
// CDC subscriber: skip changes made by the integration user to avoid loops
trigger AccountChangeTrigger on AccountChangeEvent (after insert) {
    List<String> globalIds = new List<String>();
    for (AccountChangeEvent evt : Trigger.new) {
        EventBus.ChangeEventHeader h = evt.ChangeEventHeader;
        if (h.getCommitUser() == Label.Integration_User_Id) continue; // our own change
        if (h.getChangeType() == 'UPDATE' && evt.Global_Id__c != null) globalIds.add(evt.Global_Id__c);
    }
    if (!globalIds.isEmpty()) System.enqueueJob(new SyncToHubJob(globalIds)); // one job, no loops of DML/callouts
}
```

**Hidden gotchas & must-remember points:**
- Always define the system of record per field, not just per object.
- Use external IDs and upsert so retries are idempotent.
- CDC triggers run as the Automated Process user, so identify the origin via the header, not UserInfo.
- Replay window is 72 hours; a longer outage needs a full reconciliation.
- Salesforce Connect shows data but does not copy it, so reporting and automation are limited.
- Avoid point-to-point meshes; they grow quadratically.

**Best practice:** Document the data ownership matrix first, then pick hub-and-spoke with a global ID and explicit loop guards.

---
Source: ForceChallenges · last updated 2026-11-02
