# Deployment via Version Control using Salesforce Org

This section is about deploying the nCino metadata and data via version control using the Salesforce dataset.

1. Hover your mouse over the [nCino ](https://www.autorabit.com/industry-solution/banking-financial-services-ncino/)module and click on the **Deployment History** option.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FYj0KausrZY041c6Apncn%2Fimage.png?alt=media&#x26;token=c69ee2ac-9a48-4c51-a10c-370816256bfc" alt="" width="202"><figcaption></figcaption></figure>

2. Click on the **Feature Deployment** button.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FiSbJdDpRePFNJqhVooZ6%2Fimage.png?alt=media&#x26;token=af3d77cf-44a6-47d6-af28-ba6101c4b281" alt=""><figcaption></figcaption></figure>

3. On the next screen, give the process a **name** and a brief **description** of it.
4. In the **Source** section, select Deployment From as [**Version Control**](https://www.autorabit.com/blog/8-benefits-of-version-control-in-salesforce-development/) **using Salesforce Org**.
5. Select your **Version Control** type, **Repository**, and **Branch**.
6. Select the **deployment type**.

   * **Entire Branch:** This option will fetch the feature migration templates configured on your branch. You'll be asked to choose the **template** and **template version** when you select the entire branch option.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FXRCaxzqLSz1yO1VLwM0y%2Fimage.png?alt=media&#x26;token=293001f2-6481-4d7c-82fe-090fe1cef3d1" alt=""><figcaption></figcaption></figure>

   * **Single Revision:** This option will pull all of the versions from your repo, allowing you to choose which revision to use in the deployment.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FyJYgLS114GzjSHjdnA2u%2Fimage.png?alt=media&#x26;token=bdbcfb8f-881e-4ca7-afa4-1c1c9e576959" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Flklj7l20TC1bGjrfe9SO%2Fimage.png?alt=media&#x26;token=82747fa8-297f-4923-b880-103955583487" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
After deploying a job, modifying the deployment type during subsequent edits may affect the integrity or effectiveness of any rollbacks performed thereafter.
{% endhint %}

7. Select your **Source Salesforce Org**.
8. Based on your template selection, the object configuration section will render the selected objects and apply filters and mappings.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FUlnEEp5n1G0PpR7sAA63%2Fimage.png?alt=media&#x26;token=8223f219-2de1-42d8-a0ca-b455509f6874" alt=""><figcaption></figcaption></figure>

9. Choose your **Destination Environment**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FzTRaD5F8s4alwRYcloXL%2Fimage.png?alt=media&#x26;token=d1775745-d834-4454-b8c5-9c9af3afb68a" alt=""><figcaption></figcaption></figure>

10. There are various options that you can configure to your objects before you proceed with deployment or commit:

    * Applied Mappings
    * Applied Filters

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F7hEjBJKxs4XZRwbX64dN%2Fimage.png?alt=media&#x26;token=d2ec61b5-95ea-4c43-96c1-185feee8946d" alt=""><figcaption></figcaption></figure>

#### Applied Mappings <a href="#applied-mappings" id="applied-mappings"></a>

In this section, you can use an external ID in place of a related record's Salesforce record ID to relate or associate records to each other as you process an Upsert operation. For example, if **Object B** has a lookup field to another **Object A** you can use the values contained in a field that's marked as an External ID on **Object A** to relate the two (**Object B** to **Object A** records).

In the **Source** field: Select your own source field whose values will get populated in the destination External Id field.

In the **Destination** field: Select the required field from the destination org whose values will remain unique for all the records.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FIKMUijRmV9w8vzdhIUIA%2Fimage.png?alt=media&#x26;token=5b952f70-2af6-4380-888b-a894ff6fcc79" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Important Note (About Applied Mappings)**:

1. Since the source for Deployment via **Template** or **Version Control** is a CSV file rather than a Salesforce Org, all fields, regardless of the External ID supported, will be fetched and displayed in the **Source** column. However, the relevant fields will be shown under the Destination column since the target org is a salesforce org.
2. AutoRABIT External ID fields are not supported for the **Upsert** operation.
   {% endhint %}

#### Applied Filters <a href="#applied-filters" id="applied-filters"></a>

Such filters will be displayed here if any filter is applied to the objects. You can edit the already applied filter (if required) using **Edit Filter.**

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FA4AwnSb3pJcR03rVs9ga%2Fimage.png?alt=media&#x26;token=6f24b992-c557-4350-95b9-5b5893853e3a" alt=""><figcaption></figcaption></figure>

#### Deployment Option <a href="#deployment-option" id="deployment-option"></a>

Based on your destination selection, you will have different deployment buttons to choose from:

1. **Create Dataset:** Create a dataset from your Salesforce Org. On selection, you will be redirected to the [Commits History](https://knowledgebase.autorabit.com/product-guides/arm/arm-features/version-control/ez-commits/commits-summary) screen.
2. **Create Dataset & Deploy:** Create a dataset and deploy it to your Salesforce Org.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FIwu1pvgXP7QN2oWj2mCK%2Fimage.png?alt=media&#x26;token=b2dc9847-9890-45db-8f34-74127c443f19" alt=""><figcaption></figcaption></figure>

For deploying to the destination org, you will find the list of deployment criteria you can opt for before proceeding.

**Deployment Filters**

1. **Disable Workflow Rules:** This option will deactivate the workflow rules associated with objects part of the deployment
2. **Disable Validation Rules:** This option will deactivate the validation rules associated with objects part of the deployment
3. **Insert/update with Null Values:** This will either insert or update record field values with null (if the value is null in Source Org) in Destination Org
4. **Use UTF-8 file encoding for file read and write operations:** Use UTF-8 as the internal representation of strings. Text is transcoded from the local encoding to UTF-8 when data is written to or read from a file. UTF-8 must be enabled if your data exclusively contains English alphabets. UTF-8 must be disabled if your data contains non-English alphabets. UTF-8 should be enabled by default in accordance with Salesforce.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FrwFhd63pr3jIt94nGKsK%2F4.png?alt=media&#x26;token=67f6c384-8a01-42ea-895d-b4f720ee88b8" alt=""><figcaption></figcaption></figure>

Click **OK** to complete the feature deployment process. You'll be redirected to the [Feature Deployment Summary](https://knowledgebase.autorabit.com/product-guides/arm/arm-features/ncino/feature-deployment/feature-deployment-summary) page, where you can view detailed deployment reports or re-deploy the nCino objects to your Salesforce Org once again.
