# Connection

## Integration User

Before we configure our Connection, we need to ensure we have a user in the instance to use as the Inbound user for our Integration. To configure our Integration user:

In the **native ServiceNow** window, navigate to **User Administration > Users**. Click **New**.

The fields to be configured for the User record are as follows:

|  #  | Field      | Description                                                                | Value                     |
| :-: | ---------- | -------------------------------------------------------------------------- | ------------------------- |
|  1  | User ID    | The id of the user (to be used by the external system for authentication). | \<your.integration\_user> |
|  2  | First name | The integration user's first name.                                         | \<Your First Name>        |
|  3  | Last name  | The integration user's last name.                                          | \<Your Last Name>         |
|  4  | Password   | The user's password (to be used in basic authentication).                  | \<Your Password>          |
|  5  | Roles      | The role required for access to the integrated records.                    | 'itil'                    |

*Your User record should look like this:*

![](https://796541950-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MQxfgO8mw1gUB1Ab5bb%2F-MR-FkAf56F3eA7ARF3Q%2FV2%20-%20Connection%201.png?alt=media\&token=3afcedd7-c820-4397-a0d7-a83cc1bd0b00)

## Connection

{% hint style="info" %}
You can set up many connections to enable switching between environments (one connection per environment). However, only one connection can be active for an Integration at a time.
{% endhint %}

{% hint style="warning" %}
**Remember**: When setting up a Connection:

* Make sure your SOAP and/or REST endpoints are unique.
* Never use your own User as the Inbound User as it will prevent the integration from working.
* Always ensure that your Inbound User is NOT used by anyone else for the same Process i.e. if you’re creating a Connection for an Integration on the Incident Process, your Inbound User has to be the only User used by an Integration within that Process.
  {% endhint %}

{% hint style="success" %}
We are going to configure a Connection for the Development environment.
{% endhint %}

Back in the **Unifi Integration Designer** window, click on the **'Connections' icon**, then click **New**.

The fields to be configured for the New Connection modal are as follows:

|  #  | Field        | Description                                        | Value                           |
| :-: | ------------ | -------------------------------------------------- | ------------------------------- |
|  6  | Environment  | The environment this connection applies to.        | 'Development'                   |
|  7  | Endpoint URL | The external system's access URL.                  | \<External system Endpoint URL> |
|  8  | Active       | Use this connection for the integration when true. | \<true>                         |

## Outbound Connectivity

The format of the Endpoint URL is as follows:&#x20;

`https://<your_instance>.service-now.com/<your_resource_path>`

*Your New Connection modal should look like this:*

![](https://796541950-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MQxfgO8mw1gUB1Ab5bb%2F-MR-Gwm-Eq9TWvrUYf07%2FV2%20-%20Connection%202.png?alt=media\&token=e41abf6f-73b7-4b29-b10d-4e2634154e7f)

9\) Click **Submit and view**.

{% hint style="info" %}
Clicking 'Submit' will redirect you to the list view of the record you're creating. Clicking 'Submit and view' will redirect you to the newly created record.
{% endhint %}

## Connection Details

The fields to be configured for the Details form are as follows:

|  #  | Field          | Description                                                                                                                      | Value                            |
| :-: | -------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
|  10 | Authentication | The authentication method to use for this connection.                                                                            | 'Basic'                          |
|  11 | User           | The username used in basic authentication.                                                                                       | \<external.system.user>          |
|  12 | Password       | The password used in basic authentication.                                                                                       | \<External system user password> |
|  13 | Inbound user   | The user profile used by the external system for authentication. An active connection must be found for the user to gain access. | \<lookup: Your Inbound User>     |

*Your Details form should look like this:*

![](https://796541950-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MQxfgO8mw1gUB1Ab5bb%2F-MR-Hg31aqfuugf2aXee%2FV2%20-%20Connection%203.png?alt=media\&token=e87db799-2b58-43a4-b8d2-7a0423a9afe6)

{% hint style="success" %}
**Feature Alert**: The widget at the bottom of the page now shows the Integration as Active.
{% endhint %}

{% hint style="info" %}
For this Development environment Connection, we have set the Endpoint URL to point to our own instance and used the same Integration User for both Inbound and Outbound *(as created above)*. Being able to connect to our own instance makes it simple and efficient to test our integration *(seeing Transactions going out and coming in)* before we connect to the external system.
{% endhint %}

14\) **Save** the Connection.

We are now ready to step back into the **native ServiceNow** window to configure the **Trigger**.
