# Create a Scratch Org

### What is a Scratch Org? <a href="#what-is-scratch-org" id="what-is-scratch-org"></a>

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 href="#requirements" id="requirements"></a>

* A module registered in AutoRABIT – [learn how](/product-guides/arm/arm-features/salesforce-dx/create-a-module.md)

***

### Creating a New Scratch Org <a href="#creating-a-new-scratch-org" id="creating-a-new-scratch-org"></a>

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

   <figure><img src="/files/aj5zD1g8y5DBQWxppGTe" alt="Salesforce DX → Scratch Org Management tile" width="203"><figcaption></figcaption></figure>
2. **Start the wizard**\
   Click **Create Scratch Org**.

   <figure><img src="/files/YKg8OXw8iDxklyRSv7FL" alt="Create Scratch Org button"><figcaption></figcaption></figure>

***

#### Scratch Org Details <a href="#scratch-org-details" id="scratch-org-details"></a>

> **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](/product-guides/arm/registration/salesforce-org/salesforce-org-management.md)) and enter a **Scratch Org Name**.

<figure><img src="/files/l2zYBdr2wMiViNioMab7" alt="Dev Hub and Scratch Org name fields"><figcaption></figcaption></figure>

You can define the org in **three** ways:

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

   <figure><img src="/files/Q9rnxKKy5EQAIKm7Hjzr" alt="Download ScratchOrg Definition Template"><figcaption></figcaption></figure>
2. **Default values** – Skip uploading a file and fields; AutoRABIT builds the org with defaults (you’ll be prompted to confirm).

   <figure><img src="/files/PaZd0hQMjm4KKKXH64e9" alt="Confirmation pop-up for default values"><figcaption></figcaption></figure>
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.

   <figure><img src="/files/CxR2I8A0V9lQCMBvg4v2" alt="Manual Scratch Org details form"><figcaption></figcaption></figure>

***

#### Select Module and Load Data <a href="#select-module-and-load-data" id="select-module-and-load-data"></a>

Choose your deployment source—**Salesforce Org**, **Version Control**, or an existing **Module**. (Need a new module? [Create one](/product-guides/arm/arm-features/salesforce-dx/create-a-module.md).)

<figure><img src="/files/1vNdNgGzbFvqANk9lp4h" alt="Deployment source options"><figcaption></figcaption></figure>

***

**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).

   <figure><img src="/files/dFb3ANuxzZwNzEsXXYCz" alt="Retrieve Metadata listing"><figcaption></figcaption></figure>
6. Click **Proceed › Proceed** to open deployment filters.

   <figure><img src="/files/XQ3D2gCFFPTXoCGgr23p" alt="Deployment filter screen 1"><figcaption></figcaption></figure>

   <figure><img src="/files/5NSl3JTp9BklO3dHl7aQ" alt="Deployment filter screen 2"><figcaption></figcaption></figure>
7. **Deployment Filters** include Ignore Warnings, Validate Only, Take Backup, etc.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note:</strong> <em>Standard fields</em> are <strong>not</strong> supported for <strong>Ignore Missing Visibility Settings</strong>.</p></div>
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.

<figure><img src="/files/GiBn3HkaKZNrORqWGqIM" alt="Deployment Summary page"><figcaption></figcaption></figure>

***

**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).

   <figure><img src="/files/3ASmLM9nkUMyqefSya5J" alt="Version Control deployment configuration"><figcaption></figcaption></figure>

***

**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.

<figure><img src="/files/ZYiZc672FWDpXBU1jXZT" alt="Module deployment options"><figcaption></figcaption></figure>

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

<figure><img src="/files/G8b0Q7YI2VC7xTbg1O1J" alt="Show Members list"><figcaption></figcaption></figure>

***

#### Assign Branch and ALM <a href="#assign-branch-and-alm" id="assign-branch-and-alm"></a>

**Assign Branch**

* Select **Version Control**, **Repository**, **Branch**.
* Use **Create Branch** to spin up a new branch for the scratch org.

<figure><img src="/files/eQb5tfAowuCtnBobUd2S" alt="Assign Branch section"><figcaption></figcaption></figure>

**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**.

<figure><img src="/files/TcNzulkMglNoHvyjP5Du" alt="Assign ALM work item"><figcaption></figcaption></figure>

***

#### Manage Permissions <a href="#manage-permissions" id="manage-permissions"></a>

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

<figure><img src="/files/OgcfOSqiCJhMkh840FYM" alt="Manage Scratch Org permissions"><figcaption></figcaption></figure>

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

<figure><img src="/files/jvQrS8GUk7OJQwQ4EMZR" alt="Scratch Org Management list"><figcaption></figcaption></figure>

***

### Additional Options on the Scratch Org Management Screen <a href="#additional-options-on-scratch-org-management-screen" id="additional-options-on-scratch-org-management-screen"></a>

<figure><img src="/files/8ddXc0DQ7lGg5d8eE1vp" alt="Scratch Org Management actions"><figcaption></figcaption></figure>

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

   <figure><img src="/files/bomPtG4et4Ie6N0Lmtrm" alt="Scratch Org Summary page" width="563"><figcaption></figcaption></figure>
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.

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledgebase.autorabit.com/product-guides/arm/arm-features/salesforce-dx/create-a-scratch-org.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
