Rule structure
Each rule consists of:- Conditions — one or more attribute checks that must all pass (AND semantics)
- Serve — the value to return when all conditions match
Conditions
A condition evaluates an attribute from the evaluation context against a configured value using an operator. Attribute names correspond to the fields inEvaluationContext, or any custom key-value pair you include.
Operators
| Operator | Applies to | Description |
|---|---|---|
equals | string, number | Exact match |
not equals | string, number | Does not match |
in list | string, number | Value is one of a configured set |
not in list | string, number | Value is not in the set |
contains | string | Substring match |
starts with | string | Prefix match |
ends with | string | Suffix match |
greater than | number | Strict numeric comparison |
greater than or equal | number | |
less than | number | |
less than or equal | number | |
exists | any | Attribute is present in the context |
does not exist | any | Attribute is absent from the context |
Multiple conditions (AND)
All conditions in a rule must match. There is no built-in OR within a single rule — to express OR logic, create separate rules.Evaluation context
The evaluation context is the set of attributes you pass when calling a flag hook or method. The SDK makes these available during rule evaluation.- React / React Native
- .NET
Built-in attributes
| Attribute | Type | Notes |
|---|---|---|
customerId | string | number | Primary bucketing key for rollout |
agentId | string | number | Secondary bucketing key; used when customerId is absent |
businessId | string | number | Tertiary bucketing key |
businessBranchId | string | number | |
country | string | Full country name (e.g. "Nigeria", "Ghana") |
city | string | |
platform | string | web, ios, android, api, etc. |
appVersion | string | Semver string — supports prefix matching for version ranges |
Custom attributes
Any key-value pair you include beyond the built-in attributes is passed through to the evaluation engine and can be referenced in targeting rules by name. This allows you to target on application-specific properties — subscription plan, account type, experiment cohort, etc. — without changes to the SDK or the backend.Rule ordering
Rules are evaluated top-to-bottom. The first rule whose conditions all match wins; subsequent rules are not evaluated. Order rules in the dashboard by dragging them to set priority. Example: A rule that matches a specific customer ID should appear before a broader country-level rule, or it will never be reached if the country rule matches first.Fallthrough
When no targeting rule matches, evaluation falls through in this order:- Global rollout — if rollout is configured, the user is deterministically bucketed into the traffic split. The returned reason is
ROLLOUT(boolean) orSPLIT(multi-value). - Default value — if no rollout is set, the flag’s configured default value is returned. The returned reason is
DEFAULT.