# Committing OmniStudio Components to a Branch

This section deals with exporting of OmniStudio data packs from a Salesforce Org through a YAML manifest describing your project and committing the same to a Version Control System. The primary goal is to enable Continuous Integration for OmniStudio metadata through source control.

### Commit OmniStudio Components <a href="#commit-vlocity-components" id="commit-vlocity-components"></a>

1. Go to the **New EZ-Commit** screen.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FrWSF6UCDMZjG2dFbMcaW%2Fimage.png?alt=media&#x26;token=6b81077a-40aa-4cd5-bedd-85ab0b537b1d" alt="" width="479"><figcaption></figcaption></figure>

2. In the **EZ-Commit** screen, select your **Salesforce Org.**
3. Select the **Salesforce Org Author**.
4. Under **Commit To** section, select the **Version Control Repository** and the **Branch** where the commits need to be done.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FkZpLcVRlFnq1jiKeDeJF%2Fimage.png?alt=media&#x26;token=0dca9b02-3f9b-41a8-852b-1afddf1362e6" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note**: The selection of a branch is only available if you have enabled **'Skip Mappings'** in the **My Profile** section.  Otherwise, the branch will automatically be selected based on the org mappings and it is not editable.
{% endhint %}

5. Under **Fetch Changes**, select the components as **OmniStudio Components**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FnfCGQZ6oTThvBwGgIqSV%2Fimage.png?alt=media&#x26;token=27bcd301-3de2-480c-bc85-a1c5bc880ec6" alt="" width="431"><figcaption></figcaption></figure>

#### Different options for OmniStudio Components <a href="#different-options-for-vlocity-components" id="different-options-for-vlocity-components"></a>

**1. Auto Draft**

This will bring all the changes which the Author has done in the Salesforce Org which have not been committed yet to Version Control (AutoRABIT does the calculation by using the last modified date in the Salesforce org and comparing against the last commit date to Version Control branch).

**2. Select Manually**

This will export OmniStudio components from a Salesforce Org through a YAML manifest describing your project and committing the same to a Version Control System. The primary goal is to enable continuous integration for OmniStudio metadata through source control.

**3. Max Depth**

Max Depth decides the level of dependencies that will be executed while fetching and committing vlocity components. The value of Max Depth that was set while configuring OmniStudio will be used globally

However, the user can modify the value based on his requirement.

* When Max Depth Values is set to **-1** means it will execute all-level dependencies of the selected data pack record
* When Max Depth Values is set to **0** means it will execute only selected data pack records and
* When Max Depth Values is set to **1** means it will execute only first-level dependencies of the selected data pack record.

**4. Custom YAML File**

The user also has an option to upload a custom **YAML file** (Project path and manifest/queries fields are mandatory). In such a case, the already configured Data Packs Type will have no impact on the current commit label.

**5. Compile on Build**

When checked, it compiles the data you are attempting to deploy in your branch. **However, AutoRABIT recommends that you keep this checkbox unselected.** This is because the tool can throw a compilation error when you're trying to commit data that doesn't have dependent components keeping the '**Compile On Build'** checkbox selected.

**6. Auto Update Settings**

This option ensures you have the latest DataPack settings before each export and deployment. This check is quick and you are advised to allow it.

**7. Separate Matrix Versions**

Add Ability to Export Matrix Versions separately.

Fill in the remaining fields as per your requirements, and proceed to the next screen. The OmniStudio components will get retrieved based on the difference between the Salesforce org and below-mentioned retrieval path. Select the components you would like to commit to the branch.

### Possible Retrieval Path <a href="#possible-retrieval-path" id="possible-retrieval-path"></a>

#### A. For Custom YAML file <a href="#a-for-custom-yaml-file" id="a-for-custom-yaml-file"></a>

**Scenario 1:** If the metadata folder path is not available. For such a case, the OmniStudio components will fetch from the ***\<repoURL>/\<yaml project path>*** path by default.

**Example:**

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FMOTAzvm0xRlKc5KMS1qs%2Fimage.png?alt=media&#x26;token=cbb2f501-3373-432f-9f6f-12d64e07c887" alt="" width="452"><figcaption></figcaption></figure>

**Retrieval Path:*****"\<repoURL>/\<yaml project path>"*****Scenario 2:** The metadata folder path is available. In such case, the OmniStudio components will get retrieved from ***repoURL>/\<metadata folder path>/\<yaml project path>***.

**Example:**

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fv9nlCIfvFAMqTYVpvVQQ%2Fimage.png?alt=media&#x26;token=edfb39a6-d83f-48c6-949c-f6e1877a2669" alt="" width="452"><figcaption></figcaption></figure>

**Retrieval Path:*****"\<repoURL>/\<OmniStudio Component>/\<yaml project path>"***

#### B. For Default YAML file <a href="#b-for-default-yaml-file" id="b-for-default-yaml-file"></a>

**Scenario 1:** The metadata folder path is not available. For such a case, the OmniStudio components will fetch from ***\<repoURL>/autorabit\_alldefault\_OmniStudio\_build*** path by default.

**Example:**

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FPyxC3CjUs2zOzjoQgcfP%2Fimage.png?alt=media&#x26;token=0e96bfca-ef99-4096-abc6-906dc82aa233" alt="" width="452"><figcaption></figcaption></figure>

**Retrieval Path**: ***"\<repoURL>/\<autorabit\_alldefault\_OmniStudio\_build>"***

**Scenario 2:** The metadata folder path is available. In such case, the OmniStudio components will get retrieved from ***\<repoURL>/\<metadata folder path>***.

**Example:**

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F16HDmKnylM1tUsZvdER1%2Fimage.png?alt=media&#x26;token=c1426aa1-f5f5-4039-8da7-598b108b55e5" alt="" width="452"><figcaption></figcaption></figure>

**Retrieval Path:*****"\<repoURL>/\<metadata folder path>"***
