Set temporary variable
Writes a value into a temporary variable. The variable exists only while the rule runs.
| Configuration | Content |
|---|---|
| Name | lowercase letters, numbers, and _ |
| Value | fixed value or expression, required |
The action records an intermediate conclusion for the later conditions to check. The data, irrelevant once the event has been processed, does not occupy a field of the event type:
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"
The variable is not persisted: it is not written to the event, nor carried over to later runs. Its value is valid only during the current run.