# Test CreateIncidentInbound

## Create Test Incident

In **your PDI**, navigate to **Incident > Create New**.

The Incident fields to configure are as follows:

| Field              | Description                                                   | Value                       |
| ------------------ | ------------------------------------------------------------- | --------------------------- |
| Caller             | Person who reported or is affected by this incident.          | \<Your Caller>              |
| Impact             | Measure of the business criticality of the affected service.  | \<Your Impact>              |
| Urgency            | The extent to which resolution of an incident can bear delay. | \<Your Urgency>             |
| Assignment group\* | The group to which the ticket is assigned.                    | \_<\_Your Assignment group> |
| Short description  | A brief description of the incident.                          | \<Your Short description>   |
| Description        | Detailed explanation on the incident.                         | \<Your Description>         |

{% hint style="info" %}
*\*Assignment group: This should be the group you created in your PDI to enable Unifi to identify which newly created, non-bonded tickets to poll and whose sys id was stored in a connection variable and passed into the Setup Script of the Poll Processor.*
{% endhint %}

*Your Incident form should look like this:*

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/GO8ib937jOrTHR8TBXx0/iapg-test-createincidentinbound-1.png)

{% hint style="success" %}
Note the values entered (including State), so that you can check them against the mapped fields on the corresponding record in the instance being integrated to.
{% endhint %}

You should now have a non-bonded ticket in the remote instance *(assigned to \<Your Assignment group>)*:

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/BUoSGQeym78dNcyevUKH/iapg-test-createincidentinbound-2.png)

## Poll for Creates

In **Unifi Integration Designer**, click on the **'Pollers' icon**. Navigate to & **open** **< Your Create Poller >** *(created on the* [*'Poller' page of the Incident Create Poller Guide*](https://docs.sharelogic.com/unifi/incident-create-poller-guide/polling/poller#new-poller)*)*. & click **Execute Now**:

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/fcfYHmH8FB0rSEhMHPJ8/iapg-test-createincidentinbound-3.png)

In **native ServiceNow**, navigate to **Unifi > Polling > Poll Requests**. Click to **Open** & view the generated **Poll Request**. Confirm that only the one Incident was found (this is exactly as we expect because we are only polling for Incidents assigned to a specific Assignment group):

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/IxsGOEnXPMXIO2J8HkZ7/iapg-test-createincidentinbound-4.png)

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://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/TFo2KOEUlsmocfyKRqxh/iapg-test-createincidentinbound-5.png)
{% endtab %}

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

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/75nDnavhdyo3abYtQ3rl/iapg-test-createincidentinbound-6.png)
{% endtab %}
{% endtabs %}

{% hint style="success" %}
We can see the CreateIncidentInbound message has been received. It is Complete & Accepted and displays the relevant Incident & Bond numbers.
{% endhint %}

Confirm the following:

The Transaction has created the **bonded ticket** in **this instance**.

*Your new Incident should look like this:*

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/G8gRRme7R5SxzkeCSUwz/iapg-test-createincidentinbound-7.png)

{% hint style="info" %}
The calller\_id was populated with the default value `gs.getUserID()` because the table API was returning display\_value instead of value. If the Create Poller was active and running then the caller\_id would be the Integration User. Because the Create Poller was manually executed whilst inactive, then the value is the user who executed the poll.
{% endhint %}

The Transaction has updated the **bonded ticket** in the **remote instance (your PDI)** *(with the correlation id)*.

*Your originating Incident should look like this:*

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/pb9fkfElPLuPbuYg5qbI/iapg-test-createincidentinbound-8.png)

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