Scratch Org Wizard

Updated 3 months ago by Copado Solutions

If you are new to Copado DX, please check out the article Getting Started with Copado DX.

If you have already completed the first steps in the getting started path and have followed the instructions provided in the article Set Up Your Developer Hub to enable an org credential as dev hub, you can go ahead and start creating your scratch org.

Copado’s scratch org wizard allows you to easily set up your scratch org. Let’s take a look at the step-by-step process:

  1. First of all, create a user story with an empty org credential. This field will be populated later on with the credentials of the scratch org:

  1. From the drop-down menu at the top-right corner of the page, click on Scratch Org Wizard to launch the wizard:

  1. The first stage is to load the metadata. Select Unlocked Packages from the available metadata source options:

  1. On the next screen, fill in the relevant details and select a package:

  • Select the org credential with which the package is associated.
  • Select an API version.
  • If you have a custom domain, include it in the SFDC Login Url field.
  • Add a namespace if you would like your scratch org to have one. Please note this field is not required for unlocked packages.
  • Select the package you want to add to your scratch org. This is a multi-select picklist field, so you can select more than one package.
    If you have not created a package yet, follow the steps provided in the article Creating an Unlocked Package to create one.
  • Select a package version and click on Add to Selection:

If you want to use a Git package instead, this section would look almost the same, except that in the case of Git packages you don’t need to provide a version.
  • Click on Next at the top right corner to move on to the next stage in the wizard.
  1. At this stage, you need to set up your scratch org definition template:


    1. If you don’t have any pre-configured org definition template, leave this field blank and fill in your template details.
    2. Give your org definition template a name.
    3. Select the dev hub org that will be used to manage the scratch org and the Salesforce edition of the org.
    4. The Org Name field will be autopopulated.
    5. Set a duration for your scratch org. The default value is 7 days, and the maximum duration allowed is 30 days.
    6. You don’t need to provide any other details at this stage. However, if you want to create an org which includes certain features, scroll down to the Definition section and create  a definition JSON file with the features you would like to include:

      For more details about the information included in this section, please refer to the article Scratch Org Definition Details.
    7. Once you are done, click on Save As Template if you want to reuse this template in the feature, or click on Next  to proceed  to the next stage.
  2. You are now at the Extensions stage. Here, you can configure actions that will be executed once the scratch org is created, such as assigning permission sets. If you don’t want to add anything else, click on Next to go to the next stage. Otherwise, follow these steps:
    1. Create a standalone deployment in a separate tab with a source org and no destination.
    2. Add a deployment step with the action you would like to execute. If you want to assign permission sets, you can use an Apex step.
    3. Save the deployment.
    4. Back in the scratch org wizard, select the source org used in the deployment in the Source Org lookup field:
    1. Next, select the deployment you have created in the field Select a Job Template and click on Add to extensions:
    1. Once you are done, click on Next to continue.
  3. At the last stage of the wizard you can review and validate the parameters you have added to your scratch org and ensure everything looks right:

If you have included any permission sets in the package, you can select them from the grid, and they will be automatically assigned to your user once the scratch org is created.
  1. Click on Complete Setup to finalize the creation of your scratch org:


How did we do?