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.
Flag keys
Every flag has a key that is unique within its project. When evaluating a flag from an SDK, the key is fully-qualified with the project key:charge-delivery-fee in the checkout project is referenced as:
Flag types
The flag type determines the shape of its value and how the SDK returns it. Set the type when creating the flag. It cannot be changed afterwards without re-creating the flag.| Type | SDK return type | Typical use cases |
|---|---|---|
boolean | bool / boolean | Feature gates, kill switches, A/B experiments |
string | string | UI variants, copy testing, configuration by name |
number | number / double | Numeric thresholds, price multipliers, capacity limits |
object | Record / object | Structured configuration payloads |
GetString on a number flag) returns the caller-supplied default with reason TYPE_MISMATCH. This is a programming error and should be caught in development.
Environments
Each flag is independently configured per environment. The same flag key can have different rollout percentages, default values, and targeting rules indevelopment, staging, and production.
Enabled / disabled
A flag marked as disabled always returns its default value, regardless of rollout configuration or targeting rules. The reason code returned isSTATIC.
Disabling a flag is the fastest way to globally turn off a feature. No code change, no deployment. The updated snapshot reaches SDKs within the next polling cycle (typically under two minutes).
Disabled flags are excluded from the snapshot entirely. The SDK treats them as not found and returns the caller-supplied default with reason
FLAG_NOT_FOUND. For boolean flags the effect is identical since both paths return false.Default value
The default value is what the SDK returns when:- The flag is not found in the snapshot (flag disabled, not yet created, or wrong environment)
- No targeting rule matches and no rollout is configured
false. There’s no configuration option for this.
For non-boolean flags, the default value is set per environment in the dashboard’s Targeting tab and is included in the snapshot.
There are two separate defaults to understand:
| Default | Controlled by | When used |
|---|---|---|
| Flag default value (dashboard) | Dashboard, per environment | No rule matches and no rollout is configured |
| Caller default (SDK call site) | Code | Flag not in snapshot, type mismatch, SDK not ready |
false.
Rollout
Rollout controls which users receive the flag’s active value when no targeting rule matches. Bucketing is deterministic: the same user always lands in the same bucket for the same flag, across all restarts and platforms.Boolean flags
A single percentage (0–100%). Users within the bucket receivetrue; all others receive false (the default). Setting rollout to 0% disables the flag for all users while still counting as enabled. Setting it to 100% enables it for all users globally.
Non-boolean flags
A percentage-weighted distribution across two or more values. For example:| Value | Weight |
|---|---|
"red" | 20% |
"blue" | 80% |
Rollout requires a bucketing key in the evaluation context (
customerId, agentId, etc.). Without a bucketing key, the SDK cannot determine which bucket the user belongs to and returns the default value with MISSING_TARGETING_KEY.Targeting rules
Rules let you override the rollout and serve specific values to specific users based on their attributes. Rules are evaluated in order; the first match wins. If no rule matches, evaluation falls through to rollout, then to the default value. See Targeting for the full reference on operators, conditions, and rule structure.Archiving
Archived flags are excluded from the snapshot and no longer evaluated. Archiving is a soft delete: the flag stays in the database and can be restored. Use archiving when a flag is permanently removed from the codebase; use disabling for temporary deactivation. Remove the evaluation call from your code before archiving to avoidFLAG_NOT_FOUND noise in your logs.