Start free
Andrew Hanna

Andrew Hanna

How to Set Up Back-Promotion in a Salesforce DevOps Pipeline

How to Set Up Back-Promotion in a Salesforce DevOps Pipeline

Short answer: back-promotion is the merge that carries a production change back down to every lower branch and org in your pipeline. You need it because a hotfix applied straight to production exists nowhere else, so the next ordinary release quietly overwrites it. The safe way to automate it is a cascading merge, one environment at a time, opened as a pull request rather than pushed by a script.

What is back-promotion in a Salesforce pipeline?

A normal promotion moves a change up the chain: dev to integration to uat to main. Back-promotion moves in the opposite direction, taking what already exists in a higher environment and merging it downward so the lower environments match.

Two things need to travel, and most teams only do the first:

  • The source. Merge the higher branch into the lower branch, so the repository agrees with itself.
  • The org. Deploy that merge to the lower sandbox, or your next piece of work is built against metadata that no longer matches production.

Why do hotfixes need a path back down the chain?

Because a hotfix breaks the assumption your pipeline is built on: that production only ever receives what came up the chain. Break that assumption and three failures follow.

  • Silent regression. The next release deploys the older version of the same component and the fix disappears. Nothing errors, so nobody notices until the incident repeats.
  • Untrustworthy UAT. You are testing against a state that production is no longer in.
  • Compounding conflicts. Every day the branches stay apart, the eventual merge gets bigger and more manual.

Out-of-band changes are not only hotfixes. A page layout edited in production during an incident, a picklist value added for support, a field created to unblock a user: they all need the same route home.

What actually creates the merge chaos, and how do you avoid it?

This is the part most guides skip. Back-promotion goes wrong in predictable ways, and five rules prevent nearly all of it.

  1. Merge downward, do not cherry-pick. A cherry-pick creates a new commit with a different hash, so Git still treats the original as unmerged and re-raises the same conflict on every future merge. Merge the branch instead.
  2. Cascade one hop at a time, in pipeline order. main into uat, then uat into integration, then integration into dev. Merging main straight into dev leaves the skipped branches to conflict later.
  3. Run it the same day the hotfix ships. Divergence is cheap for hours and expensive for weeks.
  4. Open a pull request, do not push. An automation that merges silently strips out the review and the audit trail, which are the two things a hotfix most needs.
  5. Fail loudly on conflict, and assign it to the hotfix author. They hold the context. A conflict routed to whoever is on rota gets resolved by guessing.

Back-promotion is not a deployment problem. It is a branch hygiene problem that shows up as a deployment problem three weeks later.

How do you set up back-promotion step by step?

  1. Write the pipeline order down. One ordered list of environments and the branch each maps to. Back-promotion is meaningless without it.
  2. Give hotfixes their own branch off production. Branch from main, never from dev, so the fix carries nothing unreleased with it.
  3. Ship the hotfix through the normal gates. Same tests, same review, same approval, just a shorter path.
  4. Trigger the cascade on merge to main. The pipeline opens a back-promotion pull request into the next branch down, automatically.
  5. Deploy each merged branch to its org. Source parity without org parity leaves the drift exactly where it was.
  6. Verify with a drift check. Compare each lower org against its branch once the cascade lands. A difference means something was changed in the org and never committed.
  7. Record it on the work item. A hotfix is not done when production is fixed. It is done when every environment carries it.

Is a sandbox refresh a substitute for back-promotion?

No, and treating it as one is a common and expensive mistake. A refresh replaces the sandbox with a copy of production, which does bring the hotfix down, and destroys every unreleased change in that sandbox on the way. Refreshes are also rationed: a Full sandbox can only be refreshed every 29 days (Salesforce Help), so it is a scheduled event, not an incident response.

Use refreshes to reset data and long-term drift. Use back-promotion to keep source and orgs aligned in between. Most Salesforce DevOps platforms support this shape in some form, Copado, Gearset, AutoRABIT, Flosum, Blue Canvas and Salto included. What varies is whether the cascade is automatic, and whether it arrives as a reviewable pull request.

FAQ

What is the difference between promotion and back-promotion?

Promotion moves a change up the pipeline toward production. Back-promotion moves an existing higher-environment change downward, so the lower environments stop drifting.

Should back-promotion be fully automatic?

The trigger and the pull request should be. The merge itself should still be approved, because a conflict resolved without review is how a hotfix gets undone twice.

How do we handle a conflict during back-promotion?

Resolve it in the back-promotion branch, in favour of production behaviour, and have the person who wrote the hotfix confirm it. Never resolve by taking the lower branch wholesale.

Do we still need back-promotion if nobody edits production directly?

Yes, though less often. Long-lived release branches, reverted releases and package patch versions all put changes into higher environments that the lower ones do not have.

More step-by-step pipeline playbooks live in the SF Guides library. If your pipeline does not open the cascade for you today, start with rule two: one hop at a time, in order. Back-promotion stops being the job nobody wants.

Related Articles

Curious about faster shipping before you dive in? Let's talk

Commitment free!