Newer Version Available
Scratch Orgs
Scratch orgs drive developer productivity and collaboration during the development process, and facilitate automated testing and continuous integration. You can use the CLI or IDE to open your scratch org in a browser without logging in. 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.
Scratch Org Creation Methods
- Custom objects, fields, indexes, tabs, and entity definitions
- Sample data
- Sample Chatter feeds
- Dashboards and reports
- Workflows
- Picklists
- Profiles and permission sets
- Apex classes, triggers, and pages
Before creating a scratch org, you must configure it so it has the features, settings, licenses, and limits that mirror a source org, often your production org. The combination of features, settings, licenses, and limits are what we refer to as the org’s shape.
We offer these methods for configuring scratch orgs:
On Which Salesforce Instances Are Scratch Orgs Created?
Scratch orgs are created on sandbox instances. The sandbox instance depends on the country information used when creating the Dev Hub org.
Scratch orgs for Government Cloud and Public Cloud are created in the region where the Dev Hub org is physically located.
- Scratch orgs created from a Dev Hub org in Government Cloud are created in a Government Cloud instance.
- Scratch orgs created from a Dev Hub org in Public Cloud are created on a Public Cloud instance.
If you notice that your scratch orgs aren’t located in the expected region, create a Salesforce Support case.