# ServiceNow – Azure DevOps Services (VSTS) Integration

## Overview

Best of breed tools such as ServiceNow and Azure DevOps Services (VSTS) bring richness to the enterprise ecosystem. The integration of ServiceNow with Azure DevOps Services (VSTS) enhances collaboration between the customer service and development teams. This, in turn, helps resolve the customer issues faster and gives visibility to both teams into customer priorities. There is no manual effort required from either of the teams to keep each other updated on the latest work status or customer expectations.\ <code class="expression">space.vars.SITENAME</code> integrates ServiceNow and Azure DevOps Services (VSTS) bi-directionally. On this page, we will discuss the bi-directional integration of:

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-366d2450fbb1f4a0e74486381ba3a201ba2992aa%2FServiceNow-Azure_DevOps_Services_entities.png?alt=media" alt="" width="1100"></div>

## System Prerequisites

Configuring [system pre-requisites](https://docs.opshub.com/v7.215/integrate/integration-prerequisites) is mandatory for successful system configuration. Check out the pre-requisites for [ServiceNow](https://docs.opshub.com/v7.215/connectors/servicenow#prerequisites) and [Azure DevOps Services (VSTS)](https://docs.opshub.com/v7.215/connectors/azure-devops#prerequisites) systems before you proceed with the integration.

## Integration Configuration

* Log in into <code class="expression">space.vars.SITENAME</code>. The default credentials are: User Name: admin, Password: password.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-d7aeab072a12cb43c865cb1bc4aa81bf1b7c1e18%2FGetting_Started_With_Application_Image_1G_a.png?alt=media" alt="" width="700"></div>

> **Note**: Proxy parameters: Before you proceed with the configuration, check whether the system is behind a proxy server. If yes, then set up [proxy parameters](https://docs.opshub.com/v7.215/manage/administrator/proxy-setting) in <code class="expression">space.vars.SITENAME</code>.

* Click **Integrate** on the top right corner of the screen and then click the plus \[+] icon.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-b19d9fe7e591bbe5ca2605f5c79e6969cfc7cb5b%2FOverview_of_Integration_Image%201D.png?alt=media" alt="" width="1100"></div>

* The integration configuration page opens:
* Enter a unique name for the integration. For example, this integration is named **ServiceNow – Azure DevOps Services (VSTS) Integration**.
* Click the plus \[+] icon adjacent to the System 1 and System 2 fields one by one to configure ServiceNow and Azure DevOps Services (VSTS).

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-92ffe04c05df7ee2ab50e6936b9f85917e3dbb97%2FSNT_1.png?alt=media" alt="" width="1100"></div>

### Configure System(s)

* Once you have fulfilled all the prerequisites and are done with the above-mentioned check, configure ServiceNow and Azure DevOps Services (VSTS) by following the steps given on [ServiceNow system configuration](https://docs.opshub.com/v7.215/connectors/servicenow#system-configuration) and [Azure DevOps Services (VSTS) system configuration](https://docs.opshub.com/v7.215/connectors/azure-devops#system-configuration) pages respectively.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-abb0f707d4aeefebfa1f2ce682147f17383c3e63%2FSNT_2.png?alt=media" alt="" width="1100"></div>

* When you save the respective system configuration pages after configuring the systems, the systems will automatically be added to the integration. Proceed to adding projects and entities in the integration.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-ed1209e1e9927ebf92ec67228bb690368e60e855%2FSNT_3.png?alt=media" alt="" width="1100"></div>

### Select Projects and Entities

> **Note**: If you receive the following error: **PKIX certification path not found** and the projects and entities don’t load properly, then [import SSL certificate](https://docs.opshub.com/v7.215/getting-started/installation/ssl-certificate-configuration) onto <code class="expression">space.vars.SITENAME</code>’s Java KeyStore before you proceed.

* In the **Add Project(s) to Sync** section, select the projects you want to synchronize between Azure DevOps Server (TFS) and Micro Focus ALM by clicking them. For example, here we select **Demo Project** from Azure DevOps Server (TFS) and **Demo Project** from Micro Focus ALM.
* Once the projects are selected, define the source project and target project:
  * Forward arrow (>) → data flows from ServiceNow to Azure DevOps Services (VSTS)
  * Backward arrow (<) → data flows from Azure DevOps Services (VSTS) to ServiceNow
  * Bi-directional arrow (<-->) → bi-directional data flow
* Once the direction is selected, the arrows will turn grey. We have selected bi-directional flow.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-6597aef8b07f55934b5453282d81fe7e98263c9e%2FSNT_4.png?alt=media" alt="" width="1100"></div>

* <code class="expression">space.vars.SITENAME</code> fetches entities available in both systems and shows them in the entities list. From the **Select Entities to Sync** section, select the relevant entities for both systems. Here we select **Feature** from Azure DevOps Server (TFS) and **Requirement** from Micro Focus ALM.
* Define the fields that need to be integrated for every entity mapped. Click the plus \[+] icon adjacent to **Select fields to be Synced** to create the mapping between these entities. You will be navigated to Mapping Configuration screen.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-3b78f671804e55f67ef6950588c99c3c5555033c%2FSNT_5.png?alt=media" alt="" width="1100"></div>

### Mapping Fields

#### Entity: Enhancement and Feature

* Details automatically populated: **Systems, Projects, Entities, and Mapping Name**. Change the name in the Name field if desired.
* Click **Create from Scratch** to define mapping manually or **Auto Map** to map all fields with the same name. Even if you select **Auto Map**, <code class="expression">space.vars.SITENAME</code> allows adding/removing fields before saving. We select **Create from Scratch**.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-827f0e807b6ad77d0a5c6bc8fcb01f2e213a634b%2FSNT_6.png?alt=media" alt="" width="1100"></div>

**Mapping Mandatory Fields**

* From the **All fields** drop-down list, select **Mandatory fields**.
* APIs of ServiceNow and Azure DevOps Services (VSTS) do not allow mandatory fields to be called, so search mandatory fields from the systems’ UI and map them.

> **Note**: For ServiceNow, a field is writable only if it is part of import set.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-cdea7401105c0f3c3b6a0b9eceb072b5029fef6e%2FSNT_7.png?alt=media" alt="" width="1100"></div>

**Mapping Look-up Type Fields**

* After mapping mandatory fields, map Look-up type fields (multi-valued). For example:
  * **Priority → Priority**
  * **Status → Status**
* Look-up fields are marked with ![Icon](https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-e738613e7434e09ede58bd9212168a30936bfe5c%2FI_9.png?alt=media). Click the icon to map values.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-d8a67528e5e0254e85ae8d2fcf1253825b198946%2FSNT_8.png?alt=media" alt="" width="1100"></div>

* Map the values for all Look-up type fields. Example for Priority:
  * 1 – Critical – 1
  * 2 – High – 2
  * 3 – Moderate – 3
  * 4 – Low – 4

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-2bbba9b832f821f0bc1414236bbe0770df79a8b4%2FSNT_9.png?alt=media" alt="" width="1100"></div>

* Default Mapping: set default value if no value comes from source. For user mapping, default should be user name/email expected by target.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-4cfde00967e2656f6e78cffcd85a70c64ba11dc2%2FDf_mapping.png?alt=media" alt="" width="1100"></div>

**Mapping Rich Text Fields**

* Rich-text fields provide editing tools. Example: map **Description** in ServiceNow to **Title** in Azure DevOps.
* Click **Create Mapping** to save.
* After saving, you are redirected to the Integration page.
* If no more entities, save the integration and activate it.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-be8bc506a4fe8fe234ec1eab9afad1ec0619765b%2FSNT_11.png?alt=media" alt="" width="1100"></div>

#### Entity: Problem and Bug

* Select **Problem** from ServiceNow and **Bug** from Azure DevOps. Create mapping.
* Click adjacent field icon to **Select fields to be Synced**. You will navigate to Mapping Configuration screen.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-ebd2a275b78baf3d92e57c8e6447017c3dda037a%2FSNT_12.png?alt=media" alt="" width="1100"></div>

* Save mapping by clicking **Create Mapping**.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-8f23bc83f025b3fcd249c5e90984937b8bf6bdda%2FSNT_13.png?alt=media" alt="" width="1100"></div>

### Comments and Attachments Mapping

* Map entities like comments and attachments. Refer to [Comments](https://docs.opshub.com/v7.215/integrate/configure-integrations/mapping-configuration#comments) and [Attachments](https://docs.opshub.com/v7.215/integrate/configure-integrations/mapping-configuration#attachments) for details.

### Configure Filter(s) (Optional)

* Criteria Filter helps integrate a subset of entities. Example: only high priority bugs or closed tickets.
* Filter can be applied forward (ServiceNow → Azure DevOps) or backward (Azure DevOps → ServiceNow).

> **Note**: Not mandatory; skip if no filter is needed.

* To specify conditions, use Criteria Configuration. Example: synchronize only Low Priority Bugs.
* Click configuration-criteria icon, select **Yes** in **Configure Criteria**, enter criteria query.

> **Note**: Queries vary by system. See [ServiceNow Criteria Configuration](https://docs.opshub.com/v7.215/connectors/servicenow#criteria-configuration) and [Azure DevOps Criteria Configuration](https://docs.opshub.com/v7.215/connectors/azure-devops#criteria-configuration).

* Select **In Database** from **Select criteria storage type** drop-down.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-22efac6233695858066bd04e09ded5ac25be2a00%2FSNT_14.png?alt=media" alt="" width="1100"></div>

### Save and Activate Integration

* Slide **Activate Integration** button to the right.
* Click **Save** to save integration.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-6619c87818a3534a38b96abfe9a1025881c1357c%2FSNT_15.png?alt=media" alt="" width="1100"></div>

* Integration is created. A pop-up confirms successful configuration. Integration will appear in the integrations list.

### Test the Integration

* Test synchronization between ServiceNow and Azure DevOps Services (VSTS) projects.

> **Note**: Do not use integration user credentials to create entities.

* Create/Update events in source system and check synchronization. Wait one minute. For issues, refer to General.

### Additional Configurations

#### Mapping User Fields

* Choose mapping for additional configuration. Example: ServiceNow \[Problem] – Azure DevOps \[Bug].
* Map user fields like **Assigned to** in both systems. Other fields can be selected.

> **Note**: User fields are mapped by email. If emails differ, update [one-to-one XSL](https://docs.opshub.com/v7.215/integrate/configure-integrations/mapping-configuration#value-mapping-using-excel-sheet) for user mapping.

<div align="center"><img src="https://818964384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK5eA7qMDBFu0HHHMDehi%2Fuploads%2Fgit-blob-274d2f449804f2664cd50cbcba84f73c35f7170d%2FSNT_16.png?alt=media" alt="" width="1100"></div>

* After additional configuration, update mapping, activate integration, and save again.
