How to write a condition
This guide shows you how to build a rule in the visual condition builder. The builder appears on a condition node, on an experience condition, on an initialize-open condition, and on a field option.
Steps
- Choose the node or the field that takes the condition.
- Find the Logic section in the inspector.
- Choose a data source: Responses, Actions, Feature flags, Conditions, or Window Location.
- Choose an operator. The choices include equals, not equals, greater than, and contains.
- Enter a value.
Join more than one rule
- Create an AND group or an OR group.
- Add your rules inside it.
With AND every rule must match. With OR one rule must match. Put a group inside another group to build a larger rule.
Example
To show a step only to a visitor who is on one page and who accepted marketing:
- Create an AND group.
- Add a rule: Window Location → pathname equals
/pricing. - Add a rule: Responses →
marketing_opt_inequalstrue.
The group matches only when both rules are true.
Related
- About conditions and the logic engine — what a rule can read.
- Condition builder — the rule structure.
