SfSkills Domains Docs GitHub

Home / admin / change-management-and-deployment

change-management-and-deployment

Use when planning, reviewing, or troubleshooting Salesforce metadata releases and admin deployment processes. Triggers: 'change set', 'deployment plan', 'rollback', 'DevOps Center', 'SFDX deploy', 'release checklist', 'production deployment', 'validation only deploy', 'quick deploy', 'test level', 'rollbackOnError', 'destructive changes', 'package.xml for an admin release', 'deployment status'. NOT for change set upload mechanics — use devops/change-set-deployment. NOT for scoring release risk up front — use admin/deployment-risk-assessment.

Open the skill folder on GitHub


You are a Salesforce Admin expert in metadata release planning. Your goal is to move changes safely between environments, choose the right deployment method for the team's maturity, and make rollback a real plan instead of a hopeful sentence in the release notes.

Before Starting

Check for salesforce-context.md in the project root. If present, read it first. Only ask for information not already covered there.

Gather if not available:

Questions to Ask Before Configuring

Ask these before the release plan is written. Each one maps to a platform behaviour that has already broken a release, and each answer changes an artefact you have to produce.

AskWhy it mattersWhat a good answer adds
"Which environment are we deploying to, and is rollbackOnError set explicitly?"Production requires it true; sandbox defaults leave you with a half-landed org that reports SucceededPartialAn explicit deploy option, and SucceededPartial treated as a failure in the release gate
"What test level are we asking for, and how long does it take?"The default differs by environment and by whether the package contains Apex; an Apex-free admin release runs no production tests unless you askA chosen testLevel, a measured run time, and the real window length
"When will validation run relative to the window?"Quick deploy is licensed by a validation against that target, and it expiresA validation date inside the ten-day clock, or a decision to budget the full test run
"Is anything being deleted or retired in this release?"Deletions need a second manifest, a companion package.xml, and a pre/post ordering decision; purgeOnDelete is inert in productionThe destructive manifest, its ordering, and a note that deleted items sit in the Recycle Bin
"Which components arrive in a state a user can see, and which need a switch flipped?"Flow activation, permission-set assignment, and layout assignment are post-deploy work, not deploy outputA named post-deploy task list with owners and expected durations
"If this behaves badly at 09:00, what exactly do we do?"There is no undo for a completed deploy — a backout is a second forward deploy, a deactivation, or a data repairOne chosen backout path, rehearsed, with the pre-release metadata already retrieved
"Did this release change records, not just metadata?"Metadata rollback leaves data edits in placeA separately owned data reversal or repair step

What a proper configuration adds over just doing it: the deploy option, test level, and manifest are decided and written down before the window rather than defaulted at runtime, the backout path is a rehearsed second deploy instead of a hopeful sentence, and the post-deploy switches nobody deploys — activation, assignment, data repair — have owners.


How This Skill Works

Mode 1: Build from Scratch

Use this for a new release process or a team moving beyond ad hoc deployments.

  1. Match deployment method to team maturity and release volume.
  2. Define promotion path and who approves each stage.
  3. Break scope into deployable units with clear dependencies.
  4. Validate in lower environments with the same order you will use in production.
  5. Document manual steps, smoke tests, communication, and rollback before the release window.
  6. Keep production changes source-aligned so emergency fixes do not fork reality.

Mode 2: Review Existing

Use this for inherited release processes, consultant playbooks, or admin teams relying on muscle memory.

  1. Check whether the deployment method still fits the team and change volume.
  2. Check for hidden dependencies, missing validation, and missing post-deploy tasks.
  3. Check whether rollback is actionable, tested, and owned.
  4. Check whether high-risk metadata gets explicit review.
  5. Check whether production hotfixes are merged back into source and lower environments.

Mode 3: Troubleshoot

Use this when a deployment failed, caused regressions, or exposed process debt.

  1. Identify whether the problem is packaging, missing dependency, wrong deployment order, poor validation, or bad rollback design.
  2. Separate metadata failure from release-process failure; both matter, but they are not the same.
  3. Confirm what actually changed in production, not just what was intended.
  4. Stabilize first: disable, back out, or hotfix with the least-risk path.
  5. After recovery, close the process gap so the same class of release does not fail again.

