SfSkills Domains Docs GitHub

Home / architect / migration-architecture-patterns

migration-architecture-patterns

Architectural patterns for org migration — org merge (consolidate two orgs into one), org split (separate one org into two), and coexistence (run both for a transition period with identity / data / metadata bridges).

Open the skill folder on GitHub


Org Migration Architecture Patterns

The architecture-level decisions for org migration. Three shapes — merge, split, coexistence — each with its own discipline of metadata audit, data partitioning, identity continuity, and rollback planning. The cutover mechanics (freeze windows, parallel-run vs hard-cutover, runbook ordering) live in devops/go-live-cutover-planning. The upstream "should we have one org or many" decision lives in architect/multi-org-strategy. This skill is the how-to-execute layer in between.

What this skill is NOT. Picking go-live time-of-day, comm plans, and rollback runbooks is operations — that's the cutover skill. Whether multi-org is the right end-state at all is strategic — that's the multi-org-strategy skill. Here we assume the strategic call has been made and the cutover-runbook team is downstream.


Before Starting


Questions to Ask Before Configuring

Each question traces to a gotcha in references/gotchas.md.

QuestionWhy it mattersWhat a good answer addsWhat proper configuration adds over just doing it
"Which external systems store Salesforce record IDs, and in 15- or 18-character form?"IDs are org-scoped, and 15-character IDs are case-sensitive (Gotcha 2)An external-reference inventory and an 18-character remapping tableNo silent breaks in warehouses and finance systems after cutover
"Must created dates, creators, and owners survive the move?"Audit fields reset to the load user and time unless set on create (Gotchas 10, 12)Audit-field permission enabled before the load; owner mapping from the remapping tableAge-based reports, SLAs, and audits stay true
"Which automation, validation rules, and sharing calculations run in the target during the load?"Loads fire automation and sharing work unless deferred (Gotchas 3, 4, 8)A load-window switch list and the documented load orderNo side-effect emails, overwritten values, or multi-hour recalculations
"If coexistence: what crosses the bridge, and how does it recover after a refresh or org migration?"Event replay resets on migrations and refreshes; retention is 72 hours (Gotcha 11)A watermark-based resync designA bridge that recovers without manual reconstruction
"If the split is regulatory: what is the enforced boundary, and who signs it off?"Any runtime bridge into protected data defeats the split (Gotcha 6)A boundary definition with regulator sign-offIsolation enforced by architecture, not by policy
"Which logs and archives must outlive the source org?"Setup Audit Trail keeps at least 180 days; big objects cannot be bridged cross-org (Gotchas 9, 13)An export list with retention ownersCompliance questions answerable after decommission

What proper configuration adds over "just moving the data": every external reference still resolves, history keeps its original authors and dates, and each wave has a rollback that lands in a known state.


Core Concepts

The three migration shapes

ShapeDefinitionTypical driver
MergeN source orgs → 1 target org. Source orgs are decommissioned (or become read-only archives).M&A consolidation; cost reduction; eliminating org sprawl
Split1 source org → N target orgs. Some users / data move to a new org; the source org may keep a subset.Regulatory isolation; divestiture; org-limit relief; BU autonomy
CoexistenceBoth orgs continue to operate, with a runtime bridge (identity, data, events) between them.Phased migration; long-term federation; mid-acquisition transition

