---
title: Manage rules
slug: feature-experimentation/docs/manage-rules-end-user
docTags: 
createdAt: 2026-08-05T20:39:56.000Z
---

- 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.

:::hint{type="info"}
There is a limit of 100 rules per ruleset (100 rules across a particular [flag](docId\:F8tdFPnxECabBXsQkBqDt) and [environment](docId\:YpSOMYlWkUccLCL-uB-ZE)).
:::

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](docId\:zfzSgUawnKhGc59SYlTbL).

See [New flag and rule lifecycle management FAQs](docId\:Bog7o25N6pDj3-2qpsVGn) for information.

:::hint{type="info"}
When you create a flag, Feature Experimentation automatically assigns you the **Admin** role for that flag using [granular permissions](docId\:VfzalP5Ep4rqE-gTd6p7m). This ensures you can immediately manage rules associated with that flag.
:::

## Start a rule

Go to **Flags** and select your flag. Select the environment.

### From the ruleset

1. Click **More options (...)** on the rule.
2. Select **Run**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/DIfXVVV0XETucGmpndNcU_ruleset-run-option-in-rule-actions-menu.png" size="60" isUploading="false" width="1263" height="901" darkWidth="1263" darkHeight="901" showCaption="false"}

### From the rule details

1. Click the rule.
2. Click **Run**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/A9T_1Kn1FGcZNyvbRNzCV_ruleset-run-button-in-paused-rule-panel.png)

### Rule in a draft or paused ruleset

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

Click **Ok**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/sfXhFPFrzTBnXXYM8ApA8_ready-to-run-ready-to-run-confirmation-dialog.png" size="40" isUploading="false" width="744" height="443" darkWidth="744" darkHeight="443" showCaption="false"}

Your rule's status is updated to **Ready to Run**, like in the following screenshot: 

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

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/lmAvOKdvl2osh2LZ6huQF_rule-rule-status-set-to-ready-to-run.png" size="50" isUploading="false" width="842" height="1098" darkWidth="842" darkHeight="1098" showCaption="false"}

### 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.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/mnhnM9ckC6eW7uFXSS20d_ruleset-running-rule-and-ruleset-status.png)

## 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**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Vquq0MVZwCmJKwnbw-qBx_ruleset-pause-option-in-rule-actions-menu.png)

### From the rule details

1. Click the rule.
2. Click **More options (...)**.
3. Select **Pause**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/W9OrNJO_15SY2werDT82L_rule-pause-option-in-rule-panel-menu.png)

## Conclude a rule

Setting a rule to **Concluded** ends the experiment and removes it from the [datafile](docId:3LmHm4b3kTxKBuoR93KN8). 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](docId\:A8ewMTwBn94nWlQwot7BY). This helps track whether the experiment had a positive, negative, or inconclusive result.

:::hint{type="warning"}
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**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Pdq1Dc1rYk_LfttdB_1yv_ruleset-conclude-option-in-rule-actions-menu.png)

3. Select an option for the **Results Outcome**.
4. (Optional) Add a brief conclusion about what you learned about the experiment
5. (Optional) Toggle **Conclude and deploy** on. See [Conclude and deploy](docId\:h1v5aDhM3KPn1_SyZ6e6W).
6. Click **Conclude**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Rr-r5FiYYUZSU8rWNZSoo_conclude-conclude-experiment-dialog.png" size="40" isUploading="false" width="831" height="946" darkWidth="831" darkHeight="946" showCaption="false"}

### From the rule details

1. Click on the rule.
2. Click **Conclude**.
3. Follow steps three through six from the previous [From the ruleset](docId\:h1v5aDhM3KPn1_SyZ6e6W) section.

### Conclude and deploy

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**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/93-g7DVrediCnsX2W4zJE_deploy-variation-deploy-variation-dialog.png" size="40" isUploading="false" width="833" height="854" darkWidth="833" darkHeight="854" showCaption="false"}

## Duplicate rule across environments

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

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/lIPd68JbM_3cM23RSpsqE_ruleset-copy-rules-from-development-to-production.png" size="60" isUploading="false" width="1288" height="1185" darkWidth="1288" darkHeight="1185" showCaption="false"}

:::hint{type="info"}
[Collaborators](docId\:bNAxj4srKHVczBp27i1DH) outside of your organization cannot create multiple experiments per flag.
:::

## Copy a rule to other environments

To copy a rule to another environment,

1. Click **More options (...)** on the rule.
2. Select **Copy to** ***ENVIRONMENT\_NAME***. For example, **Copy to Production**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/77avUzWQso_ZOgdHJoeSo_ruleset-copy-to-production-and-copy-to-test-options.png)

