LogoLogo
AboutSupport
2.2
2.2
  • Unifi Documentation
  • Release
    • Release Notes
      • 2.1 Release Notes
      • 2.0 Release Notes
    • Hotfixes
    • Setup
  • Overview
    • Quick Tour
    • Supported Features
    • Application Module Overview
  • Integration Guides
    • Outbound Incident Guide
      • Getting Started
      • Process
      • Integration
      • Connection
      • Trigger
      • Create Scenario
        • CreateIncidentResponse Message
        • CreateIncidentResponse Fields
        • CreateIncident Message
        • CreateIncident Fields
        • Test CreateIncident
      • Update Scenario
        • Response Message
        • UpdateIncident Message
        • UpdateIncident Fields
        • Test UpdateIncident
      • Resolve Scenario
        • ResolveIncident Message
        • ResolveIncident Fields
        • Test ResolveIncident
      • Build - Integration Level
      • Conclusion
    • Bidirectional Asynchronous Incident Guide
      • Getting Started
      • Process
      • Web Service
      • Integration
      • Connection
      • Trigger
      • Create Scenario
        • Response Message
        • CreateIncidentReceipt Message
        • CreateIncidentReceipt Fields
        • CreateIncident Message
        • CreateIncident Fields
        • Test CreateIncident
      • Update Scenario
        • Receipt Message
        • UpdateIncident Message
        • UpdateIncident Fields
        • Test UpdateIncident
      • Resolve Scenario
        • ResolveIncident Message
        • ResolveIncident Fields
        • Test ResolveIncident
      • Build - Integration Level
      • Build the Other Half
        • Move the Integration
        • Reconfigure the Connections
      • Conclusion
    • Incident Update Poller Guide
      • Polling
        • Poll Processor
        • Poller
      • Inbound Message
        • UpdateIncidentInbound Message
        • UpdateIncidentInbound Fields
      • Message Identification
      • Bond Identification
        • Edit Incident Form
        • Edit CreateIncident Message
      • Test Update Poll
      • Conclusion
    • Incident Multiple Message Poller Guide
      • Polling
        • Poll Processor
        • Poller
      • Inbound Messages
        • ResolveIncidentInbound Message
        • ResolveIncidentInbound Fields
      • Testing
        • Test UpdateIncidentInbound
        • Test ResolveIncidentInbound
      • Conclusion
    • Incident Create Poller Guide
      • Polling
        • Connection Variables
        • Poll Processor
        • Poller
      • Messages
        • CreateIncidentInboundReceipt Message
        • CreateIncidentInboundReceipt Fields
        • CreateIncidentInbound Message
        • CreateIncidentInbound Fields
      • Build - Integration Level
      • Test Create Poll
      • Conclusion
    • Incident Parent and Child Poller Guide
      • Polling
        • Connection Variables
        • Child Poll Processor
        • Child Poller
        • Parent Poll Processor
        • Parent Poller
      • Inbound Messages
      • Testing
        • Test UpdateIncidentInbound
        • Test ResolveIncidentInbound
      • Conclusion
    • Incident Attachment Poller Guide
      • Polling
        • Connection Variables
        • Edit Endpoint URLs
        • Get Attachment Poll Processor
        • Get Attachment Poller
        • Select Attachments Poll Processor
        • Select Attachments Poller
        • Edit Child Poll Processor
        • Edit Child Update Poller
      • Messages
        • AddAttachmentInbound Message
      • Testing
        • Test Outbound Scenarios
        • Test CreateIncidentInbound
        • Test UpdateIncidentInbound
        • Test ResolveIncidentInbound
        • Test AddAttachmentInbound
      • Conclusion
  • Feature Guides
    • Packager Feature Guide
      • Instructions
    • Error Handling Tools Feature Guide
      • Retry
      • Replay
      • Ignore
      • Repair
      • Pause and Resume
  • Bonding
    • Bonds
    • Bonded Attachments
  • Transport
    • Transport Data Flow
    • Transactions
    • Stages
    • HTTP Requests
    • Response Actions
  • Configuration
    • Processes
    • Integrations
    • Connections
    • Messages
    • Message Scripts
    • Fields
    • Field Maps
    • Event Actions
  • Polling
    • Pollers
    • Poll Processors
    • Poll Requests
    • Large Response Payloads
  • Administration
    • Activity Logs
    • Data Stores
    • Properties
    • Scheduled Scripts
    • System Logs
    • Self-test
  • Scripting
    • Variables
    • Snippets
  • Attachments
    • Attachment Handling
    • Multipart Form Data
Powered by GitBook
On this page
  • New Message Modal
  • Response Fields
  • Bond Fields
  • Outbound Trigger Fields
  • Outbound Settings Fields
  • Inbound Settings Fields
  • Script Editor Fields
  • Scripts

Was this helpful?

Export as PDF
  1. Integration Guides
  2. Bidirectional Asynchronous Incident Guide
  3. Create Scenario

CreateIncident Message

The CreateIncident Message will create a ticket on the target table of the integrated system.

PreviousCreateIncidentReceipt FieldsNextCreateIncident Fields

Last updated 4 years ago