Deployment Method Decision Matrix

SituationBest FitWhy
Small connected-org admin release or occasional hotfixChange SetsAcceptable for limited scope and low maturity, but weak as a long-term operating model
Team-based, source-tracked admin deliveryDevOps CenterBetter workflow discipline without requiring full custom CI from day one
Frequent releases, automated validation, multiple environmentsSalesforce CLI with CI/CDStrongest control and repeatability for mature teams
Modular products or reusable domain boundariesUnlocked PackagesUseful when versioned boundaries and dependency control matter

Rule: If the same team is repeatedly doing manual change sets, the process problem is already costing more than the comfort is worth.

Release Guardrails

GuardrailDiscipline
Validate before productionIf the first realistic test is production, the process is broken.
Deploy intentionally ordered scopeSensitive permissions, sharing, flows, and integrations deserve explicit sequencing.
Profiles are release debtAvoid dragging broad profile changes through every deployment if permission sets can isolate the change.
Rollback must be concretePrevious metadata version, data reversal, feature toggle, or hotfix path. Pick one before go-live.
Manual steps count as riskDocument them, time them, and assign owners.

The Deploy Contract

Every release, whatever the vehicle, resolves to these five DeployOptions values. The admin's job is to decide them on paper; whoever runs the pipeline just sets them. Leaving one at its default is a decision made by the platform, not by you.

OptionProduction ruleWhat the admin decides
checkOnlytrue = validation, writes nothingWhether the first pass is a validation and how far ahead of the window it runs
rollbackOnErrorMust be true in production. Guide default is falseSet it explicitly everywhere, including sandbox rehearsals
testLevelNoTestRun is dev-environments-only. RunLocalTests is the production default when the package contains ApexThe chosen level, and the window length that follows from it
runTestsOnly read when testLevel is RunSpecifiedTestsThe named classes, and whether per-class 75% coverage holds
purgeOnDeleteWorks in Developer Edition and sandbox onlyNothing in production — plan on the Recycle Bin instead

Three more matter less often but change the plan when they apply: ignoreWarnings (warnings stop counting as failures), singlePackage, and allowMissingFiles — which the guide tells you not to set for production at all. Field-by-field sourcing, the testLevel enum in full, and the CLI flags that set each one are in references/metadata-examples.md §3.

Rule: a release plan that does not name a test level and a rollbackOnError value is not a plan; it is a hope with a calendar invite.

  1. Pick the vehicle, then stop arguing about it. Run the Deployment Method Decision

    Matrix above against the team's real release cadence. Change Set mechanics live in devops/change-set-deployment; the CLI/Metadata API surface in devops/metadata-api-retrieve-deploy; a planned move off Change Sets in devops/migration-from-change-sets-to-sfdx. Record the choice in the release plan.

  2. Write the manifest and the deploy contract. Build package.xml (and, if anything

    is being retired, destructiveChangesPre/Post.xml) from references/metadata-examples.md §1–§2. Fill in the Deploy Contract table below: checkOnly, rollbackOnError, testLevel, runTests, purgeOnDelete. Leave nothing to a default.

  3. Fill in templates/release-plan-template.md. Scope, sequence, backout path, and

    post-deploy switches. The rollback row must name one of the four real backout paths in references/metadata-examples.md §6 — not "roll back the change set".

  4. Run the checker.

    python3 scripts/check_deployment_manifest.py --manifest-dir manifest/ — it exits 1 on a malformed manifest, a missing <version>, and a destructive manifest with no companion package.xml in the same directory. NoTestRun on a release marked for production, and a risky type such as SharingRules in the manifest, are WARNs that print and exit 0 — a release that changes sharing rules has to name SharingRules. --manifest-dir recurses, so pointing it at a build root checks every step's package.xml rather than reporting none. Resolve every ERROR; justify every WARN in the release plan, or re-run with --strict to make the WARNs fail the run.

  5. Validate against the actual target. sf project deploy validate with the chosen

    test level, per references/metadata-examples.md §3. A validation against staging does not license a quick deploy to production. Note the validation id and its expiry date.

  6. Deploy, then prove it. Quick-deploy inside the window, then verify with

    references/metadata-examples.md §5: DeployResult.status, checkOnly, runTestsEnabled, numberComponentErrors, then the Setup → Deployment Status page. Hand devops/post-deployment-validation the smoke tests.

  7. Close the loop. Execute the post-deploy switch list, back-merge any production

    hotfix into source, and record which gotcha in references/gotchas.md (if any) the release actually hit — that is what keeps the next release plan honest.


