Manage Your Sandboxes Programmatically

Use Salesforce CLI to authorize in to, create, and clone sandboxes. Traditionally, admins create and manage sandboxes through the Setup UI. But we realize that many admins and developers want the ability to create and manage their development and testing environments programmatically, and to automate their CI processes. Salesforce CLI enables you to do both.

Required Editions

Available in: both Salesforce Classic and Lightning Experience
Available in: Professional, Enterprise, Performance, Unlimited, and Database.com Editions
User Permissions Needed
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)

To get started:

  • Install Salesforce CLI.
  • Create a Salesforce DX project with a manifest file.
  • Authorize to a production org with available sandbox licenses.
  • Create the sandbox definition file.