Skip to main content
A rule’s conditions is a logical group of one or more conditions:
"conditions": {
  "operator": "AND",
  "rules": [ { "type": "METRIC",  }, { "type": "COLUMN",  } ]
}
  • operatorAND (all must match) or OR (any).
  • rules — a list of metric or column conditions.

Metric conditions

Compare an analytics metric against a threshold.
{
  "type": "METRIC",
  "metricId": "<uuid>",
  "conditionOperator": "LOWER_OR_EQUAL",
  "thresholdValue": 7,
  "periodFilter": { "type": "LAST_30_DAYS" }
}
FieldMeaning
metricIdA metric from the catalog (e.g. days of stock, inventory turnover, gross sales, risk score, sales trend %).
conditionOperatorSee operators below.
thresholdValueThe comparison value.
periodFilterOptional time window (e.g. LAST_7_DAYS, LAST_30_DAYS, THIS_MONTH, ALL_TIME).
Operators: LOWER_THAN, LOWER_OR_EQUAL, GREATER_THAN, GREATER_OR_EQUAL, EQUAL, NOT_EQUAL, TOP_PERCENT, BOTTOM_PERCENT.
For TOP_PERCENT / BOTTOM_PERCENT, thresholdValue is a percentile cutoff in (0, 100] evaluated across the entities in scope (e.g. “top 10% by sales”).

Column conditions

Test a gold/silver column value directly.
{
  "type": "COLUMN",
  "columnId": "dim_products.gender_full_path_1",
  "columnOperator": "STARTS_WITH",
  "value": "M",
  "secondaryValue": null
}
FieldMeaning
columnId"<table>.<column>" (e.g. dim_products.name).
columnOperatorDepends on the column’s data type — see below.
valueThe comparison value (string / number / boolean).
secondaryValueUpper bound for BETWEEN; ignored otherwise.

Operators by data type

EQUALS, NOT_EQUALS, CONTAINS, NOT_CONTAINS, STARTS_WITH, ENDS_WITH, MATCHES_REGEX, IS_EMPTY, IS_NOT_EMPTY.

Value-less operators

IS_EMPTY, IS_NOT_EMPTY, IS_TRUE, IS_FALSE take no value — the builder hides the value input for them. BETWEEN is the only operator that uses secondaryValue.
Metric and column conditions can be mixed in the same rule under one operator (AND/OR), e.g. “days of stock ≤ 7 AND gender starts with M”.