A real migration is often temporal coexistence followed by hard cutover — coexistence as a transition shape, ending in a merge or a clean split. Designing coexistence as a permanent state is rarer (and usually a sign that the multi-org-strategy decision wasn't actually made).

Pre-migration metadata audit (the most-skipped step)

Before any data moves, build a metadata delta between source and target. This is the single most important deliverable — skipping it is the most common cause of cutover failures.

For each metadata type, compare:

The audit produces a delta document — for every metadata mismatch, a decision: align source, align target, or accept the mismatch with a documented mitigation.

Record ID remapping

Salesforce record IDs are org-scoped. A 15- or 18-character ID from the source org has no meaning in the target.

External systems that have stored Salesforce IDs (CRMs that link to SF records, data warehouses, analytics tools, integration mapping tables) will fail if you don't remap.

The remapping pattern:

  1. Capture source-Id → external-key before migration. Every

    record that's about to move must have a stable external key (custom external-Id field, or a synthetic one generated for the migration).

  2. Insert into target with the external-Id field populated.

    Salesforce assigns new IDs.

  3. Build the target-Id ↔ external-key ↔ source-Id table. Persist

    it.

  4. Update external systems. Replace stored source IDs with target

    IDs using the remapping table.

  5. **Maintain the remapping table for the life of any external system

    that might still reference source IDs.** Some never get fully migrated.

The most common failure: external systems that nobody knew were storing Salesforce IDs. Surface them in the inventory step; post-cutover discovery is expensive.

Coexistence bridges

When both orgs run simultaneously (transitional or permanent), choose the bridge based on what crosses the boundary:

CrossingBridgeNotes
Users (same person uses both orgs)SSO via Salesforce Identity + per-org permission setsIdentity is the first thing to bridge; otherwise users have separate accounts that drift
Real-time data viewing (read records from the other org without copy)Salesforce Connect with the cross-org adapter (SfdcOrg, a distinct adapter type, not OData)No data copy; reads on demand. Latency-sensitive. Big objects are not reachable this way
Eventual-consistency data sync (changes in one org propagate to the other)Platform Events + Apex subscribers in each orgDecoupled; high-volume events retained 72 hours; replay resets on org migration or refresh, so add a watermark resync
Bulk batch syncMuleSoft / middleware or a scheduled Heroku Connect-style workerRight when volume + transformation are heavy
Authentication tokens / API accessConnected Apps with mutual OAuthEach org grants the other an integration user / client credentials

Coexistence design must address: identity continuity (SSO), data continuity (which records are visible to which org), and rollback (can we cleanly disable the bridge if migration is paused or reversed?).


Common Patterns

Pattern A — Org merge with phased cutover

When to use. Two source orgs need to consolidate into one target. Both source orgs continue operating during the transition.

Sequence.

  1. Inventory + audit. Metadata delta between source A, source B, and target. Data inventory. External integration inventory.
  2. Target-org schema reconciliation. Resolve metadata deltas in target — pick winning picklist values, harmonize validation rules, resolve API name conflicts.
  3. Build coexistence bridge. SSO so users from both source orgs can authenticate to target during cutover. Salesforce Connect or Platform Events for cross-org read during phased data load.
  4. Pilot data load (≤1% of records). Validate the migration ETL produces correct records in target, including preserved audit fields and owners. Verify external-Id remapping table.
  5. Wave 1 — least-coupled records first. Reference data, then customers, then transactions. Each wave validated before next.
  6. External integration cutover. Update each external system's Salesforce-Id references using the remapping table.
  7. Source-org freeze. Source orgs go read-only. Final delta sync from source to target.
  8. Hard cutover. Source orgs decommissioned (or kept as archives). Target is canonical.

Each wave has a documented rollback: the previous wave's data state is recoverable.

Pattern B — Org split with regulatory isolation

When to use. A regulator demands that a subset of users / data be in a separately-governed org. (HIPAA-segregated patient data, geographic data residency, divestiture of a business unit.)

Critical constraint. After cutover, the new org must be operationally independent — no shared admin users, no shared integration credentials, no Salesforce Connect bridge into the regulated data.

Sequence.

  1. Define the regulatory boundary. Which objects, which records, which users. The boundary is the most contested part of the design — get regulator sign-off.
  2. Provision the new org. Edition, license counts, region (Hyperforce locality may be the regulatory driver).
  3. Replicate the relevant metadata. Subset of source-org metadata, deployed to the new org. New org's metadata then evolves independently.
  4. Move the records. Bulk insert with external-Id preservation; capture Id-remapping for any external integrations.
  5. Cut over identity. Move users to the new org's IdP. Source-org access for migrated users is revoked at the same time.
  6. Cut over external integrations. Each integration that referenced moved records now points at the new org.
  7. Source-org cleanup. The migrated records / users are removed from source; source-org metadata is purged of fields that are now exclusive to the new org.

The most common failure: leaving a Salesforce Connect bridge in place "for convenience" — it defeats the regulatory isolation that was the entire point.

Pattern C — Coexistence as a permanent state

When to use. Two business units that share customers but operate distinct domains, with no executive mandate to consolidate. (Or a partnership where each side keeps its own org.)

Design.

Coexistence is harder to maintain than people expect. Schema drift between the two orgs is constant; the bridge needs ongoing investment.


Decision Guidance

SituationApproachReason
Two source orgs, M&A driver, exec-mandated consolidationMerge with phased cutover (Pattern A)Standard consolidation; sequenced waves de-risk the data load
Regulator demands data isolationSplit with hard isolation (Pattern B)Coexistence bridge undermines the isolation requirement
Hitting org-level governors / limitsSplit for capacitySplitting low-coupled BUs is faster than redesigning to fit limits
Two BUs share customers, no consolidation mandateCoexistence (Pattern C)Forced merge without business driver fails politically
Small data volume, low complexityHard cutover, no coexistenceOverhead of building a bridge isn't justified
External systems reference SF record IDsBuild remapping table FIRSTDiscovery during cutover is expensive
Source-org and target-org metadata diverge significantlyMetadata reconciliation phase before any data movementSkip = data load fails on validation rules / triggers
User access patterns differ between orgsPermission inventory + reconciliationUsers seeing fewer records post-cutover is a noisy escalation
Asking "should we even merge / split / coexist?"Defer to architect/multi-org-strategyStrategic question; this skill assumes that decision is made
Asking "what time on Saturday do we cutover?"Defer to devops/go-live-cutover-planningOperational question; out of scope here

  1. Confirm direction (merge / split / coexistence) and driver. Both must be named in writing before any other work.
  2. Inventory metadata, data, and external dependencies in scope. Output: three documents — metadata delta map, data volume per object, external-system reference list.
  3. Reconcile metadata in target. Resolve every delta from step 2.
  4. Design the bridge / cutover / split mechanics. Pattern A / B / C from above as the starting template.
  5. Plan record-Id remapping. Define external-Id strategy; capture source-Id → target-Id mapping.
  6. Plan rollback per phase. Each cutover wave has a documented rollback that lands the system in a known good state.
  7. Hand off to the cutover-runbook team. Ops sequencing, freeze windows, comm plan are downstream.

Review Checklist


Salesforce-Specific Gotchas

  1. Skipping the pre-migration metadata audit is the #1 failure mode. Don't move data before reconciling object / field / picklist / validation / automation deltas. (See references/gotchas.md § 1.)
  2. Salesforce record IDs are org-scoped. Any external system that stored an Id from the source org will break on merge / split unless remapped. (See references/gotchas.md § 2.)
  3. Validation rules in the target will reject imported source data. Plan a controlled disable / re-enable around the data load. (See references/gotchas.md § 3.)
  4. Automation in the target fires on imported records by default. Bulk migration without disabling automation produces side effects (auto-emails sent, fields auto-stamped) on data that didn't go through the normal lifecycle. (See references/gotchas.md § 4.)
  5. Coexistence bridges are operational debt that grows over time. Schema drift is constant; budget for ongoing bridge maintenance, not just initial build. (See references/gotchas.md § 5.)
  6. Splits "for regulatory isolation" with a Salesforce Connect bridge defeat the isolation. Hard rule: regulated splits have NO runtime bridge to protected data. (See references/gotchas.md § 6.)
  7. Hyperforce region constraints affect data residency during merge / split when source and target are in different regions. (See references/gotchas.md § 7.)
  8. Audit fields reset to the load user and time unless "Set Audit Fields upon Record Creation" is enabled before the load. (§ 10.)
  9. Event-based bridges lose replay history when either org is migrated, refreshed, or moved. (§ 11.)
  10. Data Loader's time zone and assignment rule settings rewrite dates and owners. (§ 12.)
  11. Big objects cannot be bridged with Salesforce Connect. (§ 13.)

Output Artifacts

ArtifactDescription
Migration Architecture Decision DocumentDirection, driver, pattern (A/B/C), sequencing, success criteria
Metadata Delta MapPer-metadata-type comparison source(s) ↔ target with decisions
Data Volume InventoryPer-object record counts and parent-child relationship depth
External-System Reference ListEvery external system that holds Salesforce record IDs, with the remapping plan
Record-Id Remapping Table DesignSchema + persistence strategy for source-Id ↔ target-Id mapping
Per-Phase Rollback PlansWhat "rollback" means per cutover wave, and how to execute

Package files