conditions is a logical group of one or more conditions:
operator—AND(all must match) orOR(any).rules— a list of metric or column conditions.
Metric conditions
Compare an analytics metric against a threshold.| Field | Meaning |
|---|---|
metricId | A metric from the catalog (e.g. days of stock, inventory turnover, gross sales, risk score, sales trend %). |
conditionOperator | See operators below. |
thresholdValue | The comparison value. |
periodFilter | Optional time window (e.g. LAST_7_DAYS, LAST_30_DAYS, THIS_MONTH, ALL_TIME). |
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.| Field | Meaning |
|---|---|
columnId | "<table>.<column>" (e.g. dim_products.name). |
columnOperator | Depends on the column’s data type — see below. |
value | The comparison value (string / number / boolean). |
secondaryValue | Upper bound for BETWEEN; ignored otherwise. |
Operators by data type
- String
- Date
- Boolean
- Numeric
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”.
