Rules config
How to create and manage rules for a flag from the dashboard.
Rule anatomy
Each rule has four fields. Together they form a single condition that must pass for the flag to be active.
| Field | Type | Description |
|---|---|---|
field | string | The context key to inspect. Must match a key the client sends in the eval request body. |
comparator | enum | How to compare the context value to the rule value. See the comparators reference. |
value | string | The target value. For in / not_in, provide a comma-separated list. For semver_*, use a valid semver string. |
priority | integer | Higher numbers run first. Rules with the same priority run in insertion order. |
Creating a rule
- 1 Open a flag from the Flags dashboard and click its name to open the flag detail page.
- 2 In the Rules section, fill in
field,comparator,value, andpriority, then click Add rule. - 3 Rules take effect immediately — no deployment needed. Toggle individual rules on/off without deleting them.
Rule ordering
Rules are evaluated in descending priority order (highest number first). If two rules have the same priority, they run in creation order. Since all rules must pass for a flag to activate, order only matters for short-circuit behaviour: evaluation stops at the first failing rule.
// Example: two rules on early_access
p=10 plan in "pro,enterprise"
p=5 country neq "CN"
Enabling & disabling rules
Each rule has an enabled toggle. A disabled rule is skipped entirely during evaluation — it does not count as a pass or a fail. This lets you stage rules without deleting them.