Newer Version Available
Scratch Org Settings
Scratch org settings are the format for defining org preferences in the scratch org
definition. Because you can use all Metadata API settings, they’re 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.
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 }
15}This example shows how to use NameSettings to enable middle names and suffixes in your org for these person objects: Contact, Lead, Person Account, and User.
1{
2 "orgName": "Acme",
3 "edition": "Enterprise",
4 "settings": {
5 "mobileSettings": {
6 "enableS1EncryptedStoragePref2": true
7 },
8 "nameSettings": {
9 "enableMiddleName": true,
10 "enableNameSuffix": true
11 }
12 }
13}