Test CreateIncident
We will test our CreateIncident Message.
Create an Incident
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> |
State* | The Incident lifecycle state. | 'New' - Default (Automatically populated) |
Short description* | A brief description of the incident. | <Your Short description> |
*Note: We have chosen these fields as these were the ones we mapped when creating our Field records for the CreateIncident Message. Your choices may differ depending on which Field records you created.
Your Incident form should look like this:
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2F2763208740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZR0dkdEH0Mm7amiIzsdG%252Fuploads%252Fq7ufclcEkoXTwbJAjx1T%252Fobig-test-createincident-1.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=62c7b1d1&sv=1)
Right-click & Save.
Note the values entered (including State & Priority), so that you can check them against the mapped fields on the corresponding record in the instance being integrated to.
You should see an Info Message, confirming the CreateIncident Message is being sent to your Integration:
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2F2763208740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZR0dkdEH0Mm7amiIzsdG%252Fuploads%252FJpf1jAjuMw6CHeaM2ZzP%252Fobig-test-createincident-2.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=e7cc7c28&sv=1)
You should also see a note in the Activities stream:
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2F2763208740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZR0dkdEH0Mm7amiIzsdG%252Fuploads%252FGzXwGl0SLn1iXHzbxEZM%252Fobig-test-createincident-3.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=d3952166&sv=1)
When you scroll down to the 'Unifi Integrations' related list (you may have to configure the related lists to add it to your Incident form), notice:
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2F2763208740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZR0dkdEH0Mm7amiIzsdG%252Fuploads%252Fg97E1dftVyYj6WLQSHD5%252Fobig-test-createincident-4.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=5501cf84&sv=1)
A Bond has been created. The State remains 'Pending' until the list is refreshed.
Refresh the list by clicking Bonds.
You should see the External reference populated & the State changed to 'Open':
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2F2763208740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZR0dkdEH0Mm7amiIzsdG%252Fuploads%252FtD9fO0eQjgAjV89PLZaD%252Fobig-test-createincident-5.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=eecf7f2a&sv=1)
We are using a sys_id for the External reference in our example because we are integrating with the table API. If possible, it is better to use something more meaningful, like the Number of the ticket integrated with, as this aids in debugging.
Click the Bond Number link to open the Bond record.
View the Bond
Your Bond record should look like this:
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2F2763208740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZR0dkdEH0Mm7amiIzsdG%252Fuploads%252FuTbjRp493FtwgJSqKvsv%252Fobig-test-createincident-6.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=a205ddc2&sv=1)
Bond details:
Integration: < Your Integration >
Connection: < Your Connection >
Table: 'Incident [incident]'
Document: < Your Incident >
State: 'Open' (Message exchange is available)
Status: 'OK' (All transactions have completed)
Internal reference: < ServiceNow ticket reference > (Same as 'Document')
External reference: < External system's ticket reference >
Transaction:
Message: 'Createincident'
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)
You are able to view the logs in the 'Unifi Activity Logs' related list.
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2F2763208740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZR0dkdEH0Mm7amiIzsdG%252Fuploads%252F2iLOsQRgoeod1tMqWfDN%252Fobig-test-createincident-7.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=abaaba2e&sv=1)
Transaction process next queued: Logs from checking whether there are any other transactions queued and processing those.
Transaction sending: Logs from taking the Stage data, building the Request record & sending the Request to the integrated system.
Business rule: < Your Trigger >: Logs from the Business Rule that triggers Unifi.
View the Transaction
Click through to the Transaction record from the related list on the Bond.
Your Transaction record should look like this:
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2F2763208740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZR0dkdEH0Mm7amiIzsdG%252Fuploads%252FgZuUINosDIrgNzz6XPj5%252Fobig-test-createincident-8.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=be85b76&sv=1)
Transaction details:
Table: 'Incident [incident]'
Document: < Your Incident >
Integration: < Your Integration >
Connection: < Your Connection >
Bond: < Your Bond >
Message: 'CreateIncident'
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: 'CreateIncident'
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://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2F2763208740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZR0dkdEH0Mm7amiIzsdG%252Fuploads%252FBDYFt79NfXj7z4ryeFw7%252Fobig-test-createincident-9.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=e7390c3c&sv=1)
Stage details:
Direction: 'Outbound'
External reference: < External system's ticket reference >
Internal reference: < ServiceNow ticket reference >
Snapshot: < Snapshot record reference >
Message: 'CreateIncident'
Transaction: < Your Transaction >
Integration: < Your Integration >
Mapped Staged Data fields (yours may differ depending on which Field records you created):
Caller ID: < Your caller.id >
Short description: < Your Short description >
State: '1'
View the HTTP Request
Click through to the HTTP Request record from the related list on the Transaction.
This is where you will find details of the data that was transported between the systems being integrated. (These records are extremely useful for developing and debugging integrations because of the immediate availability and contextual relevance to the integration you are developing.)
Your HTTP Request record should look like this:
![](https://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2F2763208740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZR0dkdEH0Mm7amiIzsdG%252Fuploads%252FoJwSRrOHPPc2IzGd4qlR%252Fobig-test-createincident-10.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=2c366b88&sv=1)
HTTP Request details:
Integration: < Your Integration >
Connection: < Your Connection >
Transaction: < Your Transaction >
Message: 'CreateIncident'
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: 'POST'
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://docs.sharelogic.com/~gitbook/image?url=https%3A%2F%2F2763208740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZR0dkdEH0Mm7amiIzsdG%252Fuploads%252FipkIMhnlK2TE9u5cQUT2%252Fobig-test-createincident-11.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=dba3512f&sv=1)
Caller: < Your Caller >
State: < Your State >
Short description: < Your Short description >
Activities: < Note showing activity on the Incident > (Opened by < your.external.system.user > configured in the Connection)
We are now ready to move on to the Update Scenario.
Last updated