Set temporary variable

Writes a value into a temporary variable, which exists only while the rule runs.

Configuration Content
Name lowercase letters, numbers, and _
Value fixed value or expression, required

It records an intermediate conclusion for later conditions to check, without occupying a field of the event type with data that is irrelevant once the event has been processed:

Condition 1:  $amount > 10000                    → Set temporary variable: %high_value = "1"
Condition 2:  $issuer_country != "BR"            → Set temporary variable: %foreign = "1"
Condition 3:  %high_value == "1" and %foreign == "1"  → Set field: review = "true"

The value cannot be empty: a temporary variable starts out absent, and that absence is tested by comparing with null. Redefining the same name in a later condition is allowed; the last value assigned wins.

In expression mode, the temporary variable accepts any type of value and is compared according to the type stored: after %risk = %bot.score, the condition %risk >= 50 is a numeric comparison. It is also the only way to store a set for later use:

Condition 1:  $amount > 0                → Run analysis: bot
Condition 2:  %bot.triggered_count >= 1  → Set temporary variable: %cells = %bot.triggered_cells
Condition 3:  "email_velocity" in %cells  → Set field: review = "true"