Skip to main content
A rule node evaluates a list of conditions in order, the first match wins. Each condition has one or more clauses joined by an AND or OR logicOperator. The matching condition’s outputValues are written to the top-level run context. If nothing matches, elseValues is written.

Configuration

{
  "id": "rl-region",
  "type": "rule",
  "data": {
    "label": "Region Two-Layer Check",
    "outputFields": ["region_check", "region_reason"],
    "description": "...",
    "conditions": [
      {
        "id": "cond-allow",
        "logicOperator": "AND",
        "clauses": [
          {
            "variable": "input.declared_country",
            "operator": "in",
            "value": "BR,US,GB,DE,FR,...",
          },
          {
            "variable": "input.declared_country",
            "operator": "not_in",
            "value": "IR,KP,SY,...",
          },
        ],
        "outputValues": {
          "region_check": "pass",
          "region_reason": "On commercial allowlist and not on prohibitions list",
        },
      },
      {
        "id": "cond-fatf",
        "logicOperator": "OR",
        "clauses": [
          {
            "variable": "input.declared_country",
            "operator": "in",
            "value": "TR,VN,PH,NG,KH",
          },
        ],
        "outputValues": {
          "region_check": "manual_review",
          "region_reason": "FATF grey list — handle via compliance review",
        },
      },
    ],
    "elseValues": {
      "region_check": "reject",
      "region_reason": "Country not supported or prohibited by policy",
    },
  },
}

Operators

OperatorUse
==, !=Equality.
>, >=, <, <=Numeric comparison.
in, not_inMembership in a comma-separated value list.
matches, not_matchesRegex.
exists, not_existsPresence check (no value needed).

Output fields

outputFields is the list of variable names the rule writes. Every condition (and the elseValues) must produce values for every declared field — engine refuses partial outputs.

Composing with downstream nodes

The rule’s outputs are top-level on the context, so downstream nodes reference them without a parent path:
{{region_check}}          // not {{rl-region.region_check}}
{{rewrite_valid}}
{{counterpart_edd_required}}
This is intentional — rules are the lightest-weight gates and shouldn’t require a knowing parent.

Rule vs decisionTable

ruledecisionTable
EvaluationFirst-match conditions, each with arbitrary clauses.First-match rows on a fixed column set.
Best forBoolean gates with 2–5 outcomes.Multi-input lookups (band × recommendation → outcome).
Used byRegion gates, address length, AML decision.KYC outcome routers, auto-resolve routers.