Data Blocks/Data Products Monitoring

The standard monitoring solution allow you to take advantage of not only the change detection and notification functionality inherent in Direct+ monitoring but also the ability to set Thresholds against certain data elements, filter our elements one may not be interested and take an initial seed and subsequent seed files of the DUNS Numbers you have registered. Additionally, you can registered either a List of DUNS Numbers (LOD) or a predefined universe. Not all of this functionality is available for UBO and Family Tree Monitoring and these difference are detailed in the documentation.

Registration

Please refer Create a Registration page for details.

Note: For China, due to recent regulatory changes limited data is available for online & monitoring.

Following are the parameters specific to Data Blocks/Data Products

  • Initial seeds (via monitoring), thresholds and exclusion/inclusion (element level monitoring) of specific data elements are available.
  • Frequency is INTRA_DAY, DAILY, WEEKLY and MONTHLY.
  • Notification Types are UPDATE , FULL_PRODUCT , THRESHOLD and NONE.
    Note: Approval required for FULL_PRODUCT notifications.
  • Either List of DUNS (LOD) or Universe can be monitored.
These differences are detailed in the relevant sections of the Monitoring Guide and in the API Reference sections.

Threshold Monitoring

The Threshold monitoring service has been developed to you to be alerted when specific, defined changes occur to the entities (DUNS) they have registered for monitoring. For example, notify me when the D&B Failure Percentile Score falls below 40.

Summary of Thresholds:

As a Direct+ Monitoring customer you can register to be notified of changes that occur if certain conditions are met. These conditions can be if something goes above or below a given value (or even equals it). numeric, boolean or string elements can be used to determine when a condition is met. For example, you may register to receive a threshold notification when the value of a specific element has increased by 10%.. These notifications will be provided via the normal notification channels.

Data Types:

Threshold monitoring will be possible on boolean, numeric and string data types only.

Threshold Registrations:

Thresholds can only be applied to List of Duns (LOD) registrations. They cannot be applied to Universe registrations. A new type of registration, THRESHOLD, has been defined that allows you to define rules to indicate when you want to be informed of any changes to the data used in your rules. You can define one or more rules, declaring data (defined using JSON paths) in the monitored product, by providing an expression that will be evaluated to determine if a notification should be delivered based on the state of the data. If a notification delivery is triggered, then data related to the rules that triggered will be delivered as part of the notification. Data that changed but was not declared as a JSON path in at least one rule is discarded and not sent as a part of the notification. Declared JSON paths are treated as an implicit jsonPathInclusion.

  • Threshold registrations are created using the same APIs to create other registration types.
  • A notificationType of THRESHOLD indicates a threshold registration.
    IMPORTANT: This notification type is to be renamed as ALERT from 1st July 2020. Any registrations created before that with the notficationType=THRESHOLD will continue to be supported.
  • jsonPathInclusion and jsonPathExclusion are ignored if specified.
  • Universe Threshold registrations are not supported.
  • Family Tree, CMPBOL and CMPBOS registrations are not supported.

Threshold Rules:

  • Threshold rules are provided using the required thresholds field as part of the usual registration data input.
  • Rules may be added or removed from an existing Threshold registration via the provided APIs.
  • Threshold rules cannot be added to a non-threshold registration.
  • Rules are specified using the thresholds field in the registration creation API and must consist of JSON text that conforms to the threshold rule JSON schema detailed later in this document.
  • The id of a rule must be unique across all rules within a registration.
  • Rules cannot be updated using the registration update API. The add and remove threshold rules APIs must be used instead.

Threshold Rule JSON Paths:

  • JSON paths are used to identify the elements where threshold logic will be applied.
  • JSON paths are referred to via a customer set alias name when creating the threshold logic (see Threshold Rule Alias section later in this document for more details).
  • A JSON path must be associated with an atomic value (String, Number, Boolean)
  • A JSON path cannot be an aggregate (object with children)
  • A JSON path cannot be an array (list)
  • A JSON path cannot be contained within an array.
  • A JSON path must be defined in the product and version of the registration.

Threshold Rule Alias:

  • JSON paths are referred to via a customer set alias name when creating the threshold logic.
  • For example, a customer may declare in their rule that a json path "organization.primaryname" has the alias "pname"
  • The alias for a JSON path shall be unique across all JSON paths declared in that rule.
  • Declaring the same alias in different rules shall be allowed.
  • Where an alias has been set then an implicit alias with the name Prev is created which contains the elements previous value
    • E.g. If "organization.primaryname" is given the alias "pname" then an implicit alias "pnamePrev" is created with the previous value.
  • Where an alias has been set then an implicit alias with the name Base is created which contains the elements value the last time this rule was triggered or the value of this element at the point of creation. As this baseline value may be null it is good practice to wrap any reference to it in a IfNull method:
    • IfNull(myAliasBase, 10)
The following example shows a threshold rule which is triggered when the organization.primaryname changes but ignoring of case changes:
[ {
    "id": "myNameRule",
    "jsonPaths": [
      {
        "path": "organization.primaryName",
        "alias": "primaryName"
      }
    ],
    "condition": "(primaryName != primaryNamePrev) && (lower(primaryName)!=lower(primaryNamePrev))"
  }
]

Threshold Rule JSON schema:

All rules submitted must follow the following JSON schema. You can use a JSON schema validation tool to determine if a proposed rule is valid while designing their rules. An online schema validator can be found at the following location (please note we use draft-04 of Json schema as per this link : https://jsonschemalint.com/#!/version/draft-04/markup/json)

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "thresholds":{
      "type": "object",
      "required": ["id", "jsonPaths", "condition"],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z][A-Za-z0-9]{0,15}$"
        },
        "jsonPaths": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/jsonPath"
          }
        },
        "condition": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "jsonPath":{
      "type": "object",
      "required": ["path", "alias"],
      "properties": {
        "path": {
          "type": "string",
          "pattern": "^(?!.*\\.$)[A-Za-z][A-Za-z0-9\\.]*"
        },
        "alias": {
          "type": "string",
          "pattern": "^[A-Za-z][A-Za-z0-9]{0,15}$"
        }
      },
      "additionalProperties": false
    }
  },
  "type": "array",
  "items": {
    "$ref": "#/definitions/thresholds"
  },
  "additionalProperties": false
}

Threshold Rule Sample:

The following is an example of three Threshold rules submitted on a registration.

  • Rule ID "myScoreRule" triggers when the global ultimate family tree member count is greater than 3000 and the number of employees is less than 7 OR triggers when the global ultimate family tree member count is greater than 500 and the number of employees is less than 700.
  • Rule ID "aDefaultRule" triggers when the premises area is greater than 500 and the previous premises area was not equal to 400
  • Rule ID "RuleWithDesc" triggers when the global ultimate family tree member count is greater than 5 and the previous value for that was not equal to 4
[
  {
    "id": "myScoreRule",
    "jsonPaths": [
      {
        "path": "organization.corporateLinkage.globalUltimateFamilyTreeMembersCount",
        "alias": "famTreeMemCount"
      },
      {
        "path": "organization.numberOfEmployees",
        "alias": "numOfEmployees"
      }
    ],
    "condition": "(famTreeMemCount > 30000 && numOfEmployees < 7) || (famTreeMemCount > 5000 && numOfEmployees < 700)"
  },
  {
    "id": "aDefaultRule",
    "jsonPaths": [
      {
        "path": "organization.primaryAddress.premisesArea.measurement",
        "alias": "premisesArea"
      }
    ],
    "condition": "(premisesArea > 500 && premisesAreaPrev != 400)"
  },
  {
    "id": "RuleWithDesc",
    "jsonPaths": [
      {
        "path": "organization.corporateLinkage.globalUltimateFamilyTreeMembersCount",
        "alias": "famTreeMemCount"
      }
    ],
    "condition": "(famTreeMemCount > 5 && famTreeMemCountPrev != 4)",
    "description": "This is an example of an optional rule description which may be up to 256 characters in length."
  }
]

Threshold Rule Conditions:

Here a user defines a condition that shall generate a notification delivery if the condition evaluates to true.

  • The condition must evaluate to a Boolean result
  • The syntax of the condition shall follow the Java language
    • A table of supported operators can be found later in this document
    • A table of supported functions can be found later in this document
    • Variable assignment is not allowed
    • Implicit multiplication is not allowed (e.g. 2 y is not equivalent to 2 * y)
    • Undeclared variables (alias names) are not allowed
    • AND is be supported as an operator alias for the standard && 'and' operator
    • OR is be supported as an operator alias for the standard || 'or' operator
    • NOT is be supported as an operator alias for the standard ! 'not' operator
  • Declared JSON paths must be referenced in the condition expression using the associated alias defined by the user
  • null values used in expressions shall produce null results

Threshold Rule Operators:

All common arithmetic operators are supported. Boolean operators are also fully supported. Relational and logical operators (>, <, >=, <=, ==, !=, !) are evaluated as Boolean types (either Boolean.TRUE or Boolean.FALSE). The following table shows the operators in order of precedence. A check mark indicates that the operator can be used with the specific type of variable.

Double String
Power ^     
Boolean Not !     
Unary Plus, Unary Minus +x, -x     
Dot product, cross product ., ^^
Modulus %     
Division /     
Multiplication *     
Addition, Subtraction +, -       (only +)
Less or Equal, More or Equal <=, >=          
Less Than, Greater Than <, >          
Not Equal, Equal !=, ==          
Boolean And &&     
Boolean Or ||     
Assignment =          

Threshold Rule Functions:

The following additional functions are provided for use within a condition

Function Description Example
Contains(stringValue, searchString) Returns true if stringValue contains searchString Contains(name, 'IBM')
PercentChange(newVal, origVal) Returns the percent change to two decimal places PercentChange(109, 100) == 9
IfNull(val, valueToUse) Returns valueToUse if val is null IfNull(null, 10)
ValueInRange(val, lowerValue, upperValue, inclusive) Returns true if val is between lowerValue and upperValue ValueInRange(25, 10, 25, true) == true

Threshold Rule String Functions:

Function Description Example
Left left(str, len) Get substring starting at the start of the string and len characters long.
Right right(str, len) Get substring starting at the end of the string and going back len characters long.
Middle mid(str, start, len) Get substring starting at the position specified and len characters long.
Sub string substr(str, start, [end]) Get substring starting at the position specified and ending at the position specified
Lower Case lower(str) The string in lower case
Upper Case upper(str) The string in upper case
Length len(str) The length of the string
Trim trim(str) Trim whitespace from a string

Threshold Rule Notification:

The following is an example of the structure of a threshold ALERT notification. The displayed element paths are for illustration purposes only and may not actually be valid threshold paths:

{
  "type": "ALERT",
  "timestamp": "2019-06-19T06:00:04Z",
  "organization": {
    "duns": "390612679"
  },
  "thresholds": [
    "myScoreRule",
    "RuleWithDesc"
  ],
  "elements": [
    {
      "element": "organization.corporateLinkage.globalUltimateFamilyTreeMembersCount",
      "current": 9074,
      "prev": 500,
      "timestamp": "2018-12-18T06:00:04Z",
      "thresholds": [
        {
          "id": "myScoreRule",
          "baseline": 403,
          "timestamp": "2018-12-18T06:00:04Z"
        },
        {
          "id": "RuleWithDesc",
          "baseline": 103,
          "timestamp": "2014-01-18T06:00:04Z"
        }
      ]
    },
    {
      "element": "organization.numberOfEmployees",
      "current": 200,
      "prev": 3000,
      "timestamp": "2018-12-18T06:00:04Z",
      "thresholds": [
        {
          "id": "myScoreRule",
          "baseline": 3000,
          "timestamp": "2018-13-18T06:00:04Z"
        }
      ]
    }
  ]
}