Scratch Org Definition Details

Updated 1 week ago by David Pinett

In order to create a Scratch Org, a definition configuration needs to be provided. This Definition configuration can be stored as a Definition Template making it easier to reuse it on other Scratch Orgs. 

The following fields are mandatory for the definition template: 

  • Dev Hub Org: Hub holding the Scratch Org.
  • Edition: The Salesforce edition of the scratch org. 
    • Possible values are: Developer, Enterprise, Group or Professional.
  • Duration in days: You can specify the duration of scratch org. Default value is 7. 
  • Org Name: name to identify the Scratch Org. 

Optional configurations can be defined:

  • Country: This value sets the locale of the scratch org. Default country for the scratch org is United States. If you want to override this value, select the country from drop down list.
  • Language: Default language for the scratch org is English. To override the language select the language from drop down list.
  • Description: The description is a good way to document the scratch org’s purpose. You can view or edit the description in the Dev Hub. From App Launcher, select Scratch Org Info or Active Scratch Orgs, then click the scratch org number.
  • Username: You can leave it empty. Scratch org creation will create username in that case.
  • Include Sample Data: False is the default value, which creates an org without sample data.
  • Features: You can enable some add-on features in a scratch org. You can specify multiple feature values.
  • Org Preference Types: Org preferences are settings that a user can configure in the org. You can enable and disable org preferences for scratch org.
  • Deployment Flow: The flow you want to include your scratch org in. This deployment flow needs to be enabled for Copado DX and also it should be a parent of at least one DX target step.
  • Deployment Flow DX Target Step: The flow step that defines the destination org for scratch org. Copado DX will automatically create the deployment flow step for the scratch org and automatically assign the target environment by using selected target step’s source environment.

Important: Some features, such as Communities, can require a combination of a feature and an Org Preference Types parameter to work correctly for scratch orgs. 


How did we do?