Messages
A Message contains all the configuration required to send, receive, and process a request.
Messages are central to the functionality of Unifi. A Message brings together the disparate parts necessary for the configuration required in order to send, receive and process a request.
Automated Creation of Trigger Business Rule
Unifi will automatically create a Trigger (Business Rule) for the Process being integrated (if one doesn't already exist) when you run 'Build' either on the Integration or Message once your Create Message is configured.
For step-by-step instructions on how to configure Messages (and other Integration components) see the Integration Guides section of the documentation.
Message Fields
Details
The Details fields to be configured for the Message record are as follows:
*Direction choices: Inbound, Outbound, or Bidirectional.
The 'Disable' button will set the Active flag to 'false'.
Fields
From here you can configure the relevant Field records for the Message. A list of the available and active Fields is displayed*. For more information about Field records click here.
*The Fields displayed in this list are automatically filtered based on the table referenced on the Message (so you will only see relevant Fields).
Response
The Response fields to be configured for the Message record are as follows:
Bond
The Bond fields to be configured for the Message record are as follows:
*Bond ownership condition choices: Ignore, Must own, Must not own.
*Set bond owner choices: None, Internal, External.
'External' sets the bond.owner
flag to true. 'Internal' sets it to false.
These settings will take precedence over any which are scripted in the Message Scripts.
*Set bo_nd state choices:_ None, Pending, Open Suspended, Vendor Suspended, Closed.
These settings will take precedence over any which are scripted in the Message Scripts.
Outbound Fields
Trigger
The Outbound Trigger fields to be configured for the Message record are as follows:
*Advanced condition:
This field is made visible when the 'Use advanced condition' field is set to true.
*Send to self:
By default, if an integration updates a target record it will not trigger messages to be sent back to itself, preventing feedback loops.
Template
The Template fields to be configured for the Message record are as follows:
CDATA
It is possible to use CDATA within an XML message, but because of the way ServiceNow handles XML it can be a little bit tricky. When ServiceNow see’s the CDATA tag, it actually processes it and the tag ends up being removed in the final. We need to use a little trick allow us to actually get the CDATA in the final result.
Attachments
The Outbound Attachments fields to be configured for the Message record are as follows:
*Attachment added:
This field is made visible when the 'Send attachments' field is set to true.
Settings
The Outbound Settings fields to be configured for the Message record are as follows:
Inbound Fields
Settings
The Inbound Settings fields to be configured for the Message record are as follows:
*Extract attachments script
This field is made visible when the Extract attachments
box is checked. The script must always return a string and if an object is used it needs to be JSON encoded (i.e. JSON.stringify()
). The following is an example:
Advanced
Script Editor
From here you can view each of the Message Scripts for the Message (Source to Stage, Stage to Request, Payload to Stage, Stage to Target). The auto-generated code displayed is configured using Fields & Field Maps. For more information on Message Scripts click here.
You MUST NOT edit the code between the Begin & End Comments, or the comments themselves.
If you wish to manually script any code, that must be done outside of those comments.
Response Actions
From here you can view a list of the relevant Response Actions on the Integration. You can also configure a New Response Action from the list. For more information about Response Actions click here.
Event Actions
From here you can view a list of the relevant Event Actions on the Integration. You can also configure a New Event Action from the list. For more information about Event Actions click here.
The ServiceNow Administrator [admin] role is required to access Response/Event Actions.