Newer Version Available
Scratch Orgs
| Available in: Salesforce Classic and Lightning Experience |
| Dev Hub available in: Enterprise, Performance, and Unlimited Editions |
| Scratch orgs available in: Developer, Enterprise, Group, and Professional Editions |
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. 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.
Scratch Org Allocations and Considerations
To ensure optimal performance when you’re using Salesforce DX, your Dev Hub org edition determines your scratch org allocations. These allocations determine how many scratch orgs you can create daily, as well as how many can be active at a given point. By default, Salesforce deletes scratch orgs and their associated ActiveScratchOrg records from your Dev Hub when a scratch org expires. A scratch org expires in 7 days unless you set a duration when you create it.
- 200 MB for data
- 50 MB for files
| Edition | Daily Scratch Org Allocation | Active Scratch Org Allocation |
|---|---|---|
| Enterprise Edition | 80 | 40 |
| Unlimited Edition | 200 | 100 |
| Performance Edition | 200 | 100 |
| Dev Hub trial | 40 | 20 |
To try out Salesforce DX, sign up for a Dev Hub trial org. Trial Dev Hubs expire after 30 days, and each trial Dev Hub gets 10 user licenses.
List Active and Daily Scratch Orgs
To view how many scratch orgs you have allocated, and how many you have remaining:
1sfdx force:limits:api:display -u <Dev Hub username or alias>1NAME REMAINING MAXIMUM
2───────────────────────────────────── ───────── ─────────
3ActiveScratchOrgs 25 25
4ConcurrentAsyncGetReportInstances 200 200
5ConcurrentSyncReportRuns 20 20
6DailyApiRequests 14994 15000
7DailyAsyncApexExecutions 250000 250000
8DailyBulkApiRequests 10000 10000
9DailyDurableGenericStreamingApiEvents 10000 10000
10DailyDurableStreamingApiEvents 10000 10000
11DailyGenericStreamingApiEvents 10000 10000
12DailyScratchOrgs 50 50
13DailyStreamingApiEvents 10000 10000
14DailyWorkflowEmails 75 75
15DataStorageMB 1073 1073
16DurableStreamingApiConcurrentClients 20 20
17FileStorageMB 1073 1073
18HourlyAsyncReportRuns 1200 1200
19HourlyDashboardRefreshes 200 200
20HourlyDashboardResults 5000 5000
21HourlyDashboardStatuses 999999999 999999999
22HourlyODataCallout 10000 10000
23HourlySyncReportRuns 500 500
24HourlyTimeBasedWorkflow 50 50
25MassEmail 10 10
26PermissionSets 1489 1500
27SingleEmail 15 15
28StreamingApiConcurrentClients 20 20