# Test UpdateIncidentInbound

To test our integration we will need some bonded tickets in the remote instance. If there aren't any already in place, then they'll need to be created.

## Create Test Incidents

In **native ServiceNow**, navigate to **Incident > Create New**.

The Incident fields to configure are as follows:

<table><thead><tr><th width="153.39651678791316">Field</th><th width="357.01318378876374">Description</th><th>Value</th></tr></thead><tbody><tr><td>Caller</td><td>Person who reported or is affected by this incident.</td><td>&#x3C;Your Caller></td></tr><tr><td>Short description</td><td>A brief description of the incident.</td><td>&#x3C;Your Short description></td></tr><tr><td>Description</td><td>Detailed explanation on the incident.</td><td>&#x3C;Your Description></td></tr></tbody></table>

{% hint style="info" %}
Though the CreateIncident Message has been configured to map more than just the Short Description & Description fields, we have only filled these fields because that is all whe have included in the payload of our Poller.
{% endhint %}

*Your Incident form should look like this:*

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQIWwVh2WQW0oEppw4%2FIMMPG%20-%20Test%20UpdateIncidentInbound%201.png?alt=media\&token=3dec6d7b-d3db-4d39-a93f-317d1f02c94a)

Note the Info Message confirming the CreateIncident Message is being sent to your Integration.

Note the Bond is 'Open' and both the Internal & External reference are in place.

{% hint style="success" %}
Repeat as necessary so that there are two or three bonded tickets in the remote instance:
{% endhint %}

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQKHd_kFdMD9Ajv5zr%2FIMMPG%20-%20Test%20UpdateIncidentInbound%202.png?alt=media\&token=cc3f7505-8f6b-439d-9dd2-201b2d8e3ee3)

## Update from Originating Instance

**Update one** of the **bonded tickets** in the **originating instance** to cause the UpdateIncident Message to fire:

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQLEwMNwy3hk9X-Rg1%2FIMMPG%20-%20Test%20UpdateIncidentInbound%203.png?alt=media\&token=afd60fcd-4689-42bd-b939-33c0959a6d65)

View the Transactions that have been sent.  This can be done either in Native ServiceNow, or in Unifi Operations Manager.

{% tabs %}
{% tab title="Native ServiceNow" %}
Navigate to **Unifi > Transport > Transactions**.

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQMUtdAUmI8OyWtG99%2FIMMPG%20-%20Test%20UpdateIncidentInbound%204.png?alt=media\&token=d0331641-b858-453a-9b39-9bcd205e9012)
{% endtab %}

{% tab title="Unifi Operations Manager" %}
Navigate to **Unifi > Unifi Operations Manager**.

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQO-aFmhRJvhTizg-d%2FIMMPG%20-%20Test%20UpdateIncidentInbound%205.png?alt=media\&token=f277d341-682d-4829-ba5c-cde717954675)
{% endtab %}
{% endtabs %}

{% hint style="success" %}
We can see that the three CreateIncident messages & one UpdateIncident message have been sent. All are Complete & Accepted & display the relevant Incident & Bond numbers.
{% endhint %}

Confirm the Transaction has updated the **bonded ticket** in the **remote instance**:

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQQJRdrOzYX1M6NtOL%2FIMMPG%20-%20Test%20UpdateIncidentInbound%206.png?alt=media\&token=dc20d97a-49c0-4ae1-b24c-543b694f54aa)

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQQNyHvy70IWvH9eKo%2FIMMPG%20-%20Test%20UpdateIncidentInbound%207.png?alt=media\&token=f1b29a47-3055-498a-9c88-1ad9d0ee14a6)

{% hint style="success" %}
We can see that the update has reached the bonded ticket (& that the correlation id matches the outbound Incident number)
{% endhint %}

## Poll for Updates

In **Unifi Integration Designer**, click on the **'Pollers' icon**. Navigate to & **open** **< Your Poller >** *(created earlier)*. Click **Execute Now**:

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQSmSTBmEdkw4I2IUf%2FIMMPG%20-%20Test%20UpdateIncidentInbound%208.png?alt=media\&token=7936f901-1c73-455f-9423-37b56db650cc)

