Custom velocity variables

Updated at:

Velocity variables track how frequently an action occurs over a defined time window. Use them to build risk control policies that flag suspicious behavioral patterns — for example, detecting when too many accounts register from the same IP address within one hour.

The typical workflow is:

  1. Create and configure a velocity variable.

  2. Enable the variable so it starts accumulating data.

  3. Reference the variable in a policy rule as a Derived Variable.

Create a velocity variable

In the left-side navigation pane, click Variable Center. On the page that appears, choose Variable Management > Velocity Variable. Then, click Add Velocity Variable.

Configure a velocity variable

Set the following parameters:

ParameterRequiredDescription
Write EventYesThe event to which the velocity variable applies. The variable accumulates data only for this event.
Variable TypeYesThe type of cumulative calculation: count, sum, or maximum value.
Variable NameYesA unique name for the velocity variable.
Variable DescriptionNoA description of the variable's content and logic.
Time WindowThe calculation period. Valid values: Current, Near, and Previous. Units: day, hour, and minute.
Main objectThe primary key for cumulative calculation — the entity you group by (for example, IP address).
Cumulative ObjectThe object being counted or aggregated (for example, registered accounts).

Example: To detect aggregation risk during account registration, set Main object to IP address, Cumulative Object to registered accounts, and Time Window to 1 hour. This counts how many accounts register from the same IP address within one hour.

Note

Velocity variables support optional trigger conditions. When trigger conditions are set, the cumulative calculation runs only when those conditions are met. Click Add Trigger Condition to configure them.

Enable a velocity variable

After configuration, find the variable on the Velocity Variable tab, then click Enable in the Actions column.

The Actions column also provides Edit and Delete buttons to modify or remove existing velocity variables.

Use a velocity variable in a policy rule

When configuring a policy rule, select the velocity variable from Derived Variable as the left object of the rule condition.

For example, set Associated Event to Velocity Variable Demo, Policy Name to IP account aggregation, select the derived variable Accounts per IP in 1 hour as the left object, set the operator to greater than or equal to, and set the right value to 100.