Section 7 · Environment Management and Deployment
7.1 Sandboxes, packages, and metadata movement options
Exam objective
Describe options to move metadata between environments, including change sets, sandboxes, and managed or unmanaged AppExchange packages.
Environment strategy separates development and testing from production. A sandbox is a copy of some or all production metadata and, depending on type and refresh process, data. Developer sandboxes support isolated configuration and coding work; partial or full sandboxes support broader testing and representative data needs. The right choice depends on storage, data sensitivity, refresh frequency, integration testing, and team scale. A sandbox is not automatically a safe place for production data or an exact simulation of production services.
Change sets provide a point-and-click way to deploy supported metadata between related Salesforce orgs, commonly from a sandbox to its production org. They require a deployment connection and explicit component selection. Change sets can help smaller teams with straightforward releases, but they do not provide source control, automated dependency analysis, or a complete release orchestration process. Some components or settings may not be supported. Review deployment status and validate after deployment rather than assuming a successful upload means the feature is live. AppExchange packages distribute reusable metadata and functionality. Managed packages are controlled by a publisher and can support upgrades and namespace protection; unmanaged packages provide components that the subscriber can modify but do not offer the same publisher-managed upgrade path. Installing a package can add objects, fields, code, permissions, and dependencies. Review publisher trust, package permissions, data access, upgrade notes, and feature compatibility. Install and test in a sandbox before production.
Metadata is not the same as data. Change sets and packages move configuration elements; record data usually requires a separate migration method. A deployment may depend on fields, record types, flows, permission sets, or connected settings. Include dependencies and sequence components so automation does not reference missing metadata. Environment-specific values such as endpoints, credentials, and email addresses require safe configuration and must not be copied blindly from a development org.
A deployment plan should include scope, source, target, dependencies, test approach, approvals, communication, rollback or forward-fix strategy, and post-deployment validation. Use a sandbox to verify component behavior and user access. Compare target org differences, especially licenses, record types, and settings. A change set's validation can reveal deployment issues, but it does not replace a business acceptance test using representative users and records. Scenario method: choose a sandbox appropriate to the development and test scope; choose change sets for supported manual metadata movement between connected orgs; use a managed package for a vendor-maintained extension; and use an unmanaged package when the recipient should own and modify distributed components. If repeatable team delivery or source tracking is needed, identify the limits of change sets and consider the organization's source-driven release process.
Exam focus: recognize change sets as metadata deployment, not data migration or source control. Compare managed and unmanaged packages by publisher control and upgradeability. Account for sandbox data and refresh effects. Check dependencies, supported metadata, target differences, and post-deployment testing. Prefer a release path that fits team size, control requirements, and feature support.
Supported metadata types and deployment behavior can change by release. Check current Salesforce Help before designing a production release around a specific component.
For a refresh, identify what is copied, what will be overwritten, and what must be reconfigured afterward. Ensure the team has committed metadata changes to a durable source before refreshing. Review user access, connected app secrets, email settings, scheduled jobs, named credentials, and callback URLs after the refresh. If production data is included, verify masking completion and restrict the environment until it is done. Retain test evidence that remains valid and rerun tests affected by new data or configuration. The refresh should have a named requester, approver, window, and recovery plan for lost sandbox-only work.
Practical scenario
A small team has a validated flow and permission set in a sandbox and must deploy them to its connected production org. A change set can be suitable if all required metadata types and dependencies are supported. Include referenced fields and record types, upload and validate, schedule a deployment window, then verify flow activation and user access in production. Move test data separately if the implementation requires it.
Extra concept
Sandbox refresh planning is a dependency for release quality. A refreshed environment may overwrite work and change data or connected behavior. Coordinate refreshes, preserve source-controlled work, and keep external endpoints isolated.
Key takeaways
- Match sandbox type to development, acceptance, or scale-testing needs.
- Change sets move supported metadata; records require a separate data process.
- Review package permissions, publisher ownership, and upgrade behavior.
- Official references: https://help.salesforce.com/s/articleView?id=005298969&language=en_US&type=1 https://help.salesforce.com/s/articleView?id=sf.data_sandbox.htm&type=5 https://help.salesforce.com/s/articleView?id=sf.changesets.htm&type=5 https://appexchange.salesforce.com/
