---
title: "Headless personalization and A/B/n testing"
slug: "headless-personalization-and-abn-testing.md"
abstract: "Learn how to use SitecoreAI personalization and A/B/n testing with experiences that are rendered by your application."
---
# Headless personalization and A/B/n testing

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

A headless experience is a personalization or A/B/n test you configure in SitecoreAI and deliver through your own applications.

In SitecoreAI, you define who should receive the experience and what data should be returned. Your application requests that data and decides how to display it.

Because SitecoreAI returns data instead of rendering a page or component, the experience is not tied to a specific website or user interface. Different applications can request the experience and present the returned data using their own components and styling.

For example, the same promotional message could be:

* displayed as a banner on a website
* shown as a card in a mobile app
* presented on a kiosk screen
* used in other front ends that can request and use the SitecoreAI response
  
This separation lets you use headless experiences across websites, mobile apps, kiosks, and other applications that can request and use the SitecoreAI response.

## Personalization or A/B/n test

The number of variants determines whether a headless experience is a **personalization** or an **A/B/n test**.

| Type   | Variants    | When to use | Example  |
| ------ | ----------- |----------- | ------ |
| **Personalization** | 1    | You know what a particular audience should see | A mobile app shows a tailored welcome message to visitors who meet specific geographic conditions |
| **A/B/n test**      | 2 to 6 | You want to compare versions and test a hypothesis | A website compares a standard welcome message with a premium version  |

You do not choose a separate experience type up front. Start with one variant for personalization. Add another variant, and the experience becomes an A/B/n test. If only one variant remains, it becomes a personalization again.

## How a headless experience works

Complete the following steps to deliver a headless experience:

1. Create a headless [personalization](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/create-a-headless-personalization.html) or [A/B/n test](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/create-a-headless-abn-test.html).

2. [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) that your application receives.

3. Optionally, add [conditions](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/add-a-condition-to-a-headless-experience.html) to control who is eligible for the experience.

4. Add at least one [goal](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/add-a-goal-to-a-headless-experience.html) to measure performance.

5. For an A/B/n test, [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), control, [traffic allocation](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/edit-advanced-options-for-a-headless-abn-test.html#traffic-allocation), [assignment method](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/edit-advanced-options-for-a-headless-abn-test.html#assignment-method), and [sample size](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/edit-advanced-options-for-a-headless-abn-test.html#minimum-sample-size).

6. Use **Preview API** to [test the API response](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/test-the-api-response-of-a-headless-experience.html) before launch.

7. [Publish the experience](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/publish-a-headless-experience.html) to start it immediately or schedule it for later.

8. [Run the experience](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/run-a-headless-experience.html) from your application and render the returned data.

9. Monitor the experience using the **Optimization** dashboards. For an A/B/n test, interpret the results after the required sample size has been reached.

## What SitecoreAI and your application do

In a headless experience, SitecoreAI determines what the visitor should receive. Your application controls how and where the experience is displayed.

| SitecoreAI     | Your application
| ------ | -------- |
| Evaluates the visitor and determines eligibility  | Requests the experience                             |
| Selects the personalization response or A/B/n test variant | Uses the returned response     |
| Keeps A/B/n test assignments consistent  | Renders the experience and provides default content if needed |

Your application remains in control of how and where the experience is displayed.


## Get started

* [Get started with a headless personalization](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/get-started-with-headless-personalization.html)
* [Get started with a headless A/B/n test](https://doc.sitecore.com/sai/en/users/sitecoreai/headless-personalization-and-abn-testing/get-started-with-headless-abn-test.html)
