Skip to content

Feature Flag Rule

A feature flag rule is part of a feature flag's targeting section. It describes which values shall be returned as a feature flag's evaluation value in case certain conditions are met.

For each feature flag subtype (boolean, number, string) exist separate rule types:

All feature flag rule types share some properties. These shared properties are explained below.

Schema

json
{
  "enabled": true,
  "conditionSet": { 
    // condition set content 
  },
  
  // subtype specific attributes ...
}

Attributes

enabled

  • Type: boolean
  • Required

A rule can be turned on/off individually. The following table describes when a rule is evaluated as part of a feature flag evaluation:

featureFlag.targeting.enabledrule.enabledIs rule evaluated?
truetrueyes
truefalseno
falsetrueno
falsefalseno

conditionSet

  • Type: ConditionSet
  • Required

The rule's condition set describes the conditions to be checked. If the condition set evaluates to true, the rule is seen as a "match", and the valuesOnMatch of the subtypes are used as the feature flag evaluation result/value.

For more details, check out Condition Set.

Subtypes

Released under the MIT Licensed