SfSkills Domains Docs GitHub

Home / architect / multi-org-strategy

multi-org-strategy

Use when deciding whether to use multiple Salesforce production orgs, designing a hub-and-spoke integration topology, reviewing an existing multi-org architecture for risk, or troubleshooting cross-org integration failures.

Open the skill folder on GitHub


Use this skill when evaluating whether to use multiple Salesforce production orgs, designing how those orgs will exchange data, reviewing an existing multi-org architecture for hidden risks, or troubleshooting cross-org integration failures. This skill addresses the structural decision layer — it does not replace role-specific skills for building individual integrations, configuring Named Credentials, or setting up SSO providers.


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
"What written requirement can one org not satisfy?"Without one, every extra org buys duplicated users, licences, releases, and API budgets for nothingA named regulation, contract clause, or divestiture date in the decision recordThe org count is defended by a requirement, and the record says when to revisit it
"Which data must cross org boundaries, in which direction, and how many records per day?"The receiving org's inbound API allocation comes from its own licences, and small spokes run out first (Gotcha 3)A per-pair volume table and the receiving org's allocation from the Limits Quick Reference formulaBulk API 2.0 or batched calls chosen up front instead of after a 24-hour lockout
"Must the other org's data drive automation, formulas, or roll-ups, or only be displayed?"External objects take no triggers, formulas, roll-ups, or master-detail (Gotchas 2, 5)A split between display-only reads (cross-org adapter) and replicated data (sync jobs)Automation runs in the owning org, so nothing waits on a trigger that cannot exist
"Which identity provider owns users, and how is a leaver deactivated in every org?"SSO stops new sessions but deactivates nothing; JIT acts only at login (Gotchas 4, 9)A provisioning and deprovisioning design per org, with one SAML registration per orgLeavers lose access everywhere on the same day, and MFA is enforced at the IdP for every org
"Is Salesforce to Salesforce enabled anywhere, and which connections are accepted today?"S2S connections have their own lifecycle and no supported growth path (Gotcha 1)The PartnerNetworkConnection inventory with a replacement per connectionA dated retirement plan instead of a fragile connection nobody owns
"Which integration user in each target org serves each cross-org connection?"A named-principal connection fails for everyone when that one user changes (Gotcha 8)A dedicated user per data source, excluded from automated leaver jobsCross-org reads survive offboarding sweeps and credential rotations

What proper configuration adds over "just connecting the orgs": each org has a stated reason to exist, each data flow has an owner and an API budget, and identity lifecycle covers every org rather than the first one.


  1. Record the driver. Write the requirement that a single org cannot satisfy and test it against "When Multiple Production Orgs Are Justified" below. No written requirement means a single-org recommendation.
  2. Inventory what exists. For each org, capture licences by type, the 24-hour inbound API allocation, active S2S connections (SELECT ConnectionName, ConnectionStatus, ConnectionType FROM PartnerNetworkConnection), named credentials, external data sources, and integration users.
  3. Choose the topology (single org, hub-and-spoke, or peer-to-peer) with Mode 1 Step 2, and name the system of record for every shared object.
  4. Pick a mechanism per org pair from the Integration Pattern Decision Matrix, and check its daily volume against the receiving org's allocation (Gotcha 3).
  5. Design identity per org: one SAML registration each, Federation ID mapping, and an explicit deprovisioning path (Gotchas 4, 9).
  6. Write the decision record and release manifest (worked example in references/examples.md, Example 4), then run python3 scripts/check_multi_org.py --project-dir <force-app> to catch S2S use, hard-coded org Ids, and literal callout endpoints.
  7. Set the review trigger: contract renewal, a Hyperforce region becoming available, or the end of an M&A transition, with an owner for consolidation.

Core Concepts

Single Org Is the Default Recommendation

Salesforce architects strongly recommend single-org architecture unless a specific, documented requirement justifies multiple orgs. A single org eliminates:

When requirements can be satisfied inside a single org using standard multi-tenancy features (Sharing Rules, Record Types, Permission Sets, Business Units in Marketing Cloud), a single org is always the lower-risk, lower-cost path.

When Multiple Production Orgs Are Justified

Multiple production orgs are justified only when a single org structurally cannot satisfy the requirement:

ScenarioJustificationNotes
Regulatory data residencyEU GDPR or similar law requires that personal data remain in a specific geographic region and Salesforce's Hyperforce region selection in a single org does not satisfy the regulatorVerify with Salesforce Account team whether Hyperforce resolves the requirement before committing to a second org
Distinct business units with zero data overlapTwo fully independent companies or brands that happen to share a Salesforce contract, but share no customers, users, or processesRare in practice; most BU separation is handled with Sharing Rules and Permission Sets
M&A integration (transitional state)An acquired company runs a separate Salesforce org and migration into the acquiring org has not yet been completedTreat this as a temporary state with a migration plan; do not design permanent multi-org architectures around M&A without a clear end state
Independent ISV product with tenant isolationA product sold to external customers requires strict data isolation per customer (not just Sharing Rules)ISV-specific pattern; consult Salesforce ISV architect guidance

What Multiple Orgs Do NOT Solve


Mode 1: Design a Multi-Org Strategy from Scratch

Use this mode when a new org topology is being designed before any build begins.

Step 1 — Confirm the multi-org justification

Ask the client or stakeholder to provide a written requirement that a single org cannot satisfy. If they cannot articulate one, default to single-org architecture. Document the justification in the architecture decision record.

