> For the complete documentation index, see [llms.txt](https://docs.hackle.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hackle.io/en/ab-test/group-distribution/ab-variation.md).

# Variation Distribution Process

## Overview

This document explains the process by which a user is distributed to a group in an A/B Test.

## Flow Chart

![](https://143363954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAVlNQhS253reum0Ce94%2Fuploads%2Fgit-blob-8b5a10b6accd13021dccb934a1ac156a0d6b1b3a%2F2814d4c-_2022-07-26__12.12.15_5b6e8f8014241058.png?alt=media)

## Process Details

The A/B Test variation distribution process is as follows:

{% stepper %}
{% step %}

### Check whether the A/B Test exists

If there is no A/B Test, the default group, Variation A, is assigned.
{% endstep %}

{% step %}

### Check whether the user is registered as a test device

Users registered as test devices are assigned to the configured Variation.
{% endstep %}

{% step %}

### Check whether a User Identifier exists

If there is no User Identifier, the default group, Variation A, is assigned.
{% endstep %}

{% step %}

### Check whether the user is excluded by a Mutually Exclusive Group

If the A/B Test belongs to a Mutually Exclusive Group, Hackle checks whether the user is included in that group.

If the user is not in the Mutually Exclusive Group, the default group, Variation A, is assigned.
{% endstep %}

{% step %}

### Check whether the user is a target of the A/B Test

If the user is not a target of the A/B Test, the default group, Variation A, is assigned.
{% endstep %}

{% step %}

### Check the A/B Test status

If the A/B Test is in Draft or Paused status, the default group, Variation A, is assigned.
{% endstep %}

{% step %}

### Check whether the A/B Test is completed

If the A/B Test is completed, the Winner Variation selected when the test was concluded is assigned.
{% endstep %}

{% step %}

### Check whether traffic is allocated through bucketing

Users who are not allocated are assigned to the default group, Variation A.

You can learn about **bucketing** in [Variation Distribution Principle](/en/ab-test/group-distribution/ab-bucketing.md).
{% endstep %}

{% step %}

### Check whether the assigned Variation is dropped

If the user is assigned to a dropped Variation, the default group, Variation A, is assigned.

If it is not dropped, the corresponding Variation is assigned.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hackle.io/en/ab-test/group-distribution/ab-variation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
