> For the complete documentation index, see [llms.txt](https://docs.sharelogic.com/unifi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sharelogic.com/unifi/2.2/integration-guides/incident-parent-and-child-poller-guide/testing/test-updateincidentinbound.md).

# 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:

|  #  | Field             | Description                                          | Value                     |
| :-: | ----------------- | ---------------------------------------------------- | ------------------------- |
|  1  | Caller            | Person who reported or is affected by this incident. | \<Your Caller>            |
|  2  | Short description | A brief description of the incident.                 | \<Your Short description> |
|  3  | Description       | Detailed explanation on the incident.                | \<Your Description>       |

{% 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:*

![](/files/-MRRFDMyooM8KxBe2Nzb)

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

5\) 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 %}

![](/files/-MRRFgJ8j3sggKNVU-6h)

## Update from Originating Instance

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

![](/files/-MRRTHDYLpN6MALO2Yjs)

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

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

![](/files/-MRRTyTF5WOJT-el_-UV)
{% endtab %}

{% tab title="Unifi Operations Portal" %}
Navigate to **\[ws] Unifi > Unifi Operations Portal**.

![](/files/-MRRU93fDLxU9JvjdXYI)
{% 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**:

![](/files/-MRRUTrvZNLiRHJZYYbu)

![](/files/-MRRUXHOo4ohu872J5iM)

{% 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**:

![](/files/-MRRV19RhCClKjP7jnTx)

In **native ServiceNow**, navigate to **\[ws] 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):

![](/files/-MRRV7au1FVc3fgpczDo)

## 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" %}
![](/files/-MRRVrNCGlD1ZmAjFfsu)
{% endtab %}

{% tab title="Second Ticket" %}
![](/files/-MRRVy2-Aiffm0bTg0Lo)
{% 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**:

![](/files/-MRRW7cul0xY6kbV6rnn)

Notice the Parent & Child Poll Requests:

![](/files/-MRRWHwW672wJKeR-lNm)

**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 the Unifi Operations Portal.

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

![](/files/-MRRX-T6xtreE3-QEim9)
{% endtab %}

{% tab title="Unifi Operations Portal" %}
Navigate to **\[ws] Unifi > Unifi Operations Portal**.

![](/files/-MRRXBhB2B5dhvwB6vK1)
{% 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" %}
![](/files/-MRRXZbwip5G_LVVkWJI)

![](/files/-MRRXcQiv6yraUazmt_T)
{% endtab %}

{% tab title="Second Ticket" %}
![](/files/-MRRYD7R4Hl-5Vs99jN3)

![](/files/-MRRYH_w7W_Ufij5UgF0)
{% 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.
