---
title: "Create a headless A/B/n test"
slug: "create-a-headless-abn-test"
abstract: "Learn how to convert a headless personalization into an A/B/n test and configure test variants in SitecoreAI."
---

# Create a headless A/B/n test

> [!important]
> Feature availability is part of a phased rollout. Your organization may not see this functionality yet. It will become available when your environment is included in the rollout.

Create a headless A/B/n test by adding a test variant to an existing headless personalization. When you add the first test variant, SitecoreAI converts the personalization to an A/B/n test. The existing personalization experience becomes the control variant. An A/B/n test can have up to 6 variants in total.

To create a headless A/B/n test:

1. [Create a headless personalization](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/create-a-headless-personalization.html) and and [configure the API response](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/configure-the-api-response-of-a-headless-experience.html) for its single variant..
2. In the **API response** section, click **Create variant** to add a second variant.
3. In the **Convert to A/B/n test** dialog, click **Configure variant**.

   SitecoreAI converts the personalization to an A/B/n test. The existing personalization experience becomes the control variant, and a new test variant is created.

4. [Configure the API response](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/configure-the-api-response-of-a-headless-experience.html) for the new variant.

5. If needed, add more variants. An A/B/n test must have at least 2 variants and can have up to 6 variants in total.
   > [!note]
   > Keep the returned object shape identical across variants and vary only the values your application should render differently.

## Next steps

After you create the A/B/n test and configure its variants, you can:

- [Assign traffic to variants](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/assign-traffic-to-headless-abn-test-variants.html) to define how visitors are distributed across variants.
- Optionally, [edit advanced test options](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/edit-advanced-options-for-a-headless-abn-test.html).
- Optionally, [add a condition](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/add-a-condition-to-a-headless-experience.html) to filter visitors eligible to enter the test.
- [Add a goal](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/add-a-goal-to-a-headless-experience.html) to define how test performance is measured.
- Optionally, [set automated actions](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/set-automated-actions-for-a-headless-abn-test.html) to define what happens based on the test outcome.

