# Create a Module

### Introduction <a href="#introduction" id="introduction"></a>

Modularization lets you break your org’s customizations into **unlocked packages**.\
Each package becomes the single source of truth for the metadata it contains, and you can update any environment—scratch org, sandbox, or production—by installing the latest version.

Whenever you change the package’s [metadata](https://www.autorabit.com/blog/the-role-of-metadata-in-devops-for-salesforce/), you simply create a **new package version** and install it wherever it’s needed.

***

### Creating a Module <a href="#creating-a-module" id="creating-a-module"></a>

Follow these steps to create a module in AutoRABIT:

1. **Open Modularization**\
   Hover over the [**SFDX**](https://knowledgebase.autorabit.com/~/revisions/Sxgg9jAjbkdELNi4g1n4/product-guides/arm/arm-features/salesforce-dx/salesforce-dx-metadata-format) tile and click **Modularization**.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FzSRCdFXygcTn6Ied0Y6r%2Fimage.png?alt=media&#x26;token=6048ecb2-915d-41d3-a530-9570f488d431" alt="SFDX → Modularization" width="209"><figcaption></figcaption></figure>
2. **Start a new module**\
   Click **Create Module**.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fz6Ws5Hw2smuEROkkNKSc%2Fimage.png?alt=media&#x26;token=6d6bd2ea-b90c-492f-a41f-1240464e1c94" alt="Create Module button"><figcaption></figcaption></figure>
3. **Name and source**

   * Enter a **Module Name**.
   * Choose the **Source Org** that contains the metadata.\
     Click **Next**.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FW2OOQ8yAZj1Yigukl8ZD%2Fimage.png?alt=media&#x26;token=d17de5f5-672c-4431-9dac-5f21bceb8ef8" alt="Name and source org"><figcaption></figcaption></figure>
4. **Select metadata**\
   Choose the **Metadata Types** (and their members) to include. Use the **Search Filter** to locate items quickly.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F9IcQlf00KXetO4LVpnxY%2Fimage.png?alt=media&#x26;token=bd7ad06b-f438-4e58-a11e-c7bed7fef7af" alt="Select metadata"><figcaption></figcaption></figure>

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Important:</strong> Avoid adding metadata types that already belong to another module in the same branch.</p></div>
5. **Review selection**\
   Click **Selected Members** to view a summary of chosen metadata, then click **OK**.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FB64J2rc2GTO51X2APGPJ%2Fimage.png?alt=media&#x26;token=582e8704-e820-452e-bbb8-b5e740754e69" alt="Selected members summary" width="563"><figcaption></figcaption></figure>
6. Click **Next** to open the **Validate and Push** screen.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FJP7vf4t1fgQu3pAEIh6o%2Fimage.png?alt=media&#x26;token=dcab625e-e251-4287-8f8c-4dd1ee5aee33" alt="Validate and Push"><figcaption></figcaption></figure>
7. **Validate dependencies**\
   Compare the Source Org with another [Salesforce Org](https://knowledgebase.autorabit.com/~/revisions/Sxgg9jAjbkdELNi4g1n4/product-guides/arm/arm-features/salesforce-dx/broken-reference) to ensure no dependent components are omitted.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FKgaDN2iwDONR02zmG7da%2Fimage.png?alt=media&#x26;token=6d82ec62-8e22-41a2-9147-c8a709bff383" alt="Validation options"><figcaption></figcaption></figure>
8. **Additional options**
   * **Ignore Missing Visibility Settings, If Package Contains Profiles Or PermissionSets** – visible only when Profiles/PermissionSets are included; deploys delta changes.
   * **Ignore Installed Components** – skips managed-package components already present in the target org.

{% hint style="info" %}
**Note:** *Standard fields* are **not** supported for **Ignore Missing Visibility Settings**.
{% endhint %}

9. **Publish To** – configure commit and package settings.

   * **Repository / Branch** – pick where to commit the metadata (use **+** to create a branch).
   * **Development Hub (Dev Hub)** – select the Dev Hub that will own the unlocked package.
   * **Email Address** – recipient of the module-creation email.
   * **Include metadata dependencies** – automatically pull in required dependent members.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FDGAVlHXM0dGJjaRaah53%2Fimage.png?alt=media&#x26;token=e15db1e6-e401-4252-b40a-b742e5176d3f" alt="Publish To settings"><figcaption></figcaption></figure>

{% hint style="info" %}
**Tip:** To fetch dependency data, the Dependency API must be enabled. See Salesforce docs [here](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_metadatacomponentdependency.htm).
{% endhint %}

10. **Package Dependencies**\
    If the Dev Hub already owns related packages with at least one successful version, they appear here.

{% hint style="info" %}

```
**Conditions:**  
* The dependent package was created in AutoRABIT **and**  
* It has at least one successful version.
```

{% endhint %}

11. **Add / arrange dependencies**

    * Select packages in **Available Packages** and use the ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FQUmdogWeS9RA9e0xocP1%2Fimage.png?alt=media\&token=5fe40a2f-190e-4689-9042-fb46a5725bb6) / ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F3siQpR0RCgjLlWya4u8O%2Fimage.png?alt=media\&token=dfdbaef8-139f-4d54-9318-f37297e63e1d) icons to add or remove them.
    * Use ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FfHmcwEwbCnJCd1rPlGx0%2Fimage.png?alt=media\&token=dd3180c1-f81e-418c-8a78-6b603ae35d75) / ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FH6BJJvkqDhHl4Ne8ajJd%2Fimage.png?alt=media\&token=8cafc3a0-96e3-4f23-9e60-5fa38b291b9e) to reorder; the top package deploys first.

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fz96aDSJjwd8sUkmgR09t%2Fimage.png?alt=media&#x26;token=1e0b7b06-ee41-4009-895b-8e1680f7be99" alt="Package dependencies"><figcaption></figcaption></figure>
12. **Create the module**\
    Click **Create Module**. You’ll return to the **Modularization** home page, where you can monitor progress.
13. **Module list columns**

    * **Module Name** – name you assigned
    * **Source Org** – org where the module originated
    * **Repository / Branch** – VCS location for commits
    * **Package URL** – link for package installation (see *Deployment via Unlocked Packages*)
    * **Validation Status** – pre-validation result plus log
    * **Status** – creation progress (Success, Failed, or In Progress)

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Ft25K1sE2Joaj3992rWTy%2Fimage.png?alt=media&#x26;token=c82b9a7c-82c9-480d-8d7e-b58cadbd5062" alt="Module list"><figcaption></figcaption></figure>

**Sample email notification**

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FdqAv5isPKwmarWqWgYtp%2Fimage.png?alt=media&#x26;token=b206ef40-7af0-4ddd-9e29-0f134f4a1c7e" alt="Email example" width="483"><figcaption></figcaption></figure>

***

### Additional Features <a href="#additional-features" id="additional-features"></a>

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FASLQ9bB9Vj1msb9nl234%2Fimage.png?alt=media&#x26;token=856fda84-a171-40d5-a9c3-c0dc45b10fe9" alt="Additional features"><figcaption></figcaption></figure>

1. **Actions**
   * **Edit Module** – update module details
   * **Log Details** – view execution logs
   * **Delete Module** – permanently remove a module *(irreversible)*
2. **Info**
   * **Module Summary Info** – see dependency details for selected metadata
   * **Module Info** – view timestamps and other metadata about the module
