Add to temporary variable
Increments a temporary variable used as a counter, adding a fixed step to its current value. The variable exists only while the rule runs.
| Configuration | Content |
|---|---|
| Name | lowercase letters, numbers, and _ |
| Step | nonzero integer; default 1 |
Unlike the set temporary variable action, which writes a fixed value or the result of an expression, this action operates on the value already accumulated. A variable not yet set is treated as zero. Each condition increments the counter at most once per run, regardless of the number of criteria that make it true.
The action is suited to counting independent signals and deciding from the accumulated total, without enumerating the combinations of and and or. Each signal corresponds to a condition that increments the same counter, and a later condition evaluates the total:
Condition 1: $amount > 10000 → Add to temporary variable: %pernas (step 1)
Condition 2: $issuer_country != "BR" → Add to temporary variable: %pernas (step 1)
Condition 3: %device_reputation < 30 → Add to temporary variable: %pernas (step 1)
Condition 4: %pernas >= 2 → Set field: revisao = "true"
The counter is not persisted: it is not written to the event, does not appear in the API response, and is not carried over to later runs. Its value is valid only during the current run.