Salesforce DX Developer Guide
Newer Version Available
Create a Scratch Org Based on an Org Shape (Beta)
As a beta feature, Org Shape for Scratch Orgs is a preview and isn’t part of the “Services” under your master subscription agreement with Salesforce. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn’t guarantee general availability of this feature within any particular time frame or at all, and we can discontinue it at any time. This feature is for evaluation purposes only, not for production use. It’s offered as is and isn’t supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature. You can provide feedback and suggestions in the Org Shape for Scratch Orgs Trailblazer community.
Note
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 (Beta) for more information about considerations during the Salesforce major release transition.
Important
-
Enable Org Shape for Scratch Orgs (Beta)
Enable Org Shape for Scratch Orgs in the org whose shape you want to capture (source org). -
Org Shape Permissions (Beta)
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 (Beta)
Create an org shape to mimic the baseline setup (features, limits, and settings) of a source org without the extraneous data and metadata. You can have only one active org shape at a time. If the features, settings, or licenses of that org change, you can capture those updates by recreating the org shape. -
Scratch Org Definition for Org Shape (Beta)
During org shape creation, we capture the features, settings, 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. -
Limitations for Org Shape (Beta)
Here are some limitations you may encounter during beta.