Newer Version Available
Scratch Org Definition Configuration Values
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>
- AddCustomTabs:<value>
- AddHistoryFieldsPerEntity:<value>
- API
- AuthorApex
- Chatbot
- Communities
- ContactsToMultipleAccounts
- ContractApprovals
- CascadeDelete
- CustomerSelfService
- CustomApps (to be deprecated in Spring ’19)
- CustomTabs (to be deprecated in Spring ’19)
- DebugApex
- DefaultWorkflowUser
- Entitlements
- ExternalSharing (not available in Group Edition)
- ForceComPlatform
- Interaction
- IoT
- Knowledge
- LightningSalesConsole
- LightningServiceConsole
- LiveAgent
- LiveMessage
- MaxApexCodeSize:<value>
- MaxCustomLabels:<value>
- MultiCurrency
- PersonAccounts
- ProcessBuilder
- SalesWave
- ServiceCloud
- ServiceWave
- SiteDotCom
- SiteForceContributor
- Sites
- StateAndCountryPicklist
- Workflow
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 |
| AddCustomTabs | Allocation | 30 | Replaces CustomTabs |
| 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. |
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.
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}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.
Supported Org Preferences (To Be Deprecated in Spring ʼ19)
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.
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}You can set the following org preferences in the configuration file. See the Metadata API Developer Guide for descriptions of the supported settings.
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
Live Agent 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