> ## Documentation Index
> Fetch the complete documentation index at: https://confidence-auth-testing.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Define the Audience

> Learn how to add inclusion criteria to target specific users in rules and segments.

**Define the Audience**

Learn how to add inclusion criteria to target specific users in rules and segments.

[Do this via the API →](/docs/reference/api/how-to-guides/flags/target-with-criteria.md)

The [audience](/docs/capabilities/segments/audience.md) is the set of users or other units that are eligible for a rule or segment.

The **Inclusion criteria** section offers four ways to define your audience:

* **Add attribute**: Target users based on evaluation context fields like country, platform, or version.
* **Add segment**: Target users who belong to a pre-defined [segment](/docs/capabilities/segments/overview).
* **Add holdback**: Include or exclude a random subset of users defined by a [holdback](/docs/capabilities/surfaces/surface-settings.md#holdbacks) on a surface.
* **Add group**: Combine multiple criteria into a logical group with `AND` or `OR` operators.

## Add an Attribute Criterion

**1. Go to where you want to add the criterion in Confidence**

This can be in an already created A/B test, rollout, segment, or rule.

**2. Click + Add attribute**

Click **+ Add attribute** in the **Inclusion criteria** section.

**3. Type in the name of the criterion, and select its type**

**4. Select the appropriate operator**

Click it to unfold the dropdown list.

If Confidence has seen the field before, it autocompletes and the
type populates automatically. The operators available to choose from is
dependent on the type of the field. For example, if the field is a string, the
operator is one of: `is` (equals), `is not` (not equals), `in` (one of many) or
`not in` (not one of many).

> [!NOTE]
>
> The `in` operator behaves differently depending on how the context value is typed:
>
> * **String**: `in` checks whether the entire string equals one of the listed values. It does **not** do substring matching. For example, if `fruit` is the string `"Apple, Banana, Cherry"`, then `fruit in ["Banana"]` will **not** match, because the full string does not equal `"Banana"`.
> * **List of strings**: `in` checks whether any element in the list matches one of the listed values. If `fruit` is the list `["Apple", "Banana", "Cherry"]`, then `fruit in ["Banana"]` **will** match.
>
> If you need to target users based on a comma-separated string, consider changing the context field to send a list of strings instead. Confidence does not support substring matching on strings.

## Add a Segment Criterion

Use a segment criterion to target users who belong to a pre-defined [segment](/docs/capabilities/segments/overview).
This lets you reuse the same audience definition across multiple experiments, rollouts, and rules.

**1. Go to where you want to add the criterion in Confidence**

This can be in an already created A/B test, rollout, segment, or rule.

**2. Click + Add segment**

Click **+ Add segment** in the **Inclusion criteria** section.

**3. Select the segment**

Choose a segment from the dropdown list.

> [!TIP]
>
> Create segments in the **Segments** section of the left sidebar. Learn more in the [Create Segments](/docs/capabilities/segments/create-segments.md) guide.

## Add a Holdback Criterion

Use a holdback criterion to include or exclude a random subset of users defined by a [holdback](/docs/capabilities/surfaces/surface-settings.md#holdbacks).
Holdbacks are configured on [surfaces](/docs/capabilities/surfaces/overview) and represent a stable random subset of users that you can reuse over time.

**1. Go to where you want to add the criterion in Confidence**

This can be in an already created A/B test, rollout, segment, or rule.

**2. Click + Add holdback**

Click **+ Add holdback** in the **Inclusion criteria** section.

**3. Select a holdback**

Choose a holdback from the dropdown list. Only holdbacks from surfaces associated with your experiment are available.

> [!NOTE]
>
> Holdbacks are defined on surfaces. To create a new holdback, go to the surface's settings page. Learn more about holdbacks in the [surface settings documentation](/docs/capabilities/surfaces/surface-settings.md#holdbacks).

## Add a Group

Use groups to combine multiple criteria with `AND` or `OR` operators.
Groups let you build complex targeting logic beyond individual attribute criteria.

**1. Go to where you want to add the criterion in Confidence**

This can be in an already created A/B test, rollout, segment, or rule.

**2. Click + Add group**

Click **+ Add group** in the **Inclusion criteria** section.

**3. Select the logical operator**

Choose `AND` or `OR` to control how criteria within the group combine.

**4. Add criteria to the group**

Add attributes, segments, or holdbacks within the group.

You can nest groups to create arbitrarily complex targeting logic.
For example, you can target users in Sweden `AND` (on iOS `OR` Android).

## Related Resources

> **[Audience Reference](/docs/capabilities/segments/audience.md)**
>
> Deep dive into targeting and allocation

> **[Create Segments](/docs/capabilities/segments/create-segments.md)**
>
> Define reusable user groups

> **[Context Schema](/docs/capabilities/flags/context-schema.md)**
>
> Configure available targeting attributes

> **[Surface Settings](/docs/capabilities/surfaces/surface-settings.md)**
>
> Configure holdbacks and exclusivity groups

> **[Target with Criteria API](/docs/reference/api/how-to-guides/flags/target-with-criteria.md)**
>
> API reference for targeting
