Targeting rules let you serve specific values to specific users based on attributes you pass at evaluation time. Rules are evaluated in order; the first rule whose conditions all match determines the returned value. If no rule matches, evaluation falls through to the global rollout or the flag’s default value.Documentation Index
Fetch the complete documentation index at: https://omniflagsdoc.omniretail.app/llms.txt
Use this file to discover all available pages before exploring further.
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 lets you target on application-specific properties like subscription plan, account type, or experiment cohort, without changes to the SDK or 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.