Sub topic 1
What a Sandbox Is and Why You Need One
Prerequisites
Assume you know the difference between Salesforce metadata, such as fields and Apex code, and data, such as account records. You should also know that production is the live org used by customers and staff.
What a Sandbox Is and Why You Need One
A sandbox is a separate Salesforce org that is copied from a production org. It gives a team a safe place to develop, configure, test, and train without changing live data.
A sandbox contains metadata. Depending on its type, it also contains some or all production data. Changes in a sandbox do not automatically affect production. You move approved changes to production through a deployment process.
A sandbox is useful when testing a new automation, validating an integration, reproducing a data problem, or training users. It reduces the risk that unfinished work will affect real users.
Sandboxes Versus Scratch Orgs
A scratch org is a temporary, configurable Salesforce org created from a definition file. It is designed for source-driven development and usually has a short lifetime. A sandbox is a longer-lived copy related to a specific production org. Use a sandbox when you need production-like configuration, data, or stable testing access.
The Four Sandbox Types at a Glance
| Type | Data copied | Data storage | Refresh interval |
|---|---|---|---|
| Developer | Metadata only | 200 MB | 1 day |
| Developer Pro | Metadata only | 1 GB | 1 day |
| Partial Copy | Metadata and selected data | 5 GB | 5 days |
| Full | Metadata and all production data | Same as production | 29 days |
The exact availability and limits depend on your Salesforce edition and licenses.
Developer and Developer Pro Sandboxes
Developer and Developer Pro sandboxes are intended for coding and configuration. They copy metadata but do not copy production records. Developer Pro provides more data storage, so it supports larger test datasets created or loaded by the team.
Partial Copy and Full Sandboxes
A Partial Copy sandbox uses a sandbox template to select objects and records for copying. It fits QA and integration testing when realistic data is needed without copying everything.
A Full sandbox copies all production data. It is the best fit for performance testing and final, production-like validation, but it takes more storage and has a longer refresh interval.
> callout note > A refresh replaces the sandbox contents with a new copy. Save work and export any data you need before starting one.
Exercise
Which sandbox is usually the best starting point for testing an integration with realistic but limited data?
Show answer
A Partial Copy sandbox, because a template can select the required production records while limiting storage and refresh time.