In **native ServiceNow**, navigate to **Unifi > Polling > Poll Requests**. Click to **Open** & view the generated **Poll Request**. Confirm that no Incident was found (this is exactly as we expect because we are only polling for updates made by the remote instance):

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQV2-eMgaZ2HcqZeSU%2FIMMPG%20-%20Test%20UpdateIncidentInbound%209.png?alt=media\&token=55890874-af42-4d6e-92ed-cdc8d3c3f58e)

## Update from Remote Instance

in the **remote instance**, **update two** of the **bonded tickets** in turn.

{% hint style="info" %}
Updates have been made to the Description field only. Correlation ID is highlighted for us to identify the correct bonded ticket.
{% endhint %}

{% tabs %}
{% tab title="First Ticket" %}
![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQWsqHiquvhFP6Gw-2%2FIMMPG%20-%20Test%20UpdateIncidentInbound%2010.png?alt=media\&token=0842772a-6d98-473e-923e-6555dd6164f3)
{% endtab %}

{% tab title="Second Ticket" %}
![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQX1W2z13kDSBAfFNx%2FIMMPG%20-%20Test%20UpdateIncidentInbound%2011.png?alt=media\&token=80b30164-da5a-492a-be03-ea7ac6308844)
{% endtab %}
{% endtabs %}

## Poll for Updates

Back in the **originating instance**, navigate to & **open < Your Poller >**. Click **Execute Now**.

**Open** the **corresponding Poll Request** & **confirm** that **both Incidents** were **found** (and *only* those) and that the **Message name** was **UpdateIncidentInbound**:

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQZRKQXYMEKLeUnuVl%2FIMMPG%20-%20Test%20UpdateIncidentInbound%2012.png?alt=media\&token=981b83d5-1a4c-4425-a3af-05f716908197)

View the Transactions that have been sent.  This can be done either in Native ServiceNow, or in Unifi Operations Manager.

{% tabs %}
{% tab title="Native ServiceNow" %}
Navigate to **Unifi > Transport > Transactions**.

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQ_d9TsrYtF5FJd5N0%2FIMMPG%20-%20Test%20UpdateIncidentInbound%2013.png?alt=media\&token=e4010e72-2d91-47ba-8955-a45734ab0726)
{% endtab %}

{% tab title="Unifi Operations Manager" %}
Navigate to **Unifi > Unifi Operations Manager**.

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQ_mSjRR46pJCh___Q%2FIMMPG%20-%20Test%20UpdateIncidentInbound%2014.png?alt=media\&token=427cc138-5868-4082-a111-d2cf19e23b6d)
{% endtab %}
{% endtabs %}

{% hint style="success" %}
We can see that two UpdateIncidentInbound messages have been received. Both are Complete & Accepted & display the relevant Incident & Bond numbers.
{% endhint %}

Confirm the Transactions have updated the **bonded tickets** in the **originating instance**.

{% tabs %}
{% tab title="First Ticket" %}
![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQc0iat_DpHNFMKOja%2FIMMPG%20-%20Test%20UpdateIncidentInbound%2015.png?alt=media\&token=a5f4a32a-bcc3-467f-b6c0-8c366d666bfb)

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQc7Tnm1OvV1T4y8ur%2FIMMPG%20-%20Test%20UpdateIncidentInbound%2016.png?alt=media\&token=fee3fafd-ec90-43fa-a44c-c30c180d3fba)
{% endtab %}

{% tab title="Second Ticket" %}
![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQcHLSbu5JsU4dJVlO%2FIMMPG%20-%20Test%20UpdateIncidentInbound%2017.png?alt=media\&token=8670ede0-58b7-4b16-a1e2-5e613271fc4e)

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgQBKenOQOKiFHwZlVx%2F-MgQcN7IfFiH5bh8Qlrh%2FIMMPG%20-%20Test%20UpdateIncidentInbound%2018.png?alt=media\&token=3f5b246d-f005-42b3-acc9-3d3a73926152)
{% endtab %}
{% endtabs %}

## Challenge

For completeness, to prove we are only querying and pulling back data from bonded records, update an incident in the remote system which isn't bonded (Correlation ID is empty) & run the Poller again.

What do you expect to happen?

Next, we shall test the **ResolveIncidentInbound** Message.