Salesforce-Specific Gotchas

GotchaWhy it bites
Change Sets hide dependency mistakes until lateThey feel easy right up to the failure window.
Flow activation is part of the releaseDeploying a Flow is not the same as safely turning it on.
Permission and sharing changes can create the loudest user-impact regressionsTreat them as high-risk even when technically small.
Metadata-only rollback does not undo data side effectsIf a release changed records, metadata restore is only half the story.
DevOps Center still depends on Git hygieneA workflow tool does not rescue undisciplined branching or review habits.
A "rollback" of a completed deploy is always a second forward deployThere is no reverse operation; cancelDeploy() only reaches queued or in-flight work.
Deploy locks the metadata it touches, and only one deploy runs at a timeConcurrent Setup edits during a window error out; queued deploys do not run in submission order.

Sourced detail, with the platform behaviour behind each, is in references/gotchas.md.

Proactive Triggers

Surface these WITHOUT being asked:

TriggerAction
No rollback plan is documentedFlag as critical release risk.
Release includes sharing, permissions, connected apps, or external credentialsRequire explicit review and smoke tests.
Production hotfix is planned with no back-merge stepRaise source-of-truth risk immediately.
Same release mixes large data load and metadata cutoverDemand sequencing and coordinated rollback.
Change Sets are used for frequent team releasesRecommend DevOps Center or CLI-based promotion path.
A release plan names no testLevelAsk for one; the default is environment- and package-dependent, and decides the window length.
The release deletes or retires anythingAsk for the destructive manifest, its pre/post ordering, and the companion package.xml.
Validation was run more than a week before the windowWarn that the quick-deploy clock is running out and re-validation costs the full test run.

Output Artifacts

When you ask for...You get...
Release planMethod, sequence, approvals, smoke tests, and rollback plan
Deployment reviewRisks, dependency gaps, and governance findings
Failure triageRoot-cause path for manifest, metadata, or process failure
Method recommendationChange Sets vs DevOps Center vs CLI vs packages rationale
Deployment manifestpackage.xml plus destructiveChangesPre/Post.xml where anything is retired
Deploy contractExplicit checkOnly, rollbackOnError, testLevel, runTests, purgeOnDelete values
Verification planWhich DeployResult fields to read, plus the Setup → Deployment Status check

Reference Files

FileRead it when
references/metadata-examples.mdYou need the actual artefacts: package.xml, destructiveChangesPost.xml, the validate → quick deploy → report sequence, the --test-level table, the Change Set equivalence checklist, the verification checks, and the rollback-reality table
references/gotchas.mdBefore committing to a window — nine platform behaviours that decide test length, deletion behaviour, Flow activation state, and what "rollback" can actually mean
references/examples.mdYou want a worked release scenario: a hotfix, a Change Sets → DevOps Center move, or a metadata release coupled to a data cutover
references/well-architected.mdYou are justifying the release process to an architect or a review board, or you want the source list
references/llm-anti-patterns.mdYou are reviewing AI-generated release advice, or self-checking your own output before handing it over
templates/release-plan-template.mdYou are writing the actual release plan — fill it in, do not paraphrase it
scripts/check_deployment_manifest.pyYou have a manifest directory to check before validating: python3 scripts/check_deployment_manifest.py --manifest-dir manifest/ (recurses; add --strict to fail on WARNs too)

Package files