Newer Version Available

This content describes an older version of this product. View Latest

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.

In the scratch org definition, indicate the 15-character sourceOrg instead of edition. The sourceOrg is the org ID for the org whose shape you created. Use only the first 15 characters rather than the full 18-character org ID.

Important

Simple Scratch Org Definition File

If your Dev Hub org, source org, and org shape are all on the same Salesforce version, you can use the simple scratch org definition.

1{
2  "orgName": "Acme",
3  "sourceOrg": "00DB1230400Ifx5"
4}

Scratch Org Definition File during Salesforce Release Transitions

During the Salesforce major release transition, your Dev Hub org and source org can be on different versions. If your Dev Hub org is on a different version than your source org, add the release option to your scratch org definition file to create scratch orgs using the org shape.

1{
2  "orgName": "Acme",
3  "sourceOrg": "00DB1230400Ifx5",
4  "release": "previous"
5}
Source Org/Org Shape Version Dev Hub Version Supported Scratch Org Version Release Option to Use in Scratch Org Definition File
Current Preview Current version only "release": "previous"
Preview Current Preview version only "release": "preview"

Scratch Org Definition File with Other Features and Settings

1{
2  "orgName": "Acme",
3  "sourceOrg": "00DB1230000Ifx5",
4  "features": ["Communities", "ServiceCloud", "Chatbot"],
5  "settings": {
6      "communitiesSettings": {
7          "enableNetworksEnabled": true
8      },
9      "mobileSettings": {
10          "enableS1EncryptedStoragePref2": true
11      },
12      "omniChannelSettings": {
13          "enableOmniChannel": true
14      },
15      "caseSettings": {
16          "systemUserEmail": "support@acme.com"
17      }
18  }
19}

Next: Create a scratch org using the org shape scratch org definition file.