# Test ResolveIncident

## Resolve The Incident

Navigate to **< Your Incident >** created in the earlier test.

Update the Incident record as follows:

| Field            | Description                    | Value                    |
| ---------------- | ------------------------------ | ------------------------ |
| State            | The Incident lifecycle state.  | 'Resolved'               |
| Resolution code  | The Incident resolution code.  | \<Your Resolution code>  |
| Resolution notes | The Incident resolution notes. | \<Your Resolution notes> |

*Your Incident record should look like this:*

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/t5YPyfa2yC4NUiV5lRgM/obig-test-resolveincident-1.png)

Right-click & **Save**.

*You should see an Info Message, confirming the ResolveIncident Message is being sent to your Integration:*

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/fTw9zHDvpUpr929Ft9yF/obig-test-resolveincident-2.png)

*The Activities stream is updated with the details:*

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/BKV5NHR8crJDi0VkGbT0/obig-test-resolveincident-3.png)

## View the Bond

Click through to the **Bond** record from the related list on the Incident.

*Your Bond record should have been updated as follows:*

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/lzw7ppBhivgsci1Rpp53/obig-test-resolveincident-4.png)

Transaction:

* Message: 'Resolveincident'
* Direction: 'Outbound'
* Transaction state: 'Complete' *(The data has been successfully transported)*
* Process state: 'Accepted' *(The transaction was accepted as within the scope of the business logic that's in place)*

## View the Transaction

Click through to the **Transaction** record from the related list on the Bond.

*Your Transaction record should look like this:*

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/vuHqJl7H685CHlaybIqC/obig-test-resolveincident-5.png)

Transaction details:

* Table: 'Incident \[incident]'
* Document: < Your Incident >
* Integration: < Your Integration >
* Connection: < Your Connection >
* Bond: < Your Bond >
* Message: 'ResolveIncident'
* Direction: 'Outbound'
* Transaction state: 'Complete' *(The data has been successfully transported)*
* Process state: 'Accepted' *(The transaction was accepted as within the scope of the business logic that's in place)*

Errors:

* Error: *(If there was a transactional error the Transaction state would show as 'Error' and the details would be captured here).*
* Process error: *(If there was a process error the Process state would show as 'Rejected' and the details would be captured here)*

Stage:

* Direction: 'Outbound'
* Message: 'ResolveIncident'
* Internal reference: < ServiceNow ticket reference > *(Same as 'Document')*
* External reference: < External system's ticket reference >

## View the Stage

Click through to the **Stage** record from the related list on the Transaction.

Check the values in the fields match what you expect.

*Your Stage record should look like this:*

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/dXvc7uq3P5xAsRbdSKjY/obig-test-resolveincident-6.png)

Stage details:

* Direction: 'Outbound'
* External reference: < External system's ticket reference >
* Internal reference: < ServiceNow ticket reference >
* Snapshot: < Snapshot record reference >
* Message: 'ResolveIncident'
* Transaction: < Your Transaction >
* Integration: < Your Integration >

Mapped Staged Data fields:

* close\_code: < Your Resolution code >
* close\_notes: < Your Resolution notes >
* state: '6'

## View the HTTP Request

Click through to the **HTTP Request** record from the related list on the Transaction.

*Your HTTP Request record should look like this:*

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/mtZCwyo98Oi18xAFLyBU/obig-test-resolveincident-7.png)

HTTP Request details:

* Integration: < Your Integration >
* Connection: < Your Connection >
* Transaction: < Your Transaction >
* Message: 'ResolveIncident'
* Direction: 'Outbound'
* Request state: 'OK' *(There are no errors with the HTTP Request.)*
* Attempt number: < Number of HTTP Request attempts > *(Failed requests are retried up to the maximum attempts number as configured on the Integration.)*
* Endpoint URL: < The external system’s access URL >
* Action Method: 'PUT'
* Request headers: < The header of the request being sent >
* Request payload: < The payload of the request being sent >

Response details:

* Status code: '200'
* Response headers: < The header of the response being received >
* Response payload: < The payload of the response being received >

## Compare with the External System's Incident

Navigate to the corresponding **Incident** in the **external system**.

Check the values in the fields match those you noted when you saved the Incident in the internal system.

*Your external system's Incident record should look like this (depending on the system you're integrating with, your record may look different; the important matter is that the values match):*

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/yHyCB9immjm6ma8t4dnh/obig-test-resolveincident-8.png)

State: 'Resolved'

Activities: < Your Resolution code/notes & State > *(added by < your.external.system.user >)*

Navigate to the **Resolution Information** tab.

*Your Resolution Information tab should look like this:*

![](https://content.gitbook.com/content/fbSELbHwB4GcLuDcZMCU/blobs/ijY8006E5KHjD5419tBm/obig-test-resolveincident-9.png)

Resolution code: < Your Resolution code >

Resolution notes: < Your Resolution notes >

So far, when configuring our scenarios we have built the Message Scripts for each Message individually. Let's now see how we can run the **Build** process at the **Integration level**.
