Bonds store the data necessary to link your ServiceNow record to an external system.
In most integrations each system knows just enough about the other to facilitate correlation and a semblence of process. On task records in ServiceNow this has normally been done using the Correlation Display
and Correlation ID
fields. If you want to integrate non-task records, then you would need to add fields like these to the table. If you wanted to use one record with many integrations, then you have even more to do.
In Unifi, correlation has been normalised for global use through the use of the Bond record.
Bond records are used for much more than just storing correlation data; they are the glue that links everything together and ensures that you can maintain a high level of control in all your integrations. In addition to this, all transactions and attachments reference a bond making it easy to track communications.
A Bond record’s primary functions are:
To store the internal and external references
To give state control to each integration instance
To provide insight into the health of the bond
To track which system ‘owns’ the bond
To store a running commentary of the bond history
To ‘contain’ all transactions and attachments for the lifetime of the bond
To track attachment totals
The references necessary for integration are stored on the bond. You do not need to store any integration data on the integrated record itself.
The display value of the reference field from the ServiceNow record. This is automatically captured based on the Reference field
specified in the Process which the integration belongs to.
The reference used by the external system.
You must have at least one reference (either internal or external) to form a bond to another system. It is recommended to store both references wherever possible.
In complex integration processes it is often useful (or necessary) to track the state of the bond. This is mainly used to allow or prevent messages from being sent and received, but is also helpful to analysts who can quickly gain insight into what is happening without any additional configuration.
Every Message can be conditioned using the Bond state. Messages will check that the bond meets the bond condition specified before processing.
The Bond state can be set using the Set bond state inbound
and Set bond state outbound
fields on the Message. It can be also set manually in the Source to Stage
(outbound) and Stage to Target
(inbound) Message Scripts.
Bond health can be determined by the Status
field. This is constantly updated as transactions are flowing between the integrated systems.
Ownership is not always used, but is extremely helpful in complex ticket integrations, especially where many systems might be involved (SIAM/Multi-vendor).
The Owner
flag is used to track which system is currently in charge of the ticket. This allows complex security and process logic to take place, creating a much more robust integration.
The Owner
flag can be set inbound and/or outbound using the Set bond owner inbound
and Set bond owner outbound
fields on the Message.
Unifi has a unique transactional management approach that is accomplished through the bond: all transactional data is stored against the bond until the bond state changes to Closed
, at which point it is deleted. This balance gives integration admins full insight to view and debug integration issues while maintaining table efficiency.
Once the bond is closed, a scheduled job is created in the future using the Integration property Bond cleanup
, which specifies how many days to wait before running the cleanup process.
The cleanup process deletes all Transaction and Bonded Attachment records.
Some integrations may need to maintain an open bond for a significant amount of time, or even indefinitely. In this case, a traditional scheduled cleanup job should be created to run periodically to clear out historic records.
Deleting the Transaction record will cascade delete all Stage and HTTP Request records.
You can view the Unifi logs from the Bond record by navigating to the 'Unifi Activity Logs' related list. Activity Logs are particularly helpful to ShareLogic when debugging Unifi itself and will be populated if logging is enabled when debugging.
The logs that can be viewed from the Bond are for the Bond itself and the Transactions that relate to that Bond.
In addition to the Transaction logs (for details of those click here), you will also see the following:
These logs are defined in the Trigger on the process table being integrated.
A Bonded Attachment is created for every synchronised attachment, storing relevant data.
For every attachment that is sent or received, a Bonded Attachment record is created that links to the attachment. This allows the system to automatically make size calculations and track if the attachment has been sent.
The attachment sits on the bond, but is also linked to and can be viewed from the transaction that sent it.
For implementations using multiple integrations with one record, one attachment can be added and it will automatically be sent and tracked across all the relevant bonds.
Unifi has automated checks that prevent attachments and updates being sent back to the originator (controlled by the Connection).
For help on setting up attachments please see guide for How to Handle Attachments.
The following table gives a description of the fields that are visible on the Bonded Attachment record:
Label | Type | Description |
---|---|---|
The state is set in conjunction with the information contained on the Integration & Bond (concerning permitted file types & attachment sizes etc.) and is used to determine whether or not to send the attachment, or where it sits in the process. The Bonded Attachment lifecycle can be seen in the following table which describes the State
field value choices:
State | Description |
---|---|
Status | Description |
---|---|
Name | Table |
---|---|
Label | Sequence | Description |
---|---|---|
New
The bond is created but not yet inserted.
Pending
The bond has been created and the system is waiting for confirmation from the external system.
Open
Message exchange is available.
Suspended
Message exchange has been suspended by the internal process.
Vendor suspended
Message exchange has been suspended by the external process.
Closed
Message exchange has been terminated.
OK
All transactions have completed.
Awaiting
A request has been made and is awaiting completion.
Error
A transaction has failed.
Transaction
x_snd_eb_transaction
Bonded Attachment
x_snd_eb_attachment
Number
String
The unique Bonded Attachment identifier.
State
Choice
The attachment synchronisation state.
Bond
Reference
The Bond this record belongs to.
Transaction
Reference
The Transaction this attachment was sent with.
Size (bytes)
Integer
The size in bytes of the attachment.
Content type
String
The attachment content type.
Created
Glide date time
The time the attachment record was created.
Created by
String
The person/system who created the attachment record.
Attachment
Reference
The system attachment.
File name
String
The file name of the attachment.
Status
String
Information message about the attachment synchronisation.
Ready
0
The attachment is queued ready for sending.
Sending
1
The attachment is in the process of being sent.
Sent
2
The attachment has been sent successfully.
Complete
3
The attachment has been sent & we have received a receipt acknowledging it.
Rejected
4
An attempt was made to send the attachment, but was rejected.
Failed
5
There was a technical reason sending the attachment failed.
Ignored
6
The attachment was ignored (E.g. because it exceeded the maximum allowed file size).