Scoring
Scoring (scoring)
Section titled “Scoring (scoring)”Evaluate weighted conditions to produce a composite score.
Analytics json
Minimal example
Section titled “Minimal example”actions: - scoring: {}JSON
{ "actions": [ { "scoring": {} } ]}Contents
Section titled “Contents”A ✓ marks a field that accepts a context variable such as
{{ VARIABLE }}.
Fields
Section titled “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
Section titled “Schema”Rules Fields
Section titled “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
Section titled “Normalization Options”| Value | Aliases | Name | Description |
|---|---|---|---|
none |
none | ||
summation |
summation | ||
average |
average | ||
percentile |
percentile |