> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getflowpilot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating an experiment

> Define a control and a challenger, split traffic, pick a confidence target, then save as a draft or launch immediately.

You create an experiment with a short wizard: pick the placement, define the two variants and their traffic split, choose a confidence target, then review and launch. This page walks through each step using the real field labels.

## Before you start

You need:

1. **At least two published flows.** Each variant points to a published flow version. Draft-only flows do not appear in the picker. See [Managing flows](/dashboard/flows).
2. **A placement with no active experiment.** A placement can host only one running or paused experiment at a time. Placements that already have one are hidden from the picker.

## Open the wizard

There are two ways in:

* Click **New Experiment** on the Experiments page. You pick the placement in step 1.
* Open a [placement's](/dashboard/placements) detail page and start an experiment from there. The placement is **pre-selected and locked** in the wizard.

The dialog is titled **New Experiment** and runs through four steps: **Basics**, **Variants**, **Settings**, and **Review**.

## Step 1: Basics

<Steps>
  <Step title="Experiment Name (required)">
    A descriptive name, for example `Onboarding Length Test`. Must be at least 3 characters.
  </Step>

  <Step title="Description (optional)">
    A note for your team. The placeholder prompts you with "What hypothesis are you testing?".
  </Step>

  <Step title="Placement (required)">
    Pick the placement this experiment runs on. Placements that already have an active experiment are not listed. If you opened the wizard from a placement page, this field is locked.
  </Step>
</Steps>

## Step 2: Variants

You compare two variants:

* **Control** (labeled **A**, **Baseline**) is the current experience to measure against.
* **Variant B** is the new experience you want to test.

For each, use **Select Flow** to choose a published flow. The same flow cannot be used for both variants. You need at least two published flows for this step to work.

### Traffic split

Set how traffic divides between the two variants. Use a preset (**50/50**, **70/30**, **80/20**) or drag the slider, which moves in steps of 5. The two percentages always total 100. A 50/50 split is recommended for most tests because it reaches significance fastest.

<Warning>
  Both variants must point to flows that are **published**. A draft flow has no published version to serve, so it cannot be used in an experiment. Publish the flow first, then select it.
</Warning>

## Step 3: Settings

<Steps>
  <Step title="Audience (read-only)">
    The experiment inherits its audience from the placement. To change who sees the test, edit the placement's audience filter. This field is shown for reference and cannot be edited here.
  </Step>

  <Step title="Primary Metric">
    **Completion Rate**, the percentage of enrolled users who finish the flow. This is the only metric available today.
  </Step>

  <Step title="Statistical Confidence">
    The confidence threshold at which results are considered significant: **90%** (faster, slightly higher risk), **95%** (the default, recommended), or **99%** (needs more data). Higher confidence requires more enrollments.
  </Step>
</Steps>

The step ends with a **Summary** that restates the two flows, the placement, the traffic split, the audience, the metric, and the confidence target.

## Step 4: Review and launch

The final step runs a pre-flight checklist. Resolve any failing checks before launching. You then have two choices:

* **Save as Draft** stores the experiment without enrolling anyone. The placement keeps serving its default flow. You can start it later from the detail page.
* **Create & Start** creates the experiment and starts it immediately, so users begin enrolling right away.

<Note>
  Every experiment is created as a **draft** on the backend. **Create & Start** simply creates it and then starts it in one action. If the create succeeds but the start fails, the experiment is left as a draft in your list with a toast telling you, so you never lose work.
</Note>

## Editing an experiment

Editing is limited on purpose. From the detail page, **Edit** opens the same wizard in edit mode with three steps (no Review). You can change the **name**, **description**, **primary metric**, and **target confidence**.

You **cannot** change the **variants**, their **flows**, the **traffic split**, or the **placement** through this dialog. Those define the test, and changing them mid-flight would invalidate the data you have already collected. To test a different setup, **Duplicate** the experiment (this copies the structure into a fresh draft named `... (Copy)`) and adjust the copy.

## Common mistakes

* **Traffic does not sum to 100.** The wizard enforces this, but if you build the request by hand the backend rejects anything other than 100.
* **A variant flow is not published.** The picker only lists published flows; selecting a draft is not possible, and a flow you forgot to publish simply will not appear.
* **Both variants use the same flow.** The two variants must point to different flows, otherwise there is nothing to compare.
* **The placement is already in use.** If another experiment is running or paused on the chosen placement, the launch fails with a "placement in use" error and sends you back to step 1. Stop or pause the other experiment first.

## Related pages

* [Experiments](/dashboard/experiments)
* [Running an experiment](/dashboard/running-experiments)
* [Reading results](/dashboard/reading-results)
* [Creating placements](/dashboard/creating-placements)