Step 2 — Select an org topology

Option A: Single Hub Org All business processes live in one production org. Cross-system data exchange is handled via Salesforce APIs to external systems (non-Salesforce). This is the preferred end state.

Option B: Hub-and-Spoke One "hub" org aggregates and coordinates data from multiple "spoke" orgs. The hub holds canonical records or reporting aggregates. Spoke orgs hold domain-specific data.

Option C: Peer-to-Peer Two or more orgs exchange data directly with no central coordinator. This topology has the highest complexity and is the hardest to govern. Avoid it unless the orgs have truly independent data domains with only occasional cross-org lookups.

Step 3 — Design cross-org data exchange

For each org pair that must exchange data:

  1. Choose the integration mechanism:
    • REST API: preferred for record-by-record or small-batch synchronous exchange
    • Bulk API 2.0: preferred for large-volume nightly or periodic sync jobs (millions of records)
    • Salesforce Connect (External Objects): preferred for near-real-time cross-org lookup without full replication; data is queried on-demand via OData 2.0/4.0 adapter or a custom adapter
    • For another Salesforce org specifically, use the cross-org adapter (ExternalDataSource type SfdcOrg), not OData (see Gotcha 7)
  2. Authenticate with Named Credentials:
    • Create a Connected App in the target org (the org being called).
    • Create a Named Credential in the calling org that stores the OAuth 2.0 JWT Bearer credentials for that Connected App.
    • Never store client secrets, access tokens, or refresh tokens in Custom Settings, Custom Metadata, or Apex code.
    • Use the JWT Bearer flow (server-to-server, no user interaction) for scheduled or automated cross-org calls.
  3. Define data ownership:
    • Each record has exactly one system of record. The owning org creates and updates it. Other orgs read or receive copies.
    • Avoid bidirectional sync unless absolutely required; bidirectional sync requires conflict resolution logic and has no native Salesforce support.

Step 4 — Design identity and SSO

Step 5 — Account for licensing


Mode 2: Review an Existing Multi-Org Architecture

Use this mode when reviewing an inherited or in-flight multi-org design for risks and improvement opportunities. Run the inventory in Recommended Workflow step 2, then score the estate against the checklist below.

Review Checklist


Mode 3: Troubleshoot Multi-Org Integration Problems

Use this mode when cross-org integrations are failing, hitting limits, or behaving inconsistently.

Diagnostic Table

SymptomLikely causeWhere to look
Cross-org callout hitting API limitBoth orgs consuming callout limits simultaneously; or S2S hitting SOAP API limits on both endsDebug logs on calling org (check CALLOUT_REQUEST/CALLOUT_RESPONSE); API Usage in target org Setup
Named Credential OAuth token expired or invalidJWT certificate rotation or Connected App scope changeNamed Credential config in calling org; Connected App session policies in target org
External Object query returning no rowsCross-org (SfdcOrg) data source endpoint or apiVersion changed; integration user deactivated or permission revoked in the target orgSalesforce Connect external data source setup; Check integration user profile and permission set in target org
Hard-coded org ID causing failures in new environmentOrg ID embedded in Apex, Custom Settings, or FlowSearch Apex source for 18-char Salesforce org ID pattern; check Custom Settings and Flow variable defaults
Salesforce-to-Salesforce connection broken after org refreshS2S connections are environment-specific; sandbox refresh resets themMigrate off S2S; use Named Credentials + REST API instead
Users can SSO into one org but not the otherSP configuration mismatch in IdP; Entity ID or ACS URL wrong for second orgSAML settings in both orgs; IdP application configuration
Sync job creates duplicatesNo deduplication key defined; bidirectional sync without conflict resolutionUpsert key selection on target org; review sync job logic for idempotency
Bulk API 2.0 job failing for cross-org data loadIntegration user lacks bulk API permission; field-level security on target org blocking fieldsIntegration user profile in target org; Bulk API permission set assignment

Integration Pattern Decision Matrix

ScenarioRecommended Pattern
Read another org's record on-demand (low volume)Salesforce Connect cross-org adapter: ExternalDataSource type SfdcOrg (corrected from "OData adapter"; see Gotcha 7)
Sync a small number of records in near-real-timeREST API callout from Apex or Flow → Named Credential + Connected App
Nightly full sync of hundreds of thousands of recordsBulk API 2.0 job from scheduled Apex or MuleSoft/external ETL
New multi-org integration replacing Salesforce-to-SalesforceREST API + Named Credentials (JWT Bearer) — deprecate S2S immediately
Report across data in multiple orgsCRM Analytics with multi-org data connectors, or replicate to a dedicated analytics org

Salesforce-to-Salesforce (S2S) — Legacy Feature Notice

Salesforce-to-Salesforce is a native Salesforce feature that allows records to be published from one org and subscribed in another. It exists and continues to function, but Salesforce considers it a legacy integration approach.

Do not use S2S for new integrations. Reasons (UNVERIFIED (2026-10-03): the four reasons below come from Salesforce Help and field experience, which this revision could not fetch; the grounded facts are the PartnerNetworkConnection lifecycle and availability rules in references/gotchas.md Gotcha 1):

Migration path from S2S: Replace with a REST API integration authenticated via Named Credentials (JWT Bearer flow) in the calling org, with a Connected App in the target org. For high volume, use Bulk API 2.0.


Package files