Was this helpful?

As previous, after clicking the 'Messages' icon, you will see the following screen (note: both the previously configured messages are now visible in the list):

1) Click New.

New Message Modal

The fields to be configured for the CreateIncident New Message modal are as follows:

#

Field

Description

Value

2

Message name

The message name that is unique for this integration.

'CreateIncident'

3

Type

The primary purpose of the message.

'Create'

4

Direction

The direction(s) this message is configured to support.

'Bidirectional'

Your CreateIncident New Message modal should look like this:

5) Submit and view to further configure the Message.

Response Fields

Navigate to Message > Response.

The Response fields to be configured are as follows:

#

Field

Description

Value

6

Response

The immediate synchronous response to this message.

<lookup: 'Response'>

*

Async

Turn this option on if you want inbound processing to occur asynchronously or this message is the first of an asyncronous message pair.

<true>

7

Async receipt

The asynchronous receipt to this message.

<lookup: 'CreateIncidentReceipt'>

*This field is automatically defaulted to true.

Your Response form should look like this:

8) Navigate to Message > Bond.

Bond Fields

The Bond fields to be configured are as follows:

#

Field

Description

Value

*

Bond ownership

Determine if the sender should own the bond or not in order for this message to be processed? Use 'Ignore' to process regardless of the owner flag. (Choices: Ignore, Must own, Must not own.)

'Ignore'

*

Bond condition type

The type of conditional check made on the bond. (None: no checks are made. State: checks against the state are made using the conditional checkboxes. Scripted: the 'Bond condition' script is used.)

'State'

9

Bond new

Process this message when a new bond is required.

<true>

*These fields are automatically populated.

Your Bond form should look like this:

10) Navigate to Outbound > Trigger.

Outbound Trigger Fields

The Outbound Trigger fields to be configured (as required)* are as follows:

#

Field

Description

Value

11

Outbound condition*

The condition that the ServiceNow record must meet to trigger this message being processed.

Update the Outbound condition script field with the code below

*Outbound condition (as required):

It is not necessary for you to enter a condition. The value given is an example. You may create any condition (or not) to align with your business process requirements.

The code in the 'Outbound condition' script field should look like this:

current.assignment_group && String(current.assignment_group.u_unifi_integrations).indexOf(message.integration) != -1

This is an example of data-driving the trigger condition. This script checks whether the integration that this message belongs to is listed in a custom field on the assignment group which references the integration.

Your Outbound Trigger form should look like this:

12) Navigate to Outbound > Settings.

Outbound Settings Fields

The Outbound Settings fields to be configured are as follows:

#

Field

Description

Value

13

Action method

The SOAP Action or the REST Method to use for this message. If this field is empty the SOAP Action will default to the message name and the REST Method will default to POST.

'POST'

Your Outbound Settings form should look like this:

14) Navigate to Inbound > Settings.

Inbound Settings Fields

The Inbound Settings fields to be configured are as follows:

#

Field

Description

Value

*

Bond reference method

Method of searching for and validating an existing bond for incoming messages.

'External'

15

Reference lookup script

The script containing functions for extracting internal and external references from the request payload.

Update the code in the Reference lookup script field so that it looks like the code below

*This field is automatically populated & not editable.

Bond reference method:

Internal - lookup using the internal reference only.

External - lookup using the external reference only.

Both - lookup using both the internal and external references.

Bond reference method: The perspective of the available choices is in relation to the receiving instance i.e. Internal (internal reference) means the bonded ticket in our instance and External (external reference) means the bonded ticket in their instance.

Primarily used in relation to create and update type messages, these settings define which values to lookup against to search for and validate whether or not a bond already exists.

In the case of a create type message, we use 'External' because there is not yet a bonded ticket in the receiving instance to reference (if we were to receive a create type message which referenced a bond that already existed it would be rejected because we don't want to create another bond for a record we've already seen ).

In the case of an update type message, we use 'Both' because it's a more accurate method of validating updates are being sent to/received from the correct bonded records.

The code in the 'Reference lookup script' field should look like this:

var answer = {};

answer.getExternalMessageID = function (payload, request) {
  return '' + (payload.message.source_id || '');
};

answer.getInternalMessageID = function (payload, request) {
  return '' + (payload.message.target_id || '');
};

Your Inbound Settings form should look like this:

16) Navigate to Advanced > Script Editor.

Script Editor Fields

As previously stated, as well as being the place where Bond state & ownership are set, the Scripts are where the request processing and data mapping occurs.

Click on View > Inbound.

The Script Editor fields to be configured are as follows:

#

Field

Description

Value

17

Stage to Target (Inbound)

The script to run.

Replace the commented out instructions with the following code: bond.setOpen();

Scripts

The code in the 'Stage to Target' script field should look like this:

bond.setOpen();

Your Script Editor fields should now look like this:

18) Click Save.

19) Close the Script Editor to navigate back to the Message.

We are now ready to configure the Fields for our CreateIncident Message.

In the current release, there is no OOTB Field Map record with which we can set the state on the Bond. We shall, therefore, script that manually. For more information, see the ' & '' pages in our technical documentation.

Fields'
Field Maps