# Test Outbound Scenarios

We will create some bonded tickets in the remote instance - initially testing the outbound Message scenarios. Those bonded tickets will then also be available to test the inbound Message scenarios.

## Test CreateIncident

In **native ServiceNow**, 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>            |
| Short description | A brief description of the incident.                 | \<Your Short description> |
| 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:*

![](https://content.gitbook.com/content/77WwgPxoLSydiu2bJgNO/blobs/4E1vScVAnu9KV4bH9M9w/iapg-test-outbound-scenarios-1.png)

After you right-click & 'Save', 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 three bonded tickets in the remote instance:
{% endhint %}

![](https://content.gitbook.com/content/77WwgPxoLSydiu2bJgNO/blobs/c0dHGUpgk2acNjykNmur/iapg-test-outbound-scenarios-2.png)

## Test UpdateIncident

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

![](https://content.gitbook.com/content/77WwgPxoLSydiu2bJgNO/blobs/P0YHwtVvHFWK0iEOa88k/iapg-test-outbound-scenarios-3.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/77WwgPxoLSydiu2bJgNO/blobs/f6ma5g1uSa1ZfH40YUFy/iapg-test-outbound-scenarios-4.png)
{% endtab %}

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

![](https://content.gitbook.com/content/77WwgPxoLSydiu2bJgNO/blobs/YI8V1R9ohuQsv04T5vGT/iapg-test-outbound-scenarios-5.png)
{% 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://content.gitbook.com/content/77WwgPxoLSydiu2bJgNO/blobs/LoHe2ljkvuJklbyz5Fra/iapg-test-outbound-scenarios-6.png)

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

## Test ResolveIncident

**Resolve** the **same bonded ticket** in the **originating instance** to cause the ResolveIncident Message to fire:

![](https://content.gitbook.com/content/77WwgPxoLSydiu2bJgNO/blobs/pUBOzWNQI2uFrMob8YdM/iapg-test-outbound-scenarios-7.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/77WwgPxoLSydiu2bJgNO/blobs/MMvPqI9I9Us1nKS8ilsO/iapg-test-outbound-scenarios-8.png)
{% endtab %}

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

![](https://content.gitbook.com/content/77WwgPxoLSydiu2bJgNO/blobs/WP9WF7kjvCaWthAB4cfj/iapg-test-outbound-scenarios-9.png)
{% endtab %}
{% endtabs %}

{% hint style="success" %}
We can see that the ResolveIncident messages has been sent. It is Complete & Accepted & displays the relevant Incident & Bond numbers.
{% endhint %}

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

![](https://content.gitbook.com/content/77WwgPxoLSydiu2bJgNO/blobs/W0vVjtIKgNzjZUniGwNl/iapg-test-outbound-scenarios-10.png)

{% hint style="success" %}
We can see that the State, Resolution code & Resolution notes have been updated on the bonded ticket (& that the correlation id matches the outbound Incident number)
{% endhint %}

Navigate to the **Notes** tab to view the Activities stream:

![](https://content.gitbook.com/content/77WwgPxoLSydiu2bJgNO/blobs/X4XhuYq2ZGzykaPMPTqM/iapg-test-outbound-scenarios-11.png)

{% hint style="success" %}
We can see that the update has also been logged in the Activities stream.
{% endhint %}

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