Sandboxes

Sandboxes are copies of your Salesforce org that you can use for development, testing, and training, without compromising the data and applications in your production org.

To view a sandbox:View Setup and Configuration
To create, refresh, activate, and delete a sandbox:Manage Dev Sandboxes (Developer or Developer Pro only) or Manage Sandboxes (all sandbox types)

Salesforce offers sandboxes and a set of deployment tools, so you can:

  • Isolate customization and development work from your production environment until you’re ready to deploy changes.
  • Test changes against copies of your production data and users.
  • Provide a training environment.
  • Coordinate individual changes into one deployment to production.

Traditionally, you or your admin has created and managed your sandboxes through the Setup UI. But we realize that many developers want the ability to create and manage their developer and testing environments programmatically, and to automate their CI processes. Salesforce CLI enables you to do both.

Alternatives to sandboxes are scratch orgs and Developer Edition orgs, which are used as development environments for many Salesforce development use cases. If you’re wondering whether to use a sandbox, scratch org, or Developer Edition org as your development environment, you’re not alone. To help you better understand which to choose, see the Salesforce Developers Blog: Choose the Right Salesforce Org for the Right Job.

  • Authorize Your Production Org

    JWT and Web-based flows require a production org with sandbox licenses instead of a Dev Hub. However, it’s OK if your production org is also a Dev Hub org.

  • Create a Sandbox Definition File

    Before you can create a sandbox using Salesforce CLI, define the configuration for it in a sandbox definition file. The sandbox definition file is a blueprint for the sandbox. You can create different definition files for each sandbox type that you use in the development process.

  • Create, Clone, or Refresh a Sandbox

    Create a sandbox to use for development, testing, or training. Clone a sandbox to copy its data and metadata to another sandbox. Refresh an existing sandbox to get the latest metadata, and sometimes data, from the source org.