Sub topic 3
Promoting Work Items to Production
Assume you understand Salesforce sandboxes, metadata, Git branches, commits, pull requests, and basic command-line use. DevOps Center uses these pieces to move a work item, a tracked unit of change, through connected environments.
Promote a Work Item
After review, promote the work item from one pipeline stage to the next. DevOps Center updates the target environment from the repository version associated with that stage. Before production, confirm that the correct work items are included and that the target org is ready.
Handle Conflicts
A conflict occurs when two work items change the same metadata or when a target stage has changes that the source branch does not contain. Stop the promotion and compare the affected files. Resolve the conflict in Git, test the combined result, and update the pull request. Do not overwrite another team's change without agreement.
Use Validation and Test Gates
A validation-only deployment checks whether metadata can deploy without changing the target org. Use required reviews, Apex tests, permission checks, and user acceptance testing as release gates. A green check does not prove that business behavior is correct, so test important user flows as well.
Roll Back or Ship a Hotfix
For a faulty release, first determine whether reverting the source commit is safe. A revert creates a new commit that undoes the earlier change, preserving the audit trail. A hotfix is an urgent, narrowly scoped correction. Branch it from the production state, test it, review it, and promote it through the same gates. Avoid making an untracked production change that leaves Git behind.
Use the Salesforce CLI Alongside DevOps Center
The Salesforce CLI is useful for focused checks and automation:
sf org login web --alias uat
sf project deploy start --source-dir force-app --target-org uat --dry-run --test-level RunLocalTestsThis validates local source against UAT. DevOps Center should remain the team's release record when it manages the pipeline.
Govern Access and Metadata
Give contributors only the permissions their roles require. Limit production deployment and approval rights, protect the repository's main branch, and require pull-request review. DevOps Center does not support every Salesforce metadata type equally. Check current coverage before designing a process around an unsupported type; some changes may need the CLI or another approved method.
Team Release Practices
Keep work items small, name them clearly, promote regularly, and resolve conflicts early. Keep Git and org contents synchronized. Document exceptions, test evidence, and rollback decisions.
Exercise
What should you do before promoting two work items that modify the same metadata?
Show answer
Compare their changes, resolve any conflict in Git, test the combined result, and obtain the required review.