<aside>
When you create a new Scratch Org in Hutte, you have two options. You can either create a brand-new Scratch Org, or take one from your project’s [Scratch Org pool] (if [Org pooling] has already been set up for your project).
</aside>
Creating a brand-new Scratch Org
<aside>
- First, click on the “New Scratch Org” button in the top right-hand corner of your project dashboard.
</aside>
<aside>
- This will open up a dialogue window where you can define many different settings for your new Scratch Org.
</aside>
<aside>
<img src="/icons/flash_yellow.svg" alt="/icons/flash_yellow.svg" width="40px" />
Red options are mandatory, blue options are optional.
</aside>
<aside>
- Name: Enter the name for your new Scratch Org. Teams typically will typically use the name of an issue reference that is related to the feature they are currently working on.
</aside>
<aside>
- Duration: This is the number of days that your new Scratch Org will exist before expiring.
</aside>
<aside>
- From Git branch: This is the branch that contains the source code that will be pushed to your new Scratch Org.
</aside>
<aside>
- From Snapshot: Alternatively, you can specify a Scratch Org Snapshot to create your new Scratch Org from.
</aside>
<aside>
- Branch Name: When you pull changes from your Scratch Org, Hutte will create a Git feature branch with the name that you specify here.
</aside>
<aside>
- Configuration file (Admins only): This section allows you to further customize your Scratch Orgs if you have specific needs. The default configuration that appears here will usually be suitable.
</aside>
<aside>
- Packaging Flags: Here you can toggle two options on or off:
- No ancestors: If this is toggled On, second-generation managed package (2GP) ancestors will not be included in the Scratch Org.
- No namespace: If this is toggled On, the Scratch Org will be created with no namespace, even if the Dev Hub has a namespace.
</aside>
<aside>
- Issue reference: This field allows you to provide a link to the related issue in your issue tracking tool, such as Jira or Linear. This allows your team to access the new Scratch Org or Sandbox’s work requirements quickly. If this field is populated, you’ll see the issue reference link you provided in the “Info” section of your Scratch Org or Sandbox’s detail view.
</aside>
<aside>
- Notes: This field allows you to share important notes related to the current task with your team, or save them for future reference.
</aside>
<aside>
Next, click on “Create Scratch Org”. This will create a new Scratch Org based on the settings you’ve defined, and the “setup_script" and "push_script” from your project's configuration file will execute.
</aside>
<aside>
It may take a few minutes for your Scratch Org to “spin up”. The exact duration of creating depends on the complexity of your configuration (for example, the amount of metadata that gets pushed). The number (quota) of available Scratch Orgs depends on the Salesforce org (DevHub) that is connected to your project.
</aside>
<aside>
<img src="/icons/flash_yellow.svg" alt="/icons/flash_yellow.svg" width="40px" />
If you are running short on Scratch Orgs, reach out to your Salesforce account executive or to Salesforce support to have your quota raised. Learn more about Scratch Org quotas (limits) here.
</aside>
Taking a new Scratch Org from the pool
<aside>
If your Hutte admin has already set up Org Pooling for your Scratch Org project, you don’t need to wait for a new Scratch Org to spin up when you create a new one. Instead, you can just take one from the pre-made pool.
</aside>
<aside>
- First, click on the “Take from Pool” button in the top right-hand corner of your project dashboard.
</aside>
<aside>
- This will open up a dialogue window where you can specify the name for your new Scratch Org, the branch name, and which Scratch Org should be pulled from the pool.
</aside>
<aside>
- Click “Save” and your chosen Scratch Org will be pulled from the pool, ready to be used immediately.
</aside>