# 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="176.1071532870237">Field</th><th width="278.6739150806333">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-MgoXUl_Jc9X6rnLEWzi%2F-MgocTF28AHFCTfyx3qO%2FIPCPG%20-%20Test%20UpdateIncidentInbound%201.png?alt=media\&token=7c18f005-75a8-4f49-928c-cae5d8f307c1)

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-MgoXUl_Jc9X6rnLEWzi%2F-MgofXPJNUSCoNHkoti8%2FIPCPG%20-%20Test%20UpdateIncidentInbound%202.png?alt=media\&token=d6fadeaf-666f-497e-883c-f6714d552c0c)

## 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-MgoXUl_Jc9X6rnLEWzi%2F-Mgog99Vi8iVmsJ35Ta7%2FIPCPG%20-%20Test%20UpdateIncidentInbound%203.png?alt=media\&token=bd9a92f5-d1ad-4c6b-a5ef-ee9e478af876)

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-MgoXUl_Jc9X6rnLEWzi%2F-MgogvChNhPEFMoo37Wu%2FIPCPG%20-%20Test%20UpdateIncidentInbound%204.png?alt=media\&token=13b21f7e-1f27-4ec5-bcac-e9182ee4bdef)
{% 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-MgoXUl_Jc9X6rnLEWzi%2F-MgohYXB_ZgjiOADE1AZ%2FIPCPG%20-%20Test%20UpdateIncidentInbound%205.png?alt=media\&token=dabea15f-51d9-486c-813e-3cb59d088ade)
{% 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-MgoXUl_Jc9X6rnLEWzi%2F-Mgoihh0u9HLCQfzMg7Z%2FIPCPG%20-%20Test%20UpdateIncidentInbound%206.png?alt=media\&token=047d9e90-1257-43c7-b127-2ff7a0dffdd7)

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgoXUl_Jc9X6rnLEWzi%2F-Mgoj4gXLUF13TwjMc2z%2FIPCPG%20-%20Test%20UpdateIncidentInbound%207.png?alt=media\&token=abfb365e-4292-49b7-8ee7-1d069fe2324d)

{% 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 Parent Poller >** *(created earlier)*.

Click **Execute Now**:

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgoXUl_Jc9X6rnLEWzi%2F-MgolGmoXpEMf8ay_GEd%2FIPCPG%20-%20Test%20UpdateIncidentInbound%208.png?alt=media\&token=5347586d-baf4-4c23-b1a3-6fede8c29231)

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-MgoXUl_Jc9X6rnLEWzi%2F-MgomXfbYQuBYppXKoFB%2FIPCPG%20-%20Test%20UpdateIncidentInbound%209.png?alt=media\&token=2adb2c93-dabe-47ba-905c-8e5a67c95efc)

## 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-MgoXUl_Jc9X6rnLEWzi%2F-Mgoos9duJzo_BV82TBl%2FIPCPG%20-%20Test%20UpdateIncidentInbound%2010.png?alt=media\&token=b0b6eac9-eda8-4ece-9094-c9fd03ff35f5)
{% endtab %}

{% tab title="Second Ticket" %}
![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgoXUl_Jc9X6rnLEWzi%2F-MgopM2RCkGMzq9R7nTt%2FIPCPG%20-%20Test%20UpdateIncidentInbound%2011.png?alt=media\&token=f5afce5d-c85d-4a42-9501-689f4c10c57f)
{% endtab %}
{% endtabs %}

## Poll for Updates

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

**Open** the **corresponding Parent Poll Request** & **confirm** that **both Incidents** were **found** (and *only* those) and that **subsequent child Poll Requests** were also **triggered**:

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgoXUl_Jc9X6rnLEWzi%2F-MgorUgQGiwyTQlImQnS%2FIPCPG%20-%20Test%20UpdateIncidentInbound%2012.png?alt=media\&token=1dd71295-4d03-402f-a3d1-cdae4f20258b)

Notice the Parent & Child Poll Requests:

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgoXUl_Jc9X6rnLEWzi%2F-Mgos96xufASsPcQNXQn%2FIPCPG%20-%20Test%20UpdateIncidentInbound%2013.png?alt=media\&token=abbb105b-12ee-4c59-b743-0058d7578b2f)

**Open** each of the **corresponding Child Poll Requests** & **confirm** that the **Message name** was **UpdateIncidentInbound**.

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-MgoXUl_Jc9X6rnLEWzi%2F-Mgot9xawxTom0cKgo_s%2FIPCPG%20-%20Test%20UpdateIncidentInbound%2014.png?alt=media\&token=1ef4f230-bd85-4d94-89d8-600c89dcaee9)
{% 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-MgoXUl_Jc9X6rnLEWzi%2F-MgotNRKgpVjlpQZxYjH%2FIPCPG%20-%20Test%20UpdateIncidentInbound%2015.png?alt=media\&token=a9263b66-2ba0-41eb-a052-dbbd9cf8c4fc)
{% 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-MgoXUl_Jc9X6rnLEWzi%2F-MgoujGlttILqta7FoKE%2FIPCPG%20-%20Test%20UpdateIncidentInbound%2016.png?alt=media\&token=247aaa8f-9ff6-4f73-83b9-5906f59d4489)

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgoXUl_Jc9X6rnLEWzi%2F-MgovjUMdwfuCvZURD4Q%2FIPCPG%20-%20Test%20UpdateIncidentInbound%2017.png?alt=media\&token=f75f98de-06c2-4e14-b36a-1e33292b800a)
{% endtab %}

{% tab title="Second Ticket" %}
![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgoXUl_Jc9X6rnLEWzi%2F-MgoxBDToLAxbunOrBQR%2FIPCPG%20-%20Test%20UpdateIncidentInbound%2018.png?alt=media\&token=ab8b422e-f3ce-4dd4-b217-5d0aa75f493e)

![](https://605238050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MgoXUl_Jc9X6rnLEWzi%2F-MgoxhdlMAATArW563mW%2FIPCPG%20-%20Test%20UpdateIncidentInbound%2019.png?alt=media\&token=80fb68b1-97e5-4c04-88a7-2af812d237e8)
{% 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.
