Newer Version Available

This content describes an older version of this product. View Latest

Scratch Orgs

The scratch org is a source-driven and disposable deployment of Salesforce code and metadata. A scratch org is fully configurable, allowing developers to emulate different Salesforce editions with different features and preferences. And you can share the scratch org configuration file with other team members, so you all have the same basic org in which to do your development.

Scratch orgs drive developer productivity and collaboration during the development process, and facilitate automated testing and continuous integration. You might spin up a new scratch org when you want to:

  • Start a new project.
  • Start a new feature branch.
  • Test a new feature.
  • Start automated testing.
  • Perform development tasks directly in an org.
  • Start from “scratch” with a fresh new org.

You can use the CLI or IDE to open your scratch org in a browser without logging in.

Scratch Org Limits and Considerations

To ensure optimal performance using Salesforce DX:

  • You can create up to 50 scratch orgs per day per Dev Hub.
  • You can have up to 25 active scratch orgs.
  • Salesforce deletes scratch orgs and their associated active scratch org objects when a scratch org is older than 7 days.

If you want to try out Salesforce DX, you can sign up for a Dev Hub trial org with these limits:

  • The Dev Hub trial org expires after 30 days.
  • Your Dev Hub org gets 10 user licenses.
  • You can create up to 40 scratch orgs per day per trial Dev Hub.
  • You can have up to 20 active scratch orgs.
  • Salesforce deletes scratch orgs and their associated scratch org objects when a scratch org is older than 7 days.