---
title: "Add a condition to a headless experience"
slug: "add-a-condition-to-a-headless-experience.md"
abstract: "Learn how to add conditions to control which visitors are eligible for a headless personalization or A/B/n test."
---

# Add a condition to a headless experience

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

Conditions control which visitors qualify for a headless personalization. If you do not add conditions, the personalization can run for any visitor when the trigger is met.

You can use an out-of-the-box condition or a custom condition created in SitecoreAI. You can combine multiple conditions to further refine the audience.

To add a condition:

1. On the **Configuration** page, in the **Filter** section, click :mdiPlus: **Add conditions**.

2. On the **Conditions** page, do one of the following:
   - Click the plus icon :mdiPlusCircle: to select an [out-of-the-box condition](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize/specifying-variables-for-conditions.html "Specifying variables for conditions") or an existing custom condition.
   - Click :mdiPlus: **Create** to [create a custom condition](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize/create-a-custom-condition.html "Create a custom condition").

3. Configure the condition.

   For example, configure a **Country** condition, so that only visitors in Denmark qualify.

4. Optionally, add more conditions or condition groups to refine the audience.

   > [!note]
   > Conditions reduce the eligible audience. For an A/B test, a narrower audience can increase the time required to reach the calculated sample size.

5. Click **Save**.

The condition is added to the headless experience, and a summary appears in the **Filter** section.
