Salesforce DX Developer Guide
Summer '26 (API version 67.0)
Spring '26 (API version 66.0)
Winter '26 (API version 65.0)
Summer '25 (API version 64.0)
Spring '25 (API version 63.0)
Winter '25 (API version 62.0)
Summer '24 (API version 61.0)
Spring '24 (API version 60.0)
Winter '24 (API version 59.0)
Summer '23 (API version 58.0)
Spring '23 (API version 57.0)
Winter '23 (API version 56.0)
Summer '22 (API version 55.0)
Spring '22 (API version 54.0)
Winter '22 (API version 53.0)
Summer '21 (API version 52.0)
Spring '21 (API version 51.0)
Winter '21 (API version 50.0)
Summer '20 (API version 49.0)
Spring '20 (API version 48.0)
Winter '20 (API version 47.0)
Summer '19 (API version 46.0)
Spring '19 (API version 45.0)
Winter '19 (API version 44.0)
Summer '18 (API version 43.0)
Spring '18 (API version 42.0)
Winter '18 (API version 41.0)
Summer '17 (API version 40.0)
Metadata Coverage
Supported Scratch Org Editions and Allocations
Enable Org Shape for Scratch Orgs
Org Shape Permissions
Create and Manage Org Shapes
Scratch Org Definition for Org Shape
Troubleshooting for Org Shape
Create Scratch Orgs
Select the Salesforce Release for a Scratch Org
Push Source to the Scratch Org
Pull Source from the Scratch Org to Your Project
Manage Scratch Orgs from Dev Hub
Scratch Org Error Codes
Limitations for Salesforce DX
Newer Version Available
Create a Scratch Org Based on an Org Shape
Features, Metadata API settings, edition, limits, and licenses determine what we refer to
as an org’s shape. We know it’s not easy to build a scratch org definition that mirrors the
features and settings in your production org. With Org Shape for Scratch Orgs, you can leave
building the scratch org definition to us. After you capture the org’s shape, you can spin up
scratch orgs based on it.
Scratch org shapes are associated with a specific Salesforce release. Be sure to recreate the org shape after the source org is upgraded to the new Salesforce release. See Scratch Org Definition for Org Shape for more information about considerations during the Salesforce major release transition.
Important
-
Enable Org Shape for Scratch Orgs
Enable Org Shape for Scratch Orgs in the org whose shape you want to capture (source org). -
Org Shape Permissions
A Salesforce admin for the Dev Hub org must assign permissions to users who plan to create org shapes, or create scratch orgs based on an org shape. If you already have a permission set for Salesforce DX users, you can update it to include access. -
Create and Manage Org Shapes
Create an org shape to mimic the baseline setup (features, limits, edition, and Metadata API settings) of a source org without the extraneous data and metadata. If the features, settings, or licenses of that org change, you can capture those updates by recreating the org shape. You can have only one active org shape at a time. -
Scratch Org Definition for Org Shape
During org shape creation, we capture the features, settings, edition, licenses, and limits of the specified source org. This way, you don’t have to manually include these items in the scratch org definition file. You can create a scratch org based solely on the source org shape. Or you can add more features and settings in the scratch org definition file to include functionality not present in the source org. -
Troubleshooting for Org Shape
Here are some issues you may encounter and workarounds.