Scoring
Scoring (scoring)
Evaluate weighted conditions to produce a composite score.
Analytics json
Minimal example
actions: - scoring: {}JSON
{ "actions": [ { "scoring": {} } ]}Contents
Fields
| Field | Type | Required | Description |
|---|---|---|---|
description | string | describe this step. | |
condition | lua-expression (string) | Only run this action if the specified condition is met. Examples: 2 * count() | |
rules | Rules[] | Ordered scoring rules. | |
normalization | Normalization | Normalization strategy applied to the aggregated score. Allowed values: none, summation, average, percentile | |
output-field | field (string) | Field that receives the final score (defaults to ‘score’). Examples: data_field | |
max-score | number (string) | Optional cap applied after normalization (parsed as a floating point value). Examples: 42, 1.2e-10 |
Schema
Rules Fields
| Field | Type | Required | Description |
|---|---|---|---|
condition | lua-expression (string) | ✅ | Condition that determines whether the rule applies. Examples: 2 * count() |
weight | number (string) | ✅ | Weight assigned to the rule when the condition is true (parsed as a floating point value). Examples: 42, 1.2e-10 |
label | string | Optional label recorded when the rule fires. | |
score | number (string) | Optional explicit score override instead of weight (parsed as a floating point value). Examples: 42, 1.2e-10 |
Normalization Options
| Value | Description |
|---|---|
none | None |
summation | Summation |
average | Average |
percentile | Percentile |