In order for both systems to identify & understand which records are bonded and to facilitate only returning data from bonded records, we need to make a few configuration changes.
Our previously configured Outbound Incident Integration was very simple example and we weren't concerned with identifying which system made the updates. Neither were we concerned with telling the remote system which record they were bonded with.
Now that we're polling our PDI for data as well as sending data, we need to be aware of both the above concerns.
The first concern (identifying which system made the updates) has been taken care of in the Poll Processor Setup script (only returning data not updated by the Basic Authentication User). However, it doesn't make sense to try and return that data from all the records in the remote system. We should only be concerned with those records we're bonded with. To facilitate this we need to make a few configuration changes. We need to make a change in the remote system (our PDI) and some changes to our existing outbound CreateIncident Message.
First, we will need to Edit the Incident Form in our PDI.
Here we will deal with the configuration changes that need to be made to our CreateIncident Message to facilitate identifying and returning data from bonded records.
Now that we've configured the remote system's Incident form to display our bonded ticket number as the correlation id, we need to update our CreateIncident Message to send it.
To ensure that our CreateIncident Message is sending the relevant data we need to configure a new Field record that will send the Incident number as the correlation id. We will make use of the previously copied String Field Map record.
In Unifi Integration Designer, from the CreateIncident Message, navigate to Message > Fields. Click New.
The fields to be configured for our incident.number New Field modal are as follows:
Field | Description | Value |
---|---|---|
*These fields are automatically defaulted to true, or automatically populated.
**Field map: Value may vary. Choose the copy Field Map you created for your Integration.
Your 'incident.number' New Field modal should look like this:
Submit the record.
You will be redirected back to the Fields page of the CreateIncident Message.
It is not necessary to configure this Field record to facilitate identifying and returning data from bonded records. It is only included here to facilitate the sending of data in the Description field of the Incident when testing our Integration. You may choose to ignore this if you wish. Similarly, if you had already configured the incident.description Field record for the CreateIncident Message (when completing the 'Outbound incident' Guide), you can ignore this.
The ‘incident.description’ (Integration level) Field record should already be in place (i.e. with Active set to false). This was automatically created by Unifi when we created the Message level record when configuring the Fields for the UpdateIncidentInbound Message. We will now create its Message level counterpart for the CreateIncident Message.
From the CreateIncident Message, navigate to Message > Fields.
Your CreateIncident Fields page should look like this:
Find the incident.description (Integration level) Field & set Active to true.
The empty circle icon next to the Field name turns green & contains a green ‘check’ (to indicate that Message level configuration exists for this Field) when we set Active to true. (The ‘Build Integration’ button became visible in the banner when we created the 'incident.number' Field record.)
By setting the Active flag to true on the Integration level Field record listed on the Message, Unifi has automatically created the Message level counterpart.
Click to open the incident.description (Message level) Field to make a few minor changes.
The incident.description Field record opens to the Details page.
To edit, set Inherit to False.
Save the record (the fields now become editable).
Navigate to Field > Settings.
Edit the incident.description Field record as follows:
Your 'incident.description' Field record should look like this:
Save the record.
Now that we’ve configured the Field records for the CreateIncident message, we are ready to build our message scripts.
To quickly navigate to the CreateIncident Message from the Details page of the newly created incident.description Field record...
...click the 'Preview' icon to the left of the Message field.
The following Field records should now be in place for your CreateIncident Message:
Click on Build Message.
You will see the 'Message build successful' Info Message.
Navigate to Advanced > Script Editor > View > Outbound to view the auto-generated code.
Your Script Editor fields should look like this:
The new auto-generated code (mapping the incident number to the correlation id & mapping the Incident description) will appear between the Begin & End Comment along with the code that was already there (which we had previously created using the Outbound Incident Guide). Your code may differ, depending on which Field records you created to satisfy your mapping requirements.
Source to Stage:
Stage to Request:
We have now completed the configuration and are ready to move on to Test our Update Scenario.
Field | Description | Value |
---|---|---|
Message*
The Message this Field record is linked with.
'CreateIncident'
Description
The description of this Field record.
'The incident number sent as the correlation id'
Active*
Set to true to use this Field record for processing.
<true>
Field map
The Field Map this Field record is linked with.
'PI - String'**
Map to field*
Use this Field record to represent a field on a source/target table.
<true>
Table*
The primary source/target table that this Field record is mapped to.
'Incident' [incident]
Element
The field on the source/target table this Field record is mapped to.
'Number'
Property*
The property in the payload the data will be written to.
'correlation_id'
Inbound*
Set to true to use for inbound Messages.
<false>
Outbound*
Set to true to use for outbound Messages.
<true>
Path
Where in the payload the data will be placed.
[Blank]
Inbound
Set to true to use for inbound Messages.
<false>
Outbound
Set to true to use for outbound Messages.
<true>
The first configuration change we need to make to facilitate Bond identification is to add the Correlation ID field to the Incident form in our PDI.
In order for the remote system to store data about which record they're bonded with and to enable us to identify and only return data from those bonded records, we need to send and store a unique identifier. We will make use of the available correlation_id
field on the Incident record. First we will add the field to the Incident form in our PDI.
From any Incident record in your PDI, right-click & navigate to Configure > Form Layout.
Select the Correlation Id field from the 'Available' slushbucket and move it to the 'Selected' slushbucket.
Save to add the field to your form.
Next, we will need to Edit the CreateIncident Message.