Newer Version Available

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

Scratch Org Definition Configuration Values

The scratch org definition file contains the configuration values that determine the shape of the scratch org.

Supported Editions

The Salesforce edition of the scratch org. Possible values are:

  • Developer
  • Enterprise
  • Group
  • Professional

Supported Features

You can enable these add-on features in a scratch org. Features aren’t case-sensitive. You can indicate them as all-caps, or how we define them here (for readability purposes). If a feature is followed by <value>, it requires that you specify a value as an incremental allocation or limit (see next section).

  • AddCustomApps:<value>
  • AddCustomObjects:<quantity> (Min 1: Max 30)
  • AddCustomRelationships:<quantity> (Min 1: Max 30: Multiplier 5)
  • AddCustomTabs:<value>
  • AddDatacomCrmRecordCredit:<quantity> (Min 1: Max 30)
  • AddInsightsQueryLimit:<quantity> (Min 1: Max 30: Multiplier 10)
  • AddHistoryFieldsPerEntity:<value>
  • AnalyticsAdminPerms
  • API
  • AuthorApex

    For Group and Professional Edition orgs, this feature is disabled by default. Enabling the AuthorApex feature lets you edit and test your Apex classes.

  • CaseClassification
  • CascadeDelete
  • Chatbot

    To use this feature, turn on Enable Einstein Features in the Dev Hub org to accept the Terms of Service.

  • ChatterAnswersUser
  • Communities
  • ContactsToMultipleAccounts
  • ContractApprovals
  • CPQ
  • CustomerSelfService
  • CustomNotificationType
  • DatacomDnbAccounts
  • DatacomFullClean
  • DebugApex
  • DecisionStudio
  • DefaultWorkflowUser
  • DeferSharingCalc

    Requires additional configuration using the Setup menu in the scratch org. See Defer Sharing Rule Calculations in Salesforce Help.

  • DevelopmentWave
  • Division
  • DocumentChecklist
  • EinsteinAnalyticsPlus
  • EinsteinAssistant
  • EinsteinBuilderFree
  • Entitlements
  • EventLogFile
  • ExternalAccountHierachy
  • ExternalIdentityLogin
  • ExternalSharing (not available in Group Edition)
  • FieldService
  • FinancialServicesUser:<quantity> (Min 1: Max 10: Multiplier 1)
  • FlowSites
  • ForceComPlatform
  • HealthCloudUser
  • HighVelocitySales
  • IndustriesActionPlan (Previous name: ActionPlan)
  • IndustriesManufacturing
  • InsightsPlatform
  • Interaction
  • IoT
  • JigsawUser
  • Knowledge
  • LightningSalesConsole
  • LightningScheduler
  • LightningServiceConsole
  • LiveAgent
  • LiveMessage
  • Macros
  • MarketingUser
  • MaxApexCodeSize:<value>
  • MaxCustomLabels:<value>
  • MobileUser
  • MultiCurrency
  • ObjectLinking
  • OfflineUser
  • PersonAccounts
  • PlatformCache
  • PlatformEncryption
  • ProcessBuilder
  • ProductsAndSchedules
  • RecordTypes
  • RetainFieldHistory
  • SalesforceContentUser
  • SalesUser
  • ServiceCloud
  • ServiceUser
  • SiteDotCom
  • SiteForceContributor
  • Sites
  • SocialCustomerService
  • StateAndCountryPicklist
  • SurveyCreatorUser
  • TerritoryManagement

    Enterprise Territory Management (Territory2) is a scratch org setting. See Metadata Coverage report for implementation details.

  • TimeSheetTemplateSettings
  • WavePlatform
  • Workflow
  • WorkflowFlowActionFeature
You can specify multiple feature values in a comma-delimited list in the scratch org definition file.
1"features": ["MultiCurrency", "AuthorApex"],

Scratch Org Feature Allocations and Limits

For some features, you need to specify a quantity you want to provision.

Feature Name Additional Allocation or Limit Maximum Notes
AddCustomApps Allocation 30 Replaces CustomApps
AddCustomObjects Allocation 30
AddCustomRelationships Allocation 30 Multiplier is 5. Setting the quantity to 5 increases the limit by 25.
AddCustomTabs Allocation 30 Replaces CustomTabs
AddDatacomCrmRecords Allocation 30
AddInsightsQueryLimit Allocation 30 Multiplier is 10. Setting the quantity to 6 increases the query limit by 60.
AddHistoryFieldsPerEntity Allocation 25
FinancialServicesUser Limit 10
MaxApexCodeSize Limit To use a value greater than the default value of 10, contact Salesforce Customer Support. Measured in millions. Setting this limit to 10 is equal to 10 million characters of code.
MaxCustomLabels Limit 15 Measured in thousands. Setting the limit to 10 enables the scratch org to have 10,000 custom labels.
Example scratch org definition file:
1{
2  "orgName": "Acme",
3  "edition": "Enterprise",
4  "features": ["AddCustomApps:25", "MaxCustomLabels:10"]
5}

Scratch Org Settings

In Winter ’19 and later, scratch org settings are the format for defining org preferences in the scratch org definition. Because you can use all Metadata API settings, they are the most comprehensive way to configure a scratch org. If a setting is supported in Metadata API, it’s supported in scratch orgs. Settings provide you with fine-grained control because you can define values for all fields for a setting, rather than just enabling or disabling it.

For information on Metadata API settings and their supported fields, see Settings in Metadata API Developer Guide.

Although the Settings are upper camel case in the Metadata API Developer Guide, be sure to indicate them as lower camel case in the scratch org definition.

Important

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

Here’s an example of how to configure SecuritySettings in your scratch org. In this case, to define session timeout, you nest the field values.

1{
2  "orgName": "Acme",
3  "edition": "Enterprise",
4  "features": [],
5  "settings": {
6       "mobileSettings": {
7          "enableS1EncryptedStoragePref2": true
8       },
9      "securitySettings": {
10          "sessionSettings":{
11             "sessionTimeout": "TwelveHours"
12      }
13  }
14}

Here’s an example of how to configure the IoT feature in your scratch org. It requires a combination of indicating the IoT feature and IoT scratch org settings.

1{
2  "orgName": "Acme",
3  "edition": "Enterprise",
4  "features": [],
5  "settings": {
6      "mobileSettings": {
7          "enableS1EncryptedStoragePref2": true
8       },
9      "iotSettings": {
10          "enableIoT": true,{
11          "iotInsights": true
12      }
13  }
14}

Metadata Coverage Report

The Metadata Coverage report is now available from the Salesforce Developer site rather than from your org. You can select a release version from within the coverage report to view different release versions. We provide coverage information for Summer ʼ18/v43 onward.

The sample scratch definition is available starting in Winter ʼ19/v44. In this example, to work with the Network metadata type in a Developer Edition scratch org, your scratch org definition must include the Communities feature and the networksEnabled setting.

The window that displays the scratch org definition file for Network.