Helper Operators
Learn about helper operators that let you define complex match logic using AND/OR conditions, exclude specific values, and normalize nulls to improve match accuracy.
The Helper Operators apply additional conditions within a rule. The comparator classes you map for the rule have no bearing on the Helper Operators.
Equals Operator
Specifies that an attribute in the profile must be equal to a certain value.
Example:
Suppose you only want to compare addresses where State equals TX
, or identifier type equals SSN
.
IN Operator
Specifies that an attribute in the profile must be equal to any of the values in the defined collection. This is equivalent to logic you could create by combining Equals and Or operators.
Example:
State in TX
, CA
, AZ
.
And, Or Operators
Use these to form complex boolean logic in a match rule.
"and": {
"exact": [
"configuration/entityTypes/filmedContent/attributes/Producer"
],
"fuzzy": [
"configuration/entityTypes/filmedContent/attributes/Name"
]
}
This configuration expresses the logic:
Match only if both conditions are met: the Producer matches exactly and the Name is a fuzzy match.In boolean terms:
Producer (exact
) AND Name (fuzzy
).
"or": {
"and": [
{
"fuzzy": [
"configuration/entityTypes/filmedContent/attributes/Name"
]
},
{
"exact": [
"configuration/entityTypes/filmedContent/attributes/Producer"
],
"fuzzy": [
"configuration/entityTypes/filmedContent/attributes/Distributor"
]
}
]
}
This configuration expresses the logic: Match if either the Name is similar (fuzzy match), or if both the Producer is an exact match and the Distributor is a fuzzy match.In boolean terms:
Name (fuzzy
) OR (Producer (exact
) AND Distributor (fuzzy
)).
These operators can be nested to construct layered match rules using logical groupings.
NotEquals Operator
Specifies that an attribute in the profile must not be equal to a certain value. For example, suppose you only want to compare persons outside of California. You might specify notEquals
on the state field for the person's address.
When to use the notEquals
operator
In cases where you wish to exclude certain segments from being used in a match, you will typically use the notEquals
operator.
Example:
In this media and entertainment use-case, records of types episode
and podcast
are prevented from being part of the match candidates.
"rule": {
"and": {
"exact": [
"configuration/entityTypes/filmedContent/attributes/Name"
],
"notEquals": [
{
"uri": "configuration/entityTypes/filmedContent/attributes/ContentType",
"values": [
"episode",
"podcast"
]
}
]
}
}
Since the attribute, contentType
, has notEquals
applied to it, you’re essentially saying - I don’t want to consider any records that have certain values of contentType
, specifically episode
and podcast
. Thus it would make no sense to waste computing resources to find records based on contentType
, and add them to the candidate pool, just to have them excluded anyway by the notEquals
operator.
Key takeaway: Anytime you use the notEquals
operator, use the ignoreInToken
element in your match group to suppress token generation for the attribute referenced by the notEquals
operator.
"ignoreInToken": [
"configuration/entityTypes/filmedContent/attributes/ContentType"
]
This prevents unnecessary generation of tokens for excluded values, improving match performance.Null Values Operator
Allows you to define values that during execution of a match rule, will be replaced with <null>
, which prepares the attribute to be properly treated by the ExactOrNull
and ExactOrAllNull
operators.
For example, you could configure this operator to detect NOT SPECIFIED
as the attribute value and replace it with <null>
. Note that the operator considers the entire value, not individual words within the value. So in this example, it will not find NOT
or SPECIFIED
separately and it will not find the string NOT SPECIFIED
as a substring of ITEM NOT SPECIFIED
. If you require the ability to replace substrings then you could use the String Replacement Cleanser, or you could create a custom comparator class that leverages an out of the box comparator class of your choice, but provides you the ability to include a regular expressions (regex) to perform string replacement.
{
"or": {
"nullValues": [
{
"attribute": "configuration/entityTypes/Contact/attributes/FirstName",
"value": "NOTSPECIFIED"
},
{
"attribute": "configuration/entityTypes/Contact/attributes/FirstName",
"value": "NULLVALUE"
}
]
},
"comparatorClasses": {
"mapping": [
{
"attribute": "configuration/entityTypes/Contact/attributes/FirstName",
"class": "com.reltio.match.comparator.BasicStringComparator"
}
]
}
Not Operator
Allows you to form complex boolean logic within your match group. Lets you negate a complete logical structure.
"not": {
"and": {
"exact": [
"configuration/sources"
],
"equals": [
{
"values": ["SFDC"],
"uri": "configuration/sources"
}
]
}
}
Nesting of Logical Operators
Nest logical operators (and
, or
, not
) to build sophisticated boolean matching logic.
Example:
{
"uri": "configuration/entityTypes/Organization/matchGroups/Example1",
"label": "Example1",
"type": "automatic",
"scope": "ALL",
"useOvOnly": "true",
"rule": {
"and": {
"exact": [
"configuration/entityTypes/Organization/attributes/Addresses/attributes/AddressLine1",
"configuration/entityTypes/Organization/attributes/Addresses/attributes/City",
"configuration/entityTypes/Organization/attributes/Addresses/attributes/StateProvince",
"configuration/entityTypes/Organization/attributes/Addresses/attributes/AddressType"
],
"equals": [
{
"values": [
"Shipping"
],
"uri": "configuration/entityTypes/Organization/attributes/Addresses/attributes/AddressType"
}
],
"exactOrNull": [
"configuration/entityTypes/Organization/attributes/StoreNumber"
],
"exactOrAllNull": [
"configuration/entityTypes/Organization/attributes/Addresses/attributes/AddressLine2",
"configuration/entityTypes/Organization/attributes/Addresses/attributes/Zip/attributes/Zip4",
"configuration/entityTypes/Organization/attributes/Addresses/attributes/Zip/attributes/Zip5",
"configuration/entityTypes/Organization/attributes/Addresses/attributes/Zip/attributes/PostalCode",
"configuration/entityTypes/Organization/attributes/Phone/attributes/FormattedNumber"
],
"ignoreInToken": [
"configuration/entityTypes/Organization/attributes/Addresses/attributes/Zip/attributes/PostalCode",
"configuration/entityTypes/Organization/attributes/Addresses/attributes/AddressType",
"configuration/entityTypes/Organization/attributes/BuyerLifecycleStatus/attributes/BuyerLifecycleStatus",
"configuration/entityTypes/Organization/attributes/Addresses/attributes/AddressLine2",
"configuration/entityTypes/Organization/attributes/Addresses/attributes/Zip/attributes/Zip4",
"configuration/entityTypes/Organization/attributes/Addresses/attributes/StateProvince"
],
"notEquals": [
{
"values": [
"Virtual Account",
"Assigned Account"
],
"uri": "configuration/entityTypes/Organization/attributes/BuyerLifecycleStatus/attributes/BuyerLifecycleStatus"
}
],
"in": [
{
"values": [
"SAP",
"SFDC"
],
"uri": "configuration/sources"
}
],
"or": {
"exactOrNull": [
"configuration/entityTypes/Organization/attributes/DUNSNumber"
],
"exactOrAllNull": [
"configuration/entityTypes/Organization/attributes/DUNSNumber"
]
},
"not": {
"and": {
"exact": [
"configuration/sources"
],
"equals": [
{
"values": [
"SFDC"
],
"uri": "configuration/sources"
}
]
}
}
}
},
"scoreStandalone": 0,
"scoreIncremental": 0
}
This rule includes records only if all primary address fields match exactly, the address type is Shipping
, and specific other conditions are met — including either of the DUNS
number conditions.