Skip to content

Forced Values, Saved Groups, and Prerequisites

Forced Values, Saved Groups, and Prerequisites

Section titled “Forced Values, Saved Groups, and Prerequisites”

Sometimes you need to force a specific value for a user or group — bypassing percentage rollouts entirely. GrowthBook provides three tools for this: forced-value rules, Saved Groups, and prerequisite features.

A Forced Value rule returns a fixed value to every user who matches the rule’s targeting condition. Useful for: internal QA testers who always get true, a VIP user who always gets a premium string value, or a banned user who always gets false.

To create a forced-value rule:

  1. On the Feature detail page, click Add Rule.
  2. Choose Force Value as the rule type.
  3. Set the Value to return (e.g. true).
  4. Add a Targeting Condition to identify the audience (e.g. email is in list [[email protected], [email protected]]).
  5. Click Save Rule.
  6. Drag this rule above any rollout rules so it is evaluated first.

A Saved Group is a reusable audience definition you create once and reference in many rules. Instead of duplicating the same email list or condition across ten different features, define it once as a Saved Group and use it anywhere.

To create and use a Saved Group:

  1. Go to Settings → Saved Groups.
  2. Click Create Saved Group.
  3. Name it (e.g. beta-testers).
  4. Add members (by attribute value) or define a condition.
  5. Click Save.
  6. When creating a rule on any Feature, choose “In Saved Group” as the operator and select beta-testers.

On the SDK side, all you need to do is pass the correct attributes — the Saved Group logic runs server-side in GrowthBook:

gb.setAttributes({
id: 'user-456',
});
// GrowthBook evaluates whether this user is in the beta-testers Saved Group
const showBeta = gb.isOn('new-checkout');
gb.setAttributes({
  id: 'user-456',
  email: '[email protected]',
});
// GrowthBook evaluates whether this user is in the beta-testers Saved Group
const showBeta = gb.isOn('new-checkout');

A prerequisite (also called a feature dependency) lets you gate one flag on another. For example, you might require that platform-v2 is on before allowing new-checkout to activate. This prevents partial rollouts from creating inconsistent UI states.

To add a prerequisite:

  1. On the Feature detail page, click Add Prerequisite.
  2. Select the parent feature (e.g. platform-v2).
  3. Set the required value (e.g. true).
  4. Click Save. Now new-checkout will only be evaluated if platform-v2 is on for the current user.
What does a forced-value rule do?
Where are Saved Groups managed in GrowthBook?
What does a prerequisite feature do?