Conditions
The condition is the unit of work of a rule: it evaluates an expression about the event and, when it is true, runs actions.
Parts of a condition
Name: identifies the condition in the panel and in comparisons between versions. Choose something that describes the intent (foreign_card, blocked_customer), not the mechanism.
Expression: results in true or false from the data available at the moment of evaluation:
$amount > 1000 and $issuer_country != "BR"
The expression is written according to the expression syntax and can only use the fields of the event type the rule belongs to.
Actions: from zero to several, executed in order when the expression is true. Actions are the effect of the condition: set a field, look up external data, add a value to a list, run an analysis.
Order and chaining
Conditions are evaluated top to bottom, all of them. Evaluation does not stop at the first satisfied condition: if three conditions are satisfied, all three run their actions.
That order matters because conditions share the same working memory. Each condition is evaluated against the current state of the event, including whatever the previous conditions wrote:
| Order | Condition | Expression | Action |
|---|---|---|---|
| 1 | identify_issuer | $card_bin != null | Enrich: BIN → issuer_id, issuer_country |
| 2 | foreign_issuer | $issuer_country not in ["BR"] | Set field: review = "true" |
Condition 2 only works because condition 1 already filled in issuer_country. If the order were reversed, the field would still be empty at evaluation time.
The same logic applies to the actions within a condition: they run in the order they appear and can be reordered by dragging the rows in the panel.
Condition without actions
A condition may have no actions at all. That is valid, but rare: with no action, the condition produces no effect. The use case is documenting a check that is still being designed, leaving the actions for later.
When a condition is not satisfied
Nothing happens: evaluation moves on to the next condition. Fields a condition would have filled in keep the value they already had (or stay empty), and a later condition can test exactly that absence:
$issuer_country == null
If an action fails
If an action hits an unexpected error while running, the event is still recorded, without the values the rule would produce, and the Glass Data team is notified automatically. Ingestion is never interrupted because of a rule.
Values an action could not resolve are not errors: a lookup with no result, or a blank value, leaves the destination field untouched, and a following condition can handle that absence.