Number of Referenced Target Objects Metric

The Number of Referenced Target Objects Metric detects the number of target objects of a selected reference type for a given product, and based on an operator selected by the user, returns either a score of '100' (true) or '0' (false). Users are able to create an error message for instances when the metric returns a score of '0;' this message is meant to detail the reason for the '0' score and can have multiple translations. For more information on reference types, refer to the Reference Types topic in the Reference and Link Types documentation here.

Important: Metrics are used in conjunction with sufficiencies to determine the quality and completeness of a product's data. While this topic covers the functionality and configuration of the Number of Referenced Target Object Metrics, it is important that users are also familiar with sufficiencies and how they are combined with metrics; information regarding sufficiencies can be found in the Sufficiency Configuration Type documentation here.

Prerequisites

Before metrics can be created, a Setup Group must be configured to hold them. For information on configuring a setup group for metrics, refer to the Initial Setup for Metrics topic in the Metrics documentation here. For information on creating a metric, refer to the Creating and Editing Metrics topic in the Metrics documentation here.

Number of Referenced Target Objects Metric Configuration

  1. From the Edit Metric Configuration wizard, select 'Number of Referenced Target Objects Metric.'

  1. With the Number of Referenced Target Objects Metric selected, click the ellipsis button () to select the reference type that you want to evaluate, select an operator from the 'Operator' dropdown list, and input a numerical value into the 'Value' field. Once an operator is selected from the 'Operator' dropdown list, a default error message will appear in the 'Error Message' text field, based on the selected operator.

Operator options include:

  • Equal to
  • Not Equal to
  • Greater than
  • Less than

In the example below, the user has configured the metric to determine whether a product has more than '5' Primary Product Image references. If the product does have more than five product image references, the metric will return a score of '100' (true). If there are five or less primary product image references, the metric will return a score of '0' (false), and will be accompanied with a message, as displayed in the 'Error Message' text field.

Note: If the user selects a reference type that is not valid for a product, the metric will be considered non-applicable for that product and no data quality information will be produced when the Sufficiency Data Calculator event processor is run. Additionally, only integers are valid for the 'Value' field; non-integer characters input into the 'Value' field will result in a validation error when the user attempts to save the metric.

  1. To edit the error message and/or add additional translations, click on the 'Error Message' editor button.

The 'Edit messages' window appears. Note that the 'Message' text field is editable. Descriptive text below the text field details how the placeholders included in the error message work in order to create an error message. Although the default error message (or something similar) is suggested, users are able to edit all or part of the error message, depending on their individual needs.

Note: Although the error message can be edited by the user, the placeholders themselves (e.g., number_of_objects) cannot be edited. If the placeholders are edited, the user will receive a validation error message when attempting to save the edited message. When the metric is run, placeholders are replaced by the 'real values,' e.g., 'number_of_objects' would be replaced with the number input into the Value field (in the example above, '5').

  1. Select the 'Translations' flipper and click the green plus sign located next to 'Add translation.'

  1. Click on the arrow located in the 'Language' dropdown menu; in the example below, the user has opened the dropdown menu and selected 'French.'

  1. Once a language is selected, edit the message to reflect the language specified for translation.

  1. Click the green plus sign to add another translation or 'OK' to close the 'Edit messages' window.
  2. Click 'Save' to close the Edit Metric Configuration wizard.

The metric is saved.

Note: Translation error messages are displayed by using locales; they are not context-dependant. For more information about locales, refer to the Localization topic in the Administrative Portal documentation here. For more information about localized messages, refer to the Localized Messages for JavaScript Business Rules topic in the Business Actions documentation here.

Once the metric is added to a sufficiency and the sufficiency is run, the results are displayed in the sufficiency panel within the Web UI. In the example below, the Referenced Target Object Metric (for this example, titled 'PrimaryImagesMetric') has been added to the sufficiency 'AssetInfoSufficiency,' and returned a score of '0' along with an error message that details the reason for the returned score.