Scratch Org definition file is getting used to create the shape of your scratch org. I would say it is the blueprint of your scratch org. You can use this definition file to create multiple scratch org from your repository.
config/project-scratch-def.json
file that defines an extremely basic org “shape” for an empty scratch org.Ideally, the combination of your DX source code (including all your programmatic and declarative customization) with your scratch org definition gets you close enough to Prod instance.
This definition file contains three main important information about your scratch org.
- Which Edition? As of Winter’19, it supports Developer, Enterprise, Group or Professional
- Add-on features: Functionalities you want to include while creating the scratch org like communities, StateAndCountryPicklist, LiveAgent etc.
- Settings: Org and Feature settings used to configure Salesforce products, such as nameSettings, ideaSettings, caseSettings, omniChannelSettings.
{
"orgName": "Sudipta Deb Company",
"username": "sudipta-test-scratch@sudipta.com",
"adminEmail": "sudipta.deb@gmail.com",
"description": "This is the scratch org created by Sudipta Deb",
"edition": "Enterprise",
"features": ["Communities", "StateAndCountryPicklist", "LiveAgent"],
"settings": {
"orgPreferenceSettings": {
"s1DesktopEnabled": true,
"networksEnabled": true,
"chatterEnabled": true
},
"nameSettings": {
"enableMiddleName": true,
"enableNameSuffix": true
},
"quoteSettings": {
"enableQuote": true
},
"liveAgentSettings": {
"enableLiveAgent": true
},
"omniChannelSettings": {
"enableOmniChannel": true
},
"ideasSettings": {
"enableIdeas": true
},
"caseSettings": {
"emailToCase": true
}
}
}
- orgName: It is just giving a name of your organization in the scratch org.
- username: username of the scratch org user
- adminEmail: Email address of the Dev Hub user making the scratch org creation request.
- edition: provides the Salesforce edition of the scratch org.
- description: Giving description of the scratch org. It’s a good practice to provide description.
- features: In my example, I am enabling communities, StateAndCountryPicklist, LiveAgent in the scratch org.