Operators

Operators are used in conditional rules and suppress_if clauses to compare field values against expected values. AIPC defines eleven operators.

Comparison operators

eq — Equal to

Strict equality. Matches when the field value is exactly equal to the expected value.

{
  "field": "fund_status",
  "operator": "eq",
  "value": "active"
}
// "active" === "active" → true
// "Active" === "active" → false (case-sensitive)

neq — Not equal to

Strict inequality. Matches when the field value is not equal to the expected value.

{
  "field": "fund_status",
  "operator": "neq",
  "value": "closed"
}

gt — Greater than

Numeric comparison. The field value must be strictly greater than the expected value.

{
  "field": "expense_ratio",
  "operator": "gt",
  "value": 0.01
}

gte — Greater than or equal

{
  "field": "risk_rating",
  "operator": "gte",
  "value": 4
}

lt — Less than

{
  "field": "returns.1yr",
  "operator": "lt",
  "value": 0
}
// Triggers when 1-year return is negative

lte — Less than or equal

{
  "field": "confidence_score",
  "operator": "lte",
  "value": 0.5
}

Collection operators

in — Value is in array

Checks if the field value is one of the values in the expected array.

{
  "context": "user.jurisdiction",
  "operator": "in",
  "value": ["US", "CA", "MX"]
}
// Triggers for North American users

not_in — Value is not in array

The inverse of in. Checks that the field value is not in the expected array.

{
  "context": "user.jurisdiction",
  "operator": "not_in",
  "value": ["EU", "UK", "CH"]
}

String operators

contains — String contains substring

Checks if the field value (as a string) contains the expected substring.

{
  "field": "fund_name",
  "operator": "contains",
  "value": "Bond"
}
// Matches "Vanguard Total Bond Market Index Fund"

Existence operators

exists — Field is present and non-null

Checks that the field exists in the payload and is not null or undefined.

{
  "field": "warnings.blackbox",
  "operator": "exists",
  "value": true
}
// Triggers when a black box warning is present

not_exists — Field is absent or null

The inverse of exists. Triggers when the field is missing or null.

{
  "field": "returns.10yr",
  "operator": "not_exists",
  "value": true
}
// Triggers when the fund doesn't have 10-year return data

Type coercion

The runtime does not perform type coercion. Comparisons use JavaScript strict equality and comparison operators. If the payload contains a string "42" and the condition expects a number 42, the eq operator will return false. Providers should ensure their payload types match their condition value types.