Skip to content

Scoring

Evaluate weighted conditions to produce a composite score.

Analytics json

actions:
- scoring: {}
JSON
{
"actions": [
{
"scoring": {}
}
]
}

A ✓ marks a field that accepts a context variable such as {{ VARIABLE }}.

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
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
Value Aliases Name Description
none none
summation summation
average average
percentile percentile