# Salesforce DX Metadata Format

Modern DevOps workflows rely on **Salesforce DX (SFDX)** to treat org configuration like code.\
Instead of a monolithic ZIP, your metadata lives in a **source-tracked directory structure** that maps cleanly to Git and CI/CD pipelines. AutoRABIT embraces this model and adds automation on top—but it needs to know which folder(s) contain your DX-formatted source.

***

### Overview <a href="#overview" id="overview"></a>

AutoRABIT identifies an SFDX repository by locating an **`sfdx-project.json`** file in the root:

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FWIh92iiBkuDvcO9MxyQ5%2Fimage.png?alt=media&#x26;token=6861a43a-c872-4bf8-8082-bae74ca3068e" alt="Root containing sfdx-project.json"><figcaption></figcaption></figure>

This file includes a **`packageDirectories`** array. Each entry defines a **Package Directory**—the root of your metadata for pushes to and pulls from scratch orgs.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FSbjON2HRLW8lD0s2TmUl%2Fimage.png?alt=media&#x26;token=421cc788-2d19-4a6e-8468-b21a6c89dd01" alt="packageDirectories inside sfdx-project.json"><figcaption></figcaption></figure>

If you register an existing DX repo with AutoRABIT, ensure every source folder is listed under **`packageDirectories`**. Click **Refresh** in the UI if the directories don’t appear immediately.

> **Supported layout**\
> AutoRABIT currently supports the **standard** DX structure only:\
> `<package-directory>/main/default/*`\
> (Created automatically by `sfdx force:project:create`.)

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FcXkO3Lbfy1HoHP9lrDqZ%2Fimage.png?alt=media&#x26;token=4b0f06bf-a54b-4b7a-94cf-1554441e7310" alt="Standard SFDX directory tree"><figcaption></figcaption></figure>

You may declare multiple package directories, but **each** must follow the same `/main/default` sub-tree.

***

### Places to Select the Source SFDX Folder <a href="#places-to-find-the-source-sfdx-folder-path" id="places-to-find-the-source-sfdx-folder-path"></a>

#### EZ-Commit Screen <a href="#ezcommit-screen" id="ezcommit-screen"></a>

Choose **Package Directory** when committing metadata from a Salesforce org to an SFDX branch.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FnpumJ44OUO2EFkxKKs1C%2Fimage.png?alt=media&#x26;token=e9dfca4f-7ec7-4cfc-84d7-dfe7771f401c" alt="Package Directory dropdown in EZ-Commit"><figcaption></figcaption></figure>

#### During a CI Job <a href="#during-ci-job" id="during-ci-job"></a>

Select the folder while deploying SFDX source from Version Control to a Salesforce org.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F80FzWvXwOPiTXgEWKmhm%2Fimage.png?alt=media&#x26;token=05a03854-a33e-4ce7-8d9e-cfd63fafe618" alt="Package Directory dropdown in CI Job"><figcaption></figcaption></figure>

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FCu8b7hjsBNY4CbGnjWYB%2Fimage.png?alt=media&#x26;token=e29634fb-b4d4-47cb-ad67-0373c7346c11" alt="CI Job configuration with Package Directory"><figcaption></figcaption></figure>

#### Branching Baseline Operation <a href="#during-branching-baseline-operation" id="during-branching-baseline-operation"></a>

When committing all metadata from a Salesforce org into an SFDX branch, pick the directory here.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fmvp5qzeDJh03FyxPuqyD%2Fimage.png?alt=media&#x26;token=8d4d970b-c800-4cdd-bc9c-eba75d1da554" alt="Package Directory during Branching Baseline"><figcaption></figcaption></figure>

#### Creating Unlocked/Managed Packages <a href="#while-creating-unlockedmanaged-packages" id="while-creating-unlockedmanaged-packages"></a>

Specify **Package Directory** while defining an unlocked or managed package.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F38qbD9rgeqr8tk0p6oMx%2Fimage.png?alt=media&#x26;token=e87d3b2b-525a-4451-8db9-18741f7f8368" alt="Package Directory dropdown in package creation"><figcaption></figcaption></figure>

#### New Commit Labels <a href="#while-creating-a-new-commit-label" id="while-creating-a-new-commit-label"></a>

Commit labels for DX repos also require the source folder.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fzwr96nAutVehXcQ2NsEk%2Fimage.png?alt=media&#x26;token=0e378d27-81fd-487d-9663-b4045c24d265" alt="Package Directory selection for Commit Label"><figcaption></figcaption></figure>

#### Release Label Creation <a href="#during-release-label-creation" id="during-release-label-creation"></a>

Choose the directory again when generating a release label.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FOnLufhkdMgMz7S0ieQAr%2Fimage.png?alt=media&#x26;token=7ed951df-b5cd-40ac-b538-6535917af0c2" alt="Package Directory selection for Release Label"><figcaption></figcaption></figure>