3. Click **Copy** to confirm.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/D4WU4zktLoKol7-dpNsrc_confirm-copy-confirm-copy-rule-dialog.png)

The rule will be in unsaved Draft status when copied to the Production environment. You can make the necessary changes before clicking **Save**.

## Manage flag rules

You can add, remove, or update your flag's rules anytime. However, you should [pause your flag](docId\:F8tdFPnxECabBXsQkBqDt) before making changes.

:::hint{type="danger"}
You should not [change your experiment while it is running](docId\:IsU8ejnD3mrkAia2mtIOA).
:::

You can configure the following for each rule:

- **Rule name** – Identify the rule. The rule key cannot change after creation.
- **Rule description** – Summarize the rule's purpose for collaborators.
- **Hypothesis** – Document the assumption the rule tests. See [Add hypothesis to a rule](docId\:h1v5aDhM3KPn1_SyZ6e6W).
- **Test plan** – Link or upload the plan that describes how the rule runs. See [Add test plan to a rule](docId\:h1v5aDhM3KPn1_SyZ6e6W).
- **Targeted audiences** – Choose which visitors qualify, based on audience conditions evaluated in order.
- **Traffic ramp percentage** – Set the percentage of the targeted audience that enters the rule.
- **Associated metrics** – Choose the metrics that measure the rule's success. The primary metric determines statistical significance.
- **Traffic distribution mode** – Split traffic across variations manually, or let Stats Accelerator adjust it to reach significance faster.
- **Variations** – Select the flag variations the rule serves, each a set of flag variable values. Click **View image** to see the screenshot attached to a variation. See [Add an image to a variation](docId:1SuXkSw8NF-GUN82Bcwqz).
- **Exclusion groups** – Add the rule to a group so each visitor enters only one experiment in that group.

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

:::hint{type="warning"}
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](docId:3LmHm4b3kTxKBuoR93KN8) updates within a few seconds. Depending on how often your application fetches the datafile, the update may take time to reflect in production.

If you want your rules to update in real-time, use [webhooks](docId\:wEYkX0MfQPUA4vguDXf67) to receive datafile updates.

:::hint{type="danger"}
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](docId\:eH-UMm_rOn_GdGDGLV6__).
:::

## Add hypothesis to a rule

A hypothesis records the assumption a rule tests, so collaborators can understand the experiment intent. The hypothesis is optional.

1. Go to **Flags** > select your flag. Select the environment.
2. Click the rule.
3. Click **Add hypothesis**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/CE2eQkAlUKfHfBVEVZ7qP_rule-add-hypothesis-button-in-rule-panel.png)

4. Enter the expected outcome and reasoning in the **Hypothesis** field. Click **Save Hypothesis**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/NSB1zLVs1VtdeJzVxtxRa_add-hypothesis-add-hypothesis-dialog.png)

5. Click **Save**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/lTqi0N1Y02NPZD92tJLa6_ruleset-saved-hypothesis-in-rule-panel.png)

To update or delete the hypothesis, click **More options (...)**, then select **Edit** or **Delete**. Changes display in the [Change History](docId\:CvMxeG8fRRnvPX_fCGIJK).

## Add test plan to a rule

A test plan records how a rule runs, including duration, success criteria, and rollout strategy. Attach the plan as a link or upload it as a file, so the documentation stays with the rule instead of in a separate tool. The field applies to every rule type and is optional.

To add a test plan:

1. Go to **Flags** > select your flag. Select the environment.
2. Click the rule.
3. Click **Add test plan**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/wZrCwb1AIY91y70kJXDl5_rule-add-test-plan-button-in-rule-panel.png)

4. Select one of the following options:
   - **URL and reference** – Enter the plan link in the **URL** field and a label in the **Reference** field.
   - **Upload from device** – Select a file from your device.
5. Click **Save Test Plan**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/ttCcruXmdXVzlqu_GkMRF_add-test-plan-add-test-plan-upload-dialog.png)

6. Click **Save**.

The reference label or file name displays on the rule details page. To update or delete the plan, click **More options (...)**, then select **Edit** or **Delete**. Changes display in the [Change History](docId\:CvMxeG8fRRnvPX_fCGIJK).

The test plan fields accept the following values:

- **URL** – Link to the test plan. The link text supports up to 2,000 characters.
- **Reference** – Plain-text label for the plan. The limit is 100 characters.
- **Upload from device** – Accepts `.pdf`, `.doc`, `.docx`, and `.md` files up to 10 MB.
