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.
Start a rule
Go to Flags > select your flag. Select the environment.
From the Ruleset:
-
Click More options (...) on the rule.
-
Select Run.
From the rule details:
-
Click on the rule.
-
Click Run.
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:
Click Ok.
Your rule's status is updated to Ready to Run.
To update your rule's status to running, set your ruleset's status to Running.
Rule in a running ruleset
If your ruleset is already set to Running, after clicking Run on your rule, your rule is updated to Running. You do not see a confirmation page and your rule will not go into Ready to run status. Instead, your rule will automatically start running.
Stop a rule
Go to Flags > select your flag. Select the environment.
From the Ruleset:
-
Click More options (...) on the rule.
-
Select Pause.
From the rule details:
-
Click on the rule.
-
Click More options (...).
-
Click Pause.
Conclude rule
The Concluded status changes the experiment status and displays it as Concluded in the experiment list. Concluding a rule removes it from the datafile. Setting a rule to Concluded stops serving the variations unless you select Conclude and deploy.
When concluding a rule, you can select the outcome of your rule to note if the rule had a positive, negative, or inconclusive effect on your hypothesis. Also, you can add a summary of your conclusion to recap your findings.
Important
After concluding your rule, you cannot modify that rule.
Go to Flags > select your flag. Select the environment.
From the Ruleset:
-
Click More options (...) on the rule.
-
Select Conclude.
-
Select an option for the Results Outcome.
-
(Optional) Add a brief conclusion about what you learned about the experiment.
-
(Optional) Toggle Conclude and deploy on.
-
Click Conclude.
From the rule details:
- Click on the rule.
- Click Conclude.
- Follow steps 3-6 from the previous From the Ruleset section.
If you toggled Conclude and deploy:
-
Select which variation to direct traffic to from the Variation drop-down list.
-
(Optional) Change the Traffic allocation percentage.
-
Click Deploy.
Duplicate rule across environments
To duplicate a rule across an environment, select Add Rule, click Copy rules from, and select which environment you want to copy the rules from.
Note
Collaborators outside of your organization cannot create multiple experiments per flag. For information, see collaborators.
Manage flag rules
You can add, remove, or update your flag's rules anytime. However, you should turn your flag off before making changes.
Warning
You should not change your experiment while it is running. For information, see Why you should not change a running experiment.
The following are configurable for rules:
- Name
- Description
- Audiences
- Traffic ramp percentage
- 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 that experiment or variation if you use a key not referenced in your code.
To edit a flag rule:
- Click the rule name to open it.
- Change your rule parameters as desired.
- Click Save.
Changing your rules updates your project's datafile within a few seconds. Depending on how often you retrieve datafile updates, it may take some time before your experiments are updated in production.
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 will impact user bucketing, causing users to be bucketed in or unbucketed from this experiment.
For information, refer to How bucketing works.
Updated about 1 month ago