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).

Some scratch org features require additional configuration.

  • For Group and Professional Edition orgs, the AuthorApex feature is disabled by default. Enabling the AuthorApex feature lets you edit and test your Apex classes.
  • To use the Chatbot feature, turn on Enable Einstein Features in the Dev Hub org to accept the Terms of Service.
  • Enterprise Territory Management (Territory2) is a scratch org setting. See Metadata Coverage report for implementation details.
  • DeferSharingCalc requires additional configuration using the Setup menu in the scratch org. See Defer Sharing Rule Calculations in Salesforce Help.

Note

  • ActionPlans
  • 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 (see Note)
  • CascadeDelete
  • Chatbot (see Note)
  • ChatterAnswers
  • ChatterAnswersUser
  • Communities
  • ContactsToMultipleAccounts
  • ContractApprovals
  • CPQ
  • CustomerSelfService
  • CustomNotificationType
  • DatacomDnbAccounts
  • DatacomFullClean
  • DebugApex
  • DefaultWorkflowUser
  • DeferSharingCalc (see Note)
  • DevelopmentWave
  • EinsteinAnalyticsPlus
  • EinsteinAssistant
  • EinsteinBuilderFree
  • Entitlements
  • EventLogFile
  • ExternalIdentityLogin
  • ExternalSharing (not available in Group Edition)
  • FieldService
  • FlowSites
  • ForceComPlatform
  • HealthCloudUser
  • IndustriesManufacturing
  • InsightsPlatform
  • Interaction
  • IoT
  • JigsawUser
  • Knowledge
  • LightningSalesConsole
  • LightningServiceConsole
  • LiveAgent
  • LiveMessage
  • MarketingUser
  • MaxApexCodeSize:<value>
  • MaxCustomLabels:<value>
  • MobileUser
  • MultiCurrency
  • OfflineUser
  • Pardot
  • PersonAccounts
  • PlatformCache
  • PlatformEncryption
  • ProcessBuilder
  • ProductsAndSchedules
  • RecordTypes
  • RetainFieldHistory
  • SalesUser
  • ServiceCloud
  • ServiceUser
  • SiteDotCom
  • SiteForceContributor
  • Sites
  • StateAndCountryPicklist
  • SurveyCreatorUser
  • TerritoryManagement (see Note)
  • TimeSheetTemplateSettings
  • UiPlugin
  • WavePlatform
  • Workflow
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
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.

In Winter ʼ19, you can specify scratch org settings or org preferences in your scratch org definition file, but not both. We encourage you to convert org preferences to scratch org settings in your scratch org definition. Scratch org settings provide more settings that aren’t currently available as org preferences. We plan to deprecate support for org preferences in Winter ’20.

Important

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

When converting existing org prefs to settings, the org prefs that start with “Is” have a corresponding setting that starts with “enable”. For example, “IsOrdersEnabled” is “enableOrders” that takes a Boolean value of true or false.

1{
2  "orgName": "Acme",
3  "edition": "Enterprise",
4  "features": ["Communities", "ServiceCloud", "Chatbot"],
5  "settings": {
6      "orgPreferenceSettings": {
7          "networksEnabled": true,
8          "s1DesktopEnabled": true,
9          "s1EncryptedStoragePref2": false
10      },
11      "omniChannelSettings": {
12          "enableOmniChannel": true
13      },
14
15      "caseSettings": {
16          "systemUserEmail": "support@acme.com"
17      }
18  }
19}

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      "orgPreferenceSettings": {
7          "s1EncryptedStoragePref2": false
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      "orgPreferenceSettings": {
7          "s1EncryptedStoragePref2": false
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.

Supported Org Preferences

Before Winter ’19, you indicate scratch org settings using org preferences in the scratch org definition file. Use the scratch org settings format if creating a new scratch org definition file. We plan to deprecate org preferences in Winter ’20.

It’s now easier than ever to move to scratch org settings. If your scratch org definition file still contains org preferences, you see a warning message that provides the format for settings. Just copy and paste, and you’re good to go!

1WARNING: We're deprecating orgPreferences in Summer ’19. You can continue to use them 
2until they are replaced by settings in Winter ’20. But why wait? Here's exactly what you need 
3to update in the scratch org definition file.
4 
5Replace the orgPreferences section:
6{
7    "orgPreferences" : {
8        "enabled": [
9          "S1DesktopEnabled"
10        ],
11        "disabled": [
12          "IsActivitiesRemindersEnabled"
13        ]
14    }
15}
16With settings:
17{
18    "settings": {
19        "orgPreferenceSettings": {
20            "s1DesktopEnabled": true
21        },
22        "activitySettings": {
23            "enableActivitiesReminder": false
24        }
25    }
26}

As of Winter ʼ19, you can specify scratch org settings or org preferences in your scratch org definition file, but not both. We encourage you to convert org preferences to scratch org settings in your scratch org definition. Scratch org settings provide more settings that aren’t currently available as org preferences.

Important

Org preferences are settings that a user can configure in the org. For example, preferences control which Chatter, Knowledge, and Opportunities settings are enabled, among many others. These settings are enabled (or disabled) in the orgPreferences section of the configuration file, in JSON format.

1"orgPreferences": {
2    "enabled": ["S1DesktopEnabled", "ChatterEnabled", "IsOpportunityTeamEnabled"],
3    "disabled": ["IsOrdersEnabled"]
4}

Exercise caution when using DisableParallelApexTesting. Your tests could run noticeably slower. Try these Testing Best Practices in the Apex Developer Guide so that you can run your Apex tests in parallel.

Warning

You can set the following org preferences in the configuration file. You indicate org preferences using upper camel case, as indicated in the following lists.

To prepare for the deprecation of org preferences, we strongly suggest you switch to settings. The values for settings are similar yet different from the values in the following lists. Another difference is that you must indicate settings using lower camel case. For information on settings and their supported fields, see Settings in Metadata API Developer Guide.

Important

General Settings

  • AnalyticsSharingEnable
  • AsyncSaveEnabled
  • ChatterEnabled
  • DisableParallelApexTesting
  • EnhancedEmailEnabled
  • EventLogWaveIntegEnabled
  • LoginForensicsEnabled
  • NetworksEnabled
  • NotesReservedPref01
  • OfflineDraftsEnabled
  • PathAssistantsEnabled
  • S1DesktopEnabled
  • S1EncryptedStoragePref2
  • S1OfflinePref
  • SelfSetPasswordInApi
  • SendThroughGmailPref
  • SocialProfilesEnable
  • Translation
  • VoiceEnabled

Account Settings

  • IsAccountTeamsEnabled
  • ShowViewHierarchyLink

Activities Settings

  • IsActivityRemindersEnabled
  • IsDragAndDropSchedulingEnabled
  • IsEmailTrackingEnabled
  • IsGroupTasksEnabled
  • IsMultidayEventsEnabled
  • IsRecurringEventsEnabled
  • IsRecurringTasksEnabled
  • IsSidebarCalendarShortcutEnabled
  • IsSimpleTaskCreateUIEnabled
  • ShowEventDetailsMultiUserCalendar
  • ShowHomePageHoverLinksForEvents
  • ShowMyTasksHoverLinks

Contract Settings

  • AutoCalculateEndDate
  • IsContractHistoryTrackingEnabled
  • NotifyOwnersOnContractExpiration

Entitlement Settings

  • AssetLookupLimitedToActiveEntitlementsOnAccount
  • AssetLookupLimitedToActiveEntitlementsOnContact
  • AssetLookupLimitedToSameAccount
  • AssetLookupLimitedToSameContact
  • IsEntitlementsEnabled
  • EntitlementLookupLimitedToActiveStatus
  • EntitlementLookupLimitedToSameAccount
  • EntitlementLookupLimitedToSameAsset
  • EntitlementLookupLimitedToSameContact

Forecasting Settings

  • IsForecastsEnabled

Ideas Settings

  • IsChatterProfileEnabled
  • IsIdeaThemesEnabled
  • IsIdeasEnabled
  • IsIdeasReputationEnabled

Knowledge Settings

  • IsCreateEditOnArticlesTabEnabled
  • IsExternalMediaContentEnabled
  • IsKnowledgeEnabled
  • ShowArticleSummariesCustomerPortal
  • ShowArticleSummariesInternalApp
  • ShowArticleSummariesPartnerPortal
  • ShowValidationStatusField

Chat Settings

  • IsLiveAgentEnabled

Marketing Action Settings

  • IsMarketingActionEnabled

Name Settings

  • IsMiddleNameEnabled
  • IsNameSuffixEnabled

Opportunity Settings

  • IsOpportunityTeamEnabled

Order Settings

  • IsNegativeQuantityEnabled
  • IsOrdersEnabled
  • IsReductionOrdersEnabled

Personal Journey Settings

  • IsExactTargetForSalesforceAppsEnabled

Product Settings

  • IsCascadeActivateToRelatedPricesEnabled
  • IsQuantityScheduleEnabled
  • IsRevenueScheduleEnabled

Quote Settings

  • IsQuoteEnabled

Search Settings

  • DocumentContentSearchEnabled
  • OptimizeSearchForCjkEnabled
  • RecentlyViewedUsersForBlankLookupEnabled
  • SidebarAutoCompleteEnabled
  • SidebarDropDownListEnabled
  • SidebarLimitToItemsIownCheckboxEnabled
  • SingleSearchResultShortcutEnabled
  • SpellCorrectKnowledgeSearchEnabled