Sandbox management keeps a set of Salesforce sandboxes useful for development, testing, and training: choosing the right sandbox types, refreshing them on a schedule, keeping them close to production, and bringing them back to a working state after each refresh. Sandboxes that drift far from production produce tests that pass in the sandbox and fail in production.
Salesforce Sandbox Types
- Developer and Developer Pro sandboxes copy metadata only, with limited storage, and can be refreshed daily.
- Partial Copy sandboxes copy metadata and a sample of data defined by a sandbox template, and can be refreshed every five days.
- Full Copy sandboxes copy metadata and all data, and can be refreshed every 29 days.
Common Sandbox Problems
- Drift. Production changes made since the last refresh are missing from the sandbox.
- Lost work. A refresh replaces the sandbox, including work that was never deployed.
- Post-refresh breakage. Integrations, scheduled jobs, and hard-coded IDs or URLs point to the wrong place after a refresh.
- No data. Metadata-only sandboxes need test data loaded after every refresh.
How to Approach Sandbox Management
- Compare before refreshing. Find sandbox changes that have not reached production and save them first.
- Refresh on a calendar matched to each sandbox's purpose.
- Run a post-refresh checklist: update integration endpoints, check scheduled jobs, check hard-coded IDs, and reset user emails as needed.
- Reseed test data with a saved dataset.
- Compare after refreshing to confirm the sandbox matches production.
How Snapshot Helps
- Metadata Differences Report: compares a sandbox snapshot with production to show assets that differ or exist on only one side.
- Compare Assets, Profiles, and Permission Sets: reviews XML differences and moves selected assets or differences between snapshots before deployment.
- Hard Coded IDs Report: finds IDs typed into metadata and flags references that are broken after a refresh.
- Take Snapshot: captures a sandbox before a refresh so undeployed work is not lost.
Comparisons describe captured metadata. Recapture after making changes, since a snapshot does not reflect later edits.
Common Questions
How often can each sandbox type be refreshed?
Developer and Developer Pro sandboxes daily, Partial Copy sandboxes every five days, and Full Copy sandboxes every 29 days.
What happens to sandbox work when the sandbox is refreshed?
A refresh replaces the sandbox with a new copy of production. Deploy or save any sandbox work before refreshing.
Why do integrations break after a refresh?
Credentials, endpoints, and IDs copied from production may point to production systems or to records that differ in the sandbox. Update them as part of the post-refresh checklist.