Fields

Field and Field Map configuration records are elements that simplify and bring additional functionality when configuring Messages & Message Scripts and facilitate the auto-generation of documentation.

Introduction

Adding these elements to the Unifi configuration records brings a wealth of advantages. In the past, each Message Script has been maintained individually and manually. However, the introduction of Fields and Field Maps allows Message Scripts to be broken down into smaller, reusable components. Having these Field records also means we can easily view and manage the use of fields on Messages and Integrations.

Definition

A Field record defines the processing of a discrete component of a Message. Although the Field record is distinct from and separate to the field element of a form, it often represents the handling of an individual field on the source/target record (e.g. Short description). Not only that, a Field record is used to define the objects that will carry other Transaction specific data (e.g. Name, Time stamp, Source reference, Target reference).

A Field record identifies the field of a source/target record (optional - as stated above), the element used to stage the information and the property of the payload exchanged between systems. It can define the direction in which it is applied, any default values to use in each direction and whether it is mandatory. It can exist at the Integration or Message level (more on that in the Inheritance section). The behaviour, or ‘type’ of a Field is defined by the Field Map to which it is linked.

Inheritance

Field inheritance allows a Field record to be created at the Integration level rather than at an individual Message level. Individual, Message level Field records can then be configured to inherit their behaviour from the Integration level Field record.

For example, if a field is used by ten Messages, then we would define ten Field records and link them to the Messages (a separate Field record must be created for each of the Messages where the field is used). If we configure those Field records to inherit their behaviour from the Integration level Field record, then modifications made to the Integration level would immediately be available to the Message level Field records.

A Field record is shown to be an Integration level record when it is not linked to a specific Message i.e. the ‘Message’ field is left blank .

The ‘Integration’ field is mandatory for all Field records, meaning that a Field record must always be linked to an Integration.

A Message level Field record can inherit from its Integration level counterpart by simply checking the ‘Inherit’ field.

Field inheritance is set to true by default. This means the record will be updated with integration-level Field values when saved (except for Active, Inherit and Message values). Uncheck the Inherit field to configure locally.

The image below is an example of an ‘incident.short_description’ Field record:

We can see an example from this list view below that the incident.short_description Field record has been defined for seven different Messages on this Integration (plus the Integration level record):

Configuration

Best Practice

When configuring a Field record, it is best practice to only link it with a Field Map that belongs to the same Integration as the Field (for details, see the Field Maps page).

Known Issue

There is a known issue when copying Field records from one Integration to another. The linked Field Map referenced on the copied Field record is the one belonging to the originating Integration. To maintain best practice, change this to reference the equivalent Field Map on the Integration it was copied to.

As an aid to help identify this in the auto-generated Documentation, a warning triangle will appear next to the Field Map and a message will be shown in the Document if there is an issue.

Field Details Configuration

The Details fields to be configured for the Field record are as follows:

Field Settings Configuration

The Settings fields to be configured for the Field record are as follows:

*These fields are visible when ‘Map to field’ is set to true

Field Defaults Configuration

The Defaults fields to be configured for the Field record are as follows:

*Default inbound/outbound: For a list of available variables, click here.

Field Choices Configuration

Field Choice records can be defined for an Integration-level Field. Rather than configure choices for each Message, configure choices once at the Integration-level. This means you only need define them once.

These are used when you’re mapping choice field elements with static values that don't change per Message (e.g. State, Impact, Urgency).

When you click on Generate field choices, Unifi will go to the Choice [sys_choice] table and automatically pull back the value and label for each of the elements where the table matches the primary source/target table that this Field record is mapped to - creating Field Choice records for each.

You can also create your own internal/external mappings when you click New. For more on Field Choices click here.

Native ServiceNow

There are some fields which are visible in native ServiceNow. These can be viewed by clicking the hamburger menu & selecting 'Open in platform'.

The following fields are visible on the platform Integration record:

Fields and Field Map Processing

Fields and Field Map records are not processed during the operational phase (run time) of the Integration. They are processed by a Build process (triggered by a UI action) which takes the information in the records and produces the code which defines the Message Scripts. The Build activity can be performed on an individual Message, or for the entire Integration.

At run time only the Message Scripts are executed and the Field and Field Map records are not accessed at all. This means there is no operational difference between an integration built using Fields and Field Maps and an integration built without.

Next, we will look at Field Maps in more detail.

Last updated