# Deploying OmniStudio Components

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

OmniStudio integration with ARM allows you to retrieve and deploy OmniStudio metadata in the same way as Salesforce metadata and deploy OmniStudio components to the destination Salesforce org directly from ARM. Using the Deployment feature in ARM, you can quickly deploy components to your destination environment.&#x20;

### Before you begin <a href="#before-you-begin" id="before-you-begin"></a>

Before you proceed with the deployment, it is mandatory to configure your OmniStudio data pack type from the **My Account > OmniStudio Configuration Settings** section.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F1bELUtXymfm3G9BuGlnB%2Fimage.png?alt=media&#x26;token=5c98ea84-1f46-45fa-8aac-6e68b3f69943" alt=""><figcaption></figcaption></figure>

### Deploying OmniStudio Components <a href="#deploying-vlocity-components" id="deploying-vlocity-components"></a>

1. Login to your AutoRABIT account.
2. Click on **Create New > New Deployment** from the top navigation bar.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F2hr3O0TkzUVmuQZmSMu4%2Fimage.png?alt=media&#x26;token=db424402-721e-43d2-99f0-faad4a0e1939" alt="" width="299"><figcaption></figcaption></figure>

3. Give a **label** name for the deployment.
4. Choose **Deployment From** as **OmniStudio Components.**

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FrXxEf5dti1TF3HRWIbsX%2Fimage.png?alt=media&#x26;token=caf354fb-fb2d-4c9e-b976-6a44520bcc18" alt="" width="350"><figcaption></figcaption></figure>

5. Select the **Source Pack** from where the OmniStudio components data packs will be fetched. There are five options to choose from:

| Source Pack               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Pack from Salesforce Org  | <p>The OmniStudio components will be fetched from the source Salesforce org. You need to specify the destination org where the OmniStudio components will be deployed.</p><p><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FRjcF8EMlXP58Bc6wcEBR%2Fimage.png?alt=media&#x26;token=4ca79d7f-3611-400d-bd4d-313902a60417" alt="" data-size="original"></p><p><strong>Note:</strong> <em>Only those Salesforce orgs must be chosen under the source and the destination org fields in which the</em> OmniStudio <em>managed package is installed.</em><br></p>        |
| Pack from AutoRABIT Build | <p>The OmniStudio components will be fetched from the build number of the specified project, as shown below—only those built to be selected constructed on OmniStudioy components.<br><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FlekHuawNFVmoaf0ES4j9%2Fimage.png?alt=media&#x26;token=305dcbcb-2ec1-410c-b15b-be42fb3b571a" alt=""></p>                                                                                                                                                                                                                       |
| Pack from Version Control | <p>Select this option if you want to fetch the OmniStudio components from your source version control's data pack folder path. For the same, you need to fill in the details such as version control type (GIT, SVN, TFS), repository and its mapped branch, the data pack folder path, and the destination org where the OmniStudio components will be deployed.<br><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FCWnCMsk30WNNSa3XC3pT%2Fimage.png?alt=media&#x26;token=23d93828-27e3-4cf3-af18-80bac03d8f14" alt=""></p>                                        |
| Pack from Commit Label    | <p>This will allow you to fetch the OmniStudio components from the data pack folder path of the commit label and deploy them to the destination org. For the same, you need to fill in the details such as version control type (GIT, SVN, TFS), repository and its mapped branch, commit label, data pack folder path, and the destination org where the OmniStudio components will be deployed.</p><p><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FImCUEW7bCz6zrMfNNElz%2Fimage.png?alt=media&#x26;token=ff418428-b1e1-475e-aa02-1c4d704729a3" alt=""><br></p> |
| Pack from Release Label   | <p>Pack from Release Label will allow you to fetch the OmniStudio components from the data pack folder path of the release label and deploy them to your destination org.</p><p><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FzIn66aiz7EpJ0XOt9eTQ%2Fimage.png?alt=media&#x26;token=1d4b9fa9-2e01-4f3e-9b25-140e9ae7d5a1" alt=""><br></p>                                                                                                                                                                                                                         |

6. Choose the **metadata types**. The metadata types field allows you to deploy the entire Salesforce org, Full Profiles, or Permission Sets. *Full Profiles* will fetch all the profiles available in the selected Salesforce Org, and the *Full Permission Sets* will allow you to grant additional access to one or more users without changing or reassigning their profiles.
7. Enter your **target org**.
8. Based on the source pack selection, you will have different fields to fill in to proceed with the OmniStudio deployments.
9. Click on **Retrieve Metadata**.
10. Based on the above selection, the metadata components will be fetched and will get displayed on the next screen. Select the metadata and their corresponding members that will be deployed. Click **Deploy**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FR64Xy3xoVus6L73WpMDP%2Fimage.png?alt=media&#x26;token=a78384a1-f01a-4d7f-8c38-f21a303b778f" alt=""><figcaption></figcaption></figure>

11. On the **Deployment Settings** page, you will be presented with the below filters to use in the deployment:

    * **Pack Update:** This option will refresh the data packs settings to the version included in the project in the destination org. However, this is recommended only if you are on the latest major version of the OmniStudio managed package. For example, if some of the records that exist as part of the data pack data were not upserted into Salesforce, then it means that there is a mismatch between the configuration data in the target org compared to the source org, so by enabling **Pack Update** checkbox and perform deployment then this will update the data pack settings in the target org and will resolve the issue.
    * **Pack Retry**: Continues a Job retrying all errors to redeploy once again. ***For example***, if the job contains 10 data packs and where seven were successfully deployed since we enabled the **Pack Retry** option, then the three errors will be set back to redeploy again.

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FxLIAnZim90DYtinKSAu8%2Fimage.png?alt=media&#x26;token=c1123e26-e36e-497e-a373-99e8fc6bb445" alt="" width="563"><figcaption></figcaption></figure>
12. **Static Code Analysis (SCA)**: Choose the SCA tool to detect bugs, code smells, and security vulnerabilities before the deployment begins. SCA-Supported Metadata Types:
    * For **ApexPMD, Checkmarx, Salesforce Scanner,** and **SonarQube**: *Apex Classes, Apex Triggers, Apex Pages, AuraDefinitionBundle, LightningComponentBundle.*
    * For **Codescan**: *ApexClasses, ApexPages, ApexTriggers, AuraDefinitionBundle, CustomObjects, Flow, LightningComponentBundle, PermissionSets, Profiles, Settings, SharingRules, Workflows.*
13. You can stop the deployment if the SCA doesn't meet the global criteria. Go to **My Account >** [**Validation Criteria- Static Code Analysis**](https://knowledgebase.autorabit.com/~/revisions/MpxNH6lUh6Wr71fvOfA2/product-guides/arm/arm-administration/user-management/manage-users-account-settings) to set the global configuration for your SCA tool.
14. Also, you can select the recipients for the alert under the **"SCA Mail Notifications"** field. Multiple recipients can be added here.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FXektbzJ0zh9nh1u6UlQk%2Fimage.png?alt=media&#x26;token=74abb937-c103-43ec-9bc9-2d4bc71f420c" alt="" width="476"><figcaption></figcaption></figure>

15. Under **Deployment Notes**, specify the reason for the deployment and what has changed across your Salesforce org. This is optional too.
16. Click **OK**. The **Deployment Summary** page will be displayed, where you can view the components one final time before deploying them.
17. Finally, click on **Deploy**. You will now be redirected to the **Deployment History** screen, which will show you the progress of the deployment. We just included new functionality to the **ARM 22.3** version that allows users to terminate an ongoing OmniStudio deployment process or abort it if it becomes stuck. The **Deployment History** screen contains the **Abort** option, which allows you to terminate the deployment process.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F55shMB1zQ4oB0Rg1HOId%2Fimage.png?alt=media&#x26;token=12f351f7-745c-45c4-8153-20bd4cbd2fad" alt=""><figcaption></figcaption></figure>

18. The detailed report can be viewed on this page, such as total OmniStudio components successfully deployed, failed components (if any), code coverage details, etc. In addition to viewing the report, you can also download the OmniStudio components packs for the selected deployment.

{% hint style="info" %}
**Important Note:** **Redeploy** and **Rollback** are currently not supported for OmniStudio deployments.&#x20;
{% endhint %}

### Using Continuous Integration (CI) Job <a href="#using-continuous-integration-ci-job" id="using-continuous-integration-ci-job"></a>

1. Go to the **New CI Job** screen.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FAE9cBhzUUSvxSIhOauHd%2Fimage.png?alt=media&#x26;token=f3af7605-1ef1-46be-a88e-22b3b4f81b5e" alt=""><figcaption></figcaption></figure>

2. Select the **Deploy from the Version Control** tile.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fi6GvuSe6jAQWBT9tIq0z%2Fimage.png?alt=media&#x26;token=863b892d-6e4d-4c4a-b22e-4746d4905449" alt=""><figcaption></figcaption></figure>

3. Give the job a descriptive name in the **CI Job Name** field.
4. In the **Build** section, select your version control repository and branch.
5. Select the **OmniStudio Build** checkbox.
6. Enter the data packs folder path from where the components will get retrieved for the deployment.

   * **Pack Update:** This option will refresh the data packs settings to the version included in the project in the destination org. However, this is recommended only if you are on the latest major version of the OmniStudio managed package.
   * **Pack Retry**: Continues a Job retrying all errors to redeploy once again.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FuaAloOd3rT1LmYV1RuXu%2Fimage.png?alt=media&#x26;token=3a74bfb4-4d41-420b-b405-64c628465932" alt=""><figcaption></figcaption></figure>
7. Fill in the remaining fields as per your requirements and click on **Save**.
