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

# Assign Variants from a Datasource

> Use a CRM Datasource to choose which Variant each customer receives in an Experiment

Use a CRM [Datasource](https://docs.reelevant.com/glossary.md) to choose each customer's Variant in an Experiment, instead of a random draw.

A Global holdout (which keeps a non-personalised [Control](https://docs.reelevant.com/glossary.md) group) or a Continuous A/B test (which compares Variants) can use this method.

## When to use it

Choose **From a datasource** when your CRM already splits customers into random groups, such as a holdout shared across channels.

Otherwise, choose **Random assignment (recommended)**. It assigns Variants at random and is the standard way to measure their impact.

> [!WARNING]
>
> Only random assignment guarantees that results measure the impact of the Variants. Use a Datasource only when the values your conditions use were assigned at random.
>
> If they reflect an existing segment, such as opt-outs, hand-picked groups, behavioural cohorts or regions, results show differences between segments. They do not show the effect of the Variants.

If other channels also use this field, results measure the combined effect of everything that differs between the groups. This holds only when the other channels do not change who reaches this Workflow.

## Set it up

1. Create an Experiment, or edit a **Draft** or **Ready** one, then go to **Variants and allocation**.
2. Keep **Randomization unit** on **Per customer**: a Datasource cannot be used with **Per display**.
3. Under **Variant assignment**, choose **From a datasource**.
4. Under **Datasource**, choose a published CRM Datasource that contains the customer identifier used by your Workflow. This creates one condition per Variant. Changing it later clears the rules of every condition.
5. Under **Who gets each variant**, add at least one rule (field, operator, value) to each Variant's condition. Combine rules with **and/or**.

![Experiment form with Variant assignment set to From a datasource, the causal warning, the Datasource picker and one condition per Variant](https://mintcdn.com/reelevant/Hj4zlGy6MevUkqzg/images/analytics/experiment-datasource-assignment.png?fit=max\&auto=format\&n=Hj4zlGy6MevUkqzg\&q=85\&s=04357e0ae453859b8b15d6ca01790785)

## Who gets each Variant

Conditions are checked in order, and each customer gets the Variant of the first condition they meet. If a customer can meet several conditions, drag the conditions to choose which one comes first.

Each Variant's allocation becomes an **Expected allocation**. It is only an estimate: the Datasource decides who gets each Variant.

A customer is unclassified when they meet no condition, have no row in the Datasource, are anonymous, or their row cannot be read. There is no catch-all condition, so write one condition for every group you want to classify.

Unclassified customers receive a fallback Variant and are not counted in the results.

| Experiment type | Fallback Variant |
| - | - |
| Global holdout | [Treatment](https://docs.reelevant.com/glossary.md) |
| Continuous A/B test | [Reference](https://docs.reelevant.com/glossary.md) |

The Experiment Node reads the customer's CRM row (their line in the Datasource) itself, so you do not need a [Data Node](https://docs.reelevant.com/glossary.md) in the Workflow.

## Example

Your CRM has a field named `holdout_group` that contains `control` or `treatment`, assigned at random. You create a Global holdout and expect 10% of customers in the Control.

| Condition | Variant |
| - | - |
| `holdout_group = control` | Control |
| `holdout_group = treatment` | Treatment |

A customer whose `holdout_group` is empty meets neither condition. They receive the Treatment and are not counted in the results.

The 10% you entered is only an estimate. The `holdout_group` value decides which Variant each customer receives.

## Keep your results reliable

* Use a field whose values were assigned at random and do not change during the Experiment.
* Make every group come from the same random draw.
* If you add another rule, add it to every condition with **and**. For example, adding `country = FR` only to the Control condition breaks the comparison.
* Avoid moving classified customers to another Variant after start.

## Edit while live

The Datasource, conditions, and their order stay editable until the Experiment is concluded. Changes reach new traffic within about a minute.

A customer's Variant changes when you edit the conditions or when their CRM values change. In [Data Exploration](https://docs.reelevant.com/product-guide/analytics/data-exploration.md), that customer appears under each Variant they received, which blurs the difference between Variants.

These moves also bias the results when they depend on the Variant a customer received. You cannot switch between random and Datasource assignment after start.

## Read the results

Results describe classified customers only. They use the number of customers actually seen in each Variant, not the expected allocation.

When statistical significance is shown, a small Control takes longer to reach it.

The Experiment Node shows the same Branches as with random assignment. Once live, its percentages show the expected allocation, not the actual split.

## What's Next?

> **[Experiments](https://docs.reelevant.com/product-guide/analytics/experiments.md)**
>
> Create and manage Experiments in Analytics.

> **[Experiment Node](https://docs.reelevant.com/product-guide/workflows/logic-nodes/experiment.md)**
>
> Use an Experiment in a Workflow.

> **[Condition Node](https://docs.reelevant.com/product-guide/workflows/logic-nodes/conditions.md)**
>
> Build rules to classify customers.
