# Multi-org artifacts: shared packages and string replacement

*Platform Development Lifecycle and Deployment Architect Study Guide · Operating · Last updated October 26, 2026 · https://www.certifyforce.com/study-guide/platform-development-lifecycle-and-deployment-architect/operating/multi-org-artifacts-shared-packages-and-string-replacement*

How to deliver one release artifact to several production orgs: string replacement in sfdx-project.json for per-org values, one Dev Hub owning shared unlocked packages, transferring a package between Dev Hubs, checking what each org has installed, and when org-dependent packages fit orgs that grew apart.

- Certification: Salesforce Platform Development Lifecycle and Deployment Architect
- Exam section: Operating
- Study guide: https://www.certifyforce.com/study-guide/platform-development-lifecycle-and-deployment-architect

**Official exam objective:**

> Given a multi-org customer scenario, compare and contrast approaches for managing common release artifacts.

## What the exam expects

- Compare ways to give several production orgs one release artifact: shared source with per-org values, a shared package, a branch per org, change sets or manual edits.
- Configure and troubleshoot string replacement in `sfdx-project.json`.
- Place shared packages in one production Dev Hub, and plan a transfer when packages sit in the wrong Dev Hub.
- Check which orgs have a package installed before releasing a dependent package.
- Judge when an org-dependent unlocked package fits orgs whose unpackaged metadata differs.

Key terms: **common release artifact** (one versioned set of metadata delivered to several orgs), **string replacement** (the CLI swapping a string in source files for a per-org value at deploy or package time), **Dev Hub** (the org that owns your unlocked packages), **installation org** (where a package version is installed), **package transfer** (moving package ownership to another Dev Hub).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Where replacements are configured | `replacements` property in `sfdx-project.json` | [Replace Strings in Code](https://developer.salesforce.com/docs/platform/sfdx-dev/guide/sfdx-dev-ws-string-replace.html) |
| When replacement runs | `project deploy start` from source format and `package version create` | [Replace Strings in Code](https://developer.salesforce.com/docs/platform/sfdx-dev/guide/sfdx-dev-ws-string-replace.html) |
| `--metadata-dir` deploys | String replacement not supported | [Replace Strings in Code](https://developer.salesforce.com/docs/platform/sfdx-dev/guide/sfdx-dev-ws-string-replace.html) |
| Unset variable | Error by default; `allowUnsetEnvVariable: true` removes the string | [Replace Strings in Code](https://developer.salesforce.com/docs/platform/sfdx-dev/guide/sfdx-dev-ws-string-replace.html) |
| Project source | Never rewritten by replacement | [Replace Strings in Code](https://developer.salesforce.com/docs/platform/sfdx-dev/guide/sfdx-dev-ws-string-replace.html) |
| Package owner | The Dev Hub; use one in a production org | [Know Your Orgs](https://developer.salesforce.com/docs/platform/sfdx-dev/guide/sfdx-dev-unlocked-pkg-before-know-orgs.html) |
| Transfer request | Support case per package; destination not Developer Edition or trial | [Transfer an Unlocked Package](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_unlocked_package_transfer.htm) |
| IDs after transfer | 033 and 04t unchanged; new 0Ho | [Transfer an Unlocked Package](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_unlocked_package_transfer.htm) |
| Per-org inventory | `sf package installed list --target-org` | [package installed list](https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_package_installed_list.html) |
| Org-dependent coverage | Not calculated | [Create Org-Dependent Unlocked Packages](https://developer.salesforce.com/docs/platform/sfdx-dev/guide/sfdx-dev-unlocked-pkg-org-dependent.html) |
| Change set reach | Only orgs affiliated with the same production org | [Change Sets](https://help.salesforce.com/s/articleView?language=en_US&id=sf.changesets.htm&type=5) |

## Check yourself

- Why does string replacement suit near-identical code going to several orgs?
- When does string replacement not run during a deployment?
- Which org type can't receive a transferred package as its new Dev Hub?
- Why can't change sets carry a release between two production orgs?

## Sources

- [Replace Strings in Code Before Deploying or Packaging](https://developer.salesforce.com/docs/platform/sfdx-dev/guide/sfdx-dev-ws-string-replace.html)
- [Unlocked Packages](https://developer.salesforce.com/docs/platform/sfdx-dev/guide/sfdx-dev-unlocked-pkg-intro.html)
- [Know Your Orgs](https://developer.salesforce.com/docs/platform/sfdx-dev/guide/sfdx-dev-unlocked-pkg-before-know-orgs.html)
- [Transfer an Unlocked Package to a Different Dev Hub](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_unlocked_package_transfer.htm)
- [Create Org-Dependent Unlocked Packages](https://developer.salesforce.com/docs/platform/sfdx-dev/guide/sfdx-dev-unlocked-pkg-org-dependent.html)
- [package installed list (CLI command reference)](https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_package_installed_list.html)
- [package version list (CLI command reference)](https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_package_version_list.html)
- [Change Sets](https://help.salesforce.com/s/articleView?language=en_US&id=sf.changesets.htm&type=5)
- [Reliability (Well-Architected)](https://architect.salesforce.com/docs/architect/well-architected/guide/reliability.html)
- [project retrieve start (CLI command reference)](https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_project_retrieve_start.html)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 8 linked practice questions, and unlimited timed mock exams are included with the Platform Development Lifecycle and Deployment Architect pack (USD $19): https://www.certifyforce.com/practice-exams
