Create a Scratch Org

What is a Scratch Org?

A Scratch Org is a short-lived Salesforce environment you spin up from your Developer Hub (Dev Hub). Developers use scratch orgs to validate proofs of concept, build and test unlocked packages, and experiment safely. You can create—and delete—any number of scratch orgs for each Salesforce DX project.


Requirements

  • A module registered in AutoRABIT – learn how


Creating a New Scratch Org

  1. Open Scratch Org Management Hover over the Salesforce DX module and choose Scratch Org Management.

    Salesforce DX → Scratch Org Management tile
  2. Start the wizard Click Create Scratch Org.

    Create Scratch Org button

Scratch Org Details

Tip: Some objects depend on particular profiles or other metadata. Double-check dependencies before creating your org to avoid missing components.

Select a Dev Hub (your main Salesforce Org) and enter a Scratch Org Name.

Dev Hub and Scratch Org name fields

You can define the org in three ways:

  1. Template file – Download the ScratchOrg DefinitionTemplate, edit locally, then upload.

    Download ScratchOrg Definition Template
  2. Default values – Skip uploading a file and fields; AutoRABIT builds the org with defaults (you’ll be prompted to confirm).

    Confirmation pop-up for default values
  3. Manual entry – Click Input Details and fill the form:

    • Username (email format; autogenerated if blank)

    • Description

    • Duration Days (active period)

    • Organization (business unit/name)

    • Features and Preferences (multi-select with Ctrl)

    • Admin Email, Country, Language

    • Edition (Developer, Enterprise, …)

    • Wait Time (1–15 min, default 6)

    Click NEXT when done.

    Manual Scratch Org details form

Select Module and Load Data

Choose your deployment source—Salesforce Org, Version Control, or an existing Module. (Need a new module? Create one.)

Deployment source options

Deployment via Salesforce Org

  1. Deployment From: Salesforce Org

  2. Metadata Types:

    • Full Profiles – all profiles in source

    • Full Permission Sets – all permission sets

    • All – every metadata type

  3. Source Org: select org

  4. Deployment Method:

    • Selective Deployment – choose specific types

    • Full Deployment – deploy everything

  5. Click Retrieve Metadata and pick members (use search to filter).

    Retrieve Metadata listing
  6. Click Proceed › Proceed to open deployment filters.

    Deployment filter screen 1
    Deployment filter screen 2
  7. Deployment Filters include Ignore Warnings, Validate Only, Take Backup, etc.

    Note: Standard fields are not supported for Ignore Missing Visibility Settings.

  8. Optionally enable Static Code Analysis.

  9. Apply SEARCH / SUBSTITUTE rules if configured.

  10. Add Deployment Notes.

  11. Click Next to view the Deployment Summary before execution.

Deployment Summary page

Deployment via Version Control

  1. Deployment From: Version Control

  2. Choose Version Control, Repository, Branch.

  3. Select Metadata Types.

  4. Pick a Deployment Method and click Retrieve Metadata (steps 5–11 are identical to the Salesforce Org flow).

    Version Control deployment configuration

Deployment via Module

Use an existing module in AutoRABIT:

  • Load Dataset from <Module Name> – adds the module’s dataset to the scratch org (if defined during module creation).

  • Include all dependent packages – deploys every package linked to the module.

Module deployment options

Click Show Members to review metadata, then Next to continue to Assign Branch and ALM.

Show Members list

Assign Branch and ALM

Assign Branch

  • Select Version Control, Repository, Branch.

  • Use Create Branch to spin up a new branch for the scratch org.

Assign Branch section

Assign User Story

Link an ALM work item to track progress:

  1. ALM Type (JIRA, Azure DevOps, etc.)

  2. ALM Label

  3. Project and Sprint

  4. Work Item

  5. Click Next.

Assign ALM work item

Manage Permissions

Assign module permissions to users; each receives an email with org details.

Manage Scratch Org permissions

After submission you return to Scratch Org Management where progress is tracked.

Scratch Org Management list

Additional Options on the Scratch Org Management Screen

Scratch Org Management actions
  1. Scratch Org Summary – click an org name for details.

    Scratch Org Summary page
  2. View Log – see log output.

  3. Deployment Status & Report – success, failure, timeout, etc.

  4. Load Data – shows whether sample data was added.

  5. Scratch Org Status – active / inactive.

  6. Manage

    • Launch Scratch Org – opens the org in a new tab (allow pop-ups).

    • Manage Scratch Org Permissions – update user access (emails sent on change).

  7. Actions

    • Delete Scratch Org – permanent deletion.

    • Edit ALM and Branch – change ALM link or VCS branch.


Last updated

Was this helpful?