Skip to main content
Version: 17

Condition

A condition is a tree-shaped expression that is evaluated against a set of Harmoney data points. It is used in many parts of the configuration, for example in Validations, Actions, Providers, Flow Definitions and Form Definitions.

Every node of a condition tree must contain exactly one of the properties listed below: either a logical operator (not, and, or) that nests further conditions, or a comparison that targets a data point through a fieldPath.

Logical operators​

Logical operators do not have a fieldPath of their own. They combine other conditions.

  • not: a single nested condition that must evaluate to false.
  • and: a list of nested conditions; all of them must evaluate to true.
  • or: a list of nested conditions; at least one of them must evaluate to true.
Combining operators
{
"and": [
{ "equals": { "fieldPath": "type", "value": "KNOW_YOUR_CUSTOMER" } },
{ "not": { "equals": { "fieldPath": "status", "value": "CLOSED" } } },
{ "or": [
{ "equals": { "fieldPath": "metadata.HIGH_RISK", "value": true } },
{ "equals": { "fieldPath": "metadata.PEP", "value": true } }
]}
]
}

Comparison conditions​

All comparisons take a fieldPath that points to a data point. The available field paths depend on the context in which the condition is used (see Field path below).

Equality​

  • equals / notEquals: the data point must (not) be equal to value. The type of value must match the data point (string, number, boolean, ...).
{ "equals": { "fieldPath": "client.partyType", "value": "COMPANY" } }

String matching​

  • like / notLike: the data point (string) must (not) match the regex in value. The character % is interpreted as .*.
{ "like": { "fieldPath": "name", "value": "ACME%" } }

Membership​

  • in / notIn: the data point must (not) be equal to one of the strings in values.
{ "in": { "fieldPath": "type", "values": ["BYLAWS", "ID_CARD"] } }
  • isInList / isNotInList: checks the data point against a list defined on the organization. listIdentifier selects the list. listFilterValue is optional:
    • With listFilterValue: the list is treated as a keyβ†’value map. The condition matches when the entry keyed by the data point carries a value equal to listFilterValue.
    • Without listFilterValue (blank or omitted): a pure membership check. isInList matches when the data point exists as an entry (identifier) in the list, regardless of any value stored against it; isNotInList matches when it does not. Use this for plain membership lists that have no per-entry values.
Value match β€” country flagged HIGH
{
"isInList": {
"fieldPath": "client.country",
"listIdentifier": "HIGH_RISK_COUNTRIES",
"listFilterValue": "HIGH"
}
}
Membership only β€” nationality not in the EU-countries list
{
"isNotInList": {
"fieldPath": "party.individual.nationality",
"listIdentifier": "OPENLANE_EE_EU_COUNTRIES"
}
}

Collections​

  • contains / notContains: the data point must be a collection that does (not) contain value.
{ "contains": { "fieldPath": "documents[*].type", "value": "PASSPORT" } }

Numeric comparison​

  • greaterThan: data point must be greater than value. Numbers only.
  • smallerThan: data point must be strictly smaller than value. Numbers only.
{ "greaterThan": { "fieldPath": "ubo.percentage", "value": 25 } }

Null / empty​

  • isNull: the data point must be null. For collections, it must be empty.
  • isNotNull: the data point must not be null. For collections, it must be non-empty.
{ "isNotNull": { "fieldPath": "client.documents[?(@.type == 'BYLAWS')]" } }

Field path​

A fieldPath selects a data point by name, using dot notation to descend into nested objects (for example client.individual.maritalStatus). For collection-valued data points, JSON-path style filters and wildcards are supported, for example dossier.client.documents[*].assessment.assessment or documents[?(@.type == 'BYLAWS')].

:::warning Always guard collection paths with isNotNull

When using JSON-path wildcards ([*]) on a collection β€” for example dossier.client.documents[*].assessment.assessment β€” always wrap the expression in an and condition whose first clause is an isNotNull check on the parent collection (e.g. dossier.client.additionalTaxInformation).

Without this guard, if the parent collection is null or empty, every operator (in, contains, equals, …) that traverses it will evaluate to true instead of false, producing incorrect results.

Safe pattern β€” guard the parent collection first
{
"and": [
{
"isNotNull": {
"fieldPath": "dossier.client.additionalTaxInformation"
}
},
{
"in": {
"fieldPath": "dossier.client.additionalTaxInformation[*].countryCode",
"values": ["IN", "US"]
}
}
]
}

:::

Which paths are valid depends on the data point source bound to the condition by the consuming configuration. Each consumer of the condition decides which source applies. Sources currently in use:

  • PartyDataPoint (also PartyExternalDataPoint)
  • IdentityDataPoint
  • DossierDataPoint (also DossierExternalDataPoint)
  • DocumentDataPoint
  • RbaDataPoint
  • UboDataPoint
  • RelatedPartyDataPoint
  • SignatoryDataPoint
  • DueDiligenceSubjectDataPoint
  • DueDiligenceProviderInput

The Harmoney UI offers field path autocomplete based on the source of the surrounding configuration, so a condition embedded in a dossier-scoped setting will only show dossier paths, etc.

Examples​

Block status transition for closed dossiers of high-risk clients
{
"and": [
{ "equals": { "fieldPath": "type", "value": "KNOW_YOUR_CUSTOMER" } },
{ "equals": { "fieldPath": "metadata.HIGH_RISK", "value": true } },
{ "notEquals": { "fieldPath": "status", "value": "CLOSED" } }
]
}
Require a BYLAWS document for company clients
{
"and": [
{ "equals": { "fieldPath": "client.partyType", "value": "COMPANY" } },
{ "isNotNull": { "fieldPath": "dossier.documents[?(@.type == 'BYLAWS')]" } }
]
}
UBO with at least 25% ownership in a sanctioned country
{
"and": [
{ "greaterThan": { "fieldPath": "percentage", "value": 25 } },
{ "isInList": {
"fieldPath": "party.individual.nationality",
"listIdentifier": "SANCTIONED_COUNTRIES",
"listFilterValue": "code"
}}
]
}