Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.

Dev guideRecipesAPI ReferenceChangelog
Dev guideAPI ReferenceRecipesChangelogUser GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev guide

Manage rules

How to update rules in Optimizely Feature Experimentation.

Rules contain the experiment and targeting logic within a flag. Rules describe what variation the flag should deliver to a given user. A ruleset is the collection of rules associated with a flag.

📘

Note

There is a limit of 100 rules per ruleset (100 rules across a particular flag and environment).

Rules can be in one of the following states:

  • Draft – Rule recently created and never enabled.
  • Ready to Run – Rule is enabled and ready to be delivered, but the associated ruleset is in Draft or Paused state.
  • Running – Rule is enabled and running.
  • Paused – Rule was running and is now paused.
  • Concluded – Rule has concluded, and no further action is necessary beyond reporting progress and delivering a winning variation. See Conclude rule.

See New flag and rule lifecycle management FAQs for information.

📘

Note

When you create a flag, Feature Experimentation automatically assigns you the Admin role for that flag using granular permissions. This ensures you can immediately manage rules associated with that flag.

Start a rule

Go to Flags > select your flag. Select the environment.

From the Ruleset

  1. Click More options (...) on the rule.

  2. Select Run.

    Click run from the more options menu in the ruleset

From the rule details

  1. Click on the rule.

  2. Click Run.

    Click run from the rule

Rule in a draft or paused ruleset

If your ruleset is not set to running, you see a confirmation page explaining your ruleset is still paused:

Ready to run pop up page

Click Ok.

Your rule's status is updated to Ready to Run.

rule in ready to run status

To update your rule's status to running, set your ruleset's status to Running.

Rule in a running ruleset

If the ruleset is already running, clicking Run immediately updates the rule to Running. The rule does not enter Ready to Run status, and no confirmation page is shown.

Running rule and running ruleset

Stop a rule

Go to Flags > select your flag. Select the environment.

From the Ruleset

  1. Click More options (...) on the rule.

  2. Select Pause.

From the rule details

  1. Click on the rule.

  2. Click More options (...).

  3. Click Pause.

Conclude rule

Setting a rule to Concluded ends the experiment and removes it from the datafile. Feature Experimentation stops serving variations unless you choose Conclude and deploy.

When you conclude a rule, you can select the outcome of your rule and add a summary of what you learned from your hypothesis. This helps track whether the experiment had a positive, negative, or inconclusive result.

🚧

Important

After concluding your rule, you cannot modify that rule.

Go to Flags > select your flag. Select the environment.

From the Ruleset

  1. Click More options (...) on the rule.

  2. Select Conclude.

    Conclude from the drop-down list
  3. Select an option for the Results Outcome.

    Conclude page
  4. (Optional) Add a brief conclusion about what you learned about the experiment.

  5. (Optional) Toggle Conclude and deploy on.

  6. Click Conclude.

From the rule details

  1. Click on the rule.
  2. Click Conclude.
  3. Follow steps three through six from the previous From the Ruleset section.

If you toggled Conclude and deploy, complete the following:

  1. Select which variation to direct traffic to from the Variation drop-down list.

  2. (Optional) Adjust the Traffic allocation percentage.

  3. Click Deploy.

    Conclude and deploy page

Duplicate rule across environments

To duplicate a rule to another environment, select Add Rule, click Copy rules from, and select which environment you want to copy the rules from.

copy rule from another environment

📘

Note

Collaborators outside of your organization cannot create multiple experiments per flag.

Manage flag rules

You can add, remove, or update your flag's rules anytime. However, you should pause your flag before making changes.

❗️

Warning

You should not change your experiment while it is running.

You can configure the following for each rule:

  • Rule name.
  • Rule description.
  • Targeted audiences.
  • Traffic ramp percentage.
  • Associated metrics.
  • Traffic distribution mode.
  • Variations.
  • Exclusion groups.

After you create a rule, you cannot change its key.

🚧

Important

Be careful when you are changing experiment parameters.

Do not change your rule unless you are making the corresponding changes in your code. No traffic is sent to the experiment or variation if you use a key not referenced in your code.

To edit a flag rule, complete the following:

  1. Click the rule name to open it.
  2. Change your rule parameters as needed.
  3. Click Save.

Your project’s datafile updates within a few seconds. The update may take time to reflect in production depending on how often your application fetches the datafile.

If you want your rules to update in real-time, use webhooks to receive datafile updates.

Warning

Changing traffic allocation or group assignment for a running experiment impacts user bucketing, causing users to be bucketed in or unbucketed from this experiment.

For information, see How bucketing works.