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.
Available in: Developer, Group, Professional, Unlimited, and Enterprise editions. The scratch org created from the org shape is the same edition as the source org.
Not available in: Scratch orgs and sandboxes
What’s Included in Org Shape?
Features, Metadata API settings, edition, limits, and licenses determine what we refer to as an org’s shape. For further clarification, org shape includes:
Metadata API settings with boolean fields.
Licenses associated with installed packages, but not the packages themselves. To use the associated package, install it in the scratch org created from the org shape.
Some features aren’t captured when the org shape is created. However, you can add the features manually to the scratch org definition file. See Troubleshoot Org Shape for details.
Note
What’s Not Included in Org Shape?
Metadata API settings with integer or string fields. However, you can manually add non-Boolean settings or other settings not included in the source org to your scratch org definition. See Scratch Org Definition for Org Shape for examples.
Metadata types
Data
Org Shapes Are Specific to a Release
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. During a Salesforce major release transition, your Dev Hub org and source org can be on different release versions. See Scratch Org Definition for Org Shape for options during the transition period.
Can I See the Org Shape File?
Org shapes are internal system files and aren’t viewable.
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 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. Org shapes are internal system files and aren’t viewable.
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.