---
title: Segments for profiles
related:
  - https://docs.kentico.com/documentation/developers-and-admins/digital-marketing-setup/customer-data-platform.md
  - https://docs.kentico.com/documentation/developers-and-admins/digital-marketing-setup/customer-data-platform/identity-resolution.md
  - https://docs.kentico.com/documentation/business-users/aira.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

> **Warning:** **Preview feature**
>
> Segments and the [customer data platform](https://docs.kentico.com/documentation/developers-and-admins/digital-marketing-setup/customer-data-platform.md) feature as a whole are currently in preview mode. Expect the features to be modified and expanded significantly in upcoming releases, including breaking changes.
>
> Feel free to try the feature out. You can share your feedback directly with the Kentico [Product team](https://roadmap.kentico.com/).

Segments group and organize [profiles](https://docs.kentico.com/documentation/developers-and-admins/digital-marketing-setup/customer-data-platform.md#profile-tracking) with shared characteristics. This allows you to accurately target the profiles in your marketing and personalization initiatives.

The system automatically assigns profiles to segments based on defined conditions. A single profile can belong to any number of different segments.

> **Info:** **Relationship with channels**
>
> Segments are global and shared across all [channels](https://docs.kentico.com/documentation/developers-and-admins/configuration/website-channel-management.md) (e.g., website, email, headless).

You can create and manage segments in the **Segments** application in the Xperience administration when [customer data platform](https://docs.kentico.com/documentation/developers-and-admins/digital-marketing-setup/customer-data-platform.md) is enabled. Available features include the [AIRA Segment condition builder](#aira-segment-condition-builder), which assists users in building conditions using natural language descriptions and a chatbot interface.

## Create a segment

1. Open the **Segments** application.
2. Select **New segment**.
3. Fill in the segment properties:
   - **Segment name**
   - _(Optional)_ **Identifiers** – specify the _Code name_ if you wish to use a different unique identifier than the pre-filled value.
   - **Description** – an optional description of the segment's purpose.
   - **Conditions** – define which profiles belong to the segment using the condition builder. Profiles that match the conditions are included automatically.
     - The [AIRA Segment condition builder](#aira-segment-condition-builder) allows you to create conditions using natural language descriptions and a chatbot interface.
     - You can also [edit conditions manually](#edit-segment-conditions-manually) in a dedicated builder interface.
   - **Scheduled recalculation** – enable to schedule automatic [recalculation](#segment-recalculation) of the segment on a daily basis. This is only recommended if you frequently change a segment's conditions, or regularly perform bulk imports of profiles (e.g., via custom code or database scripts).
4. **Save** the segment.
5. Select **Recalculate segment now**.

After the recalculation finishes, the segment includes all profiles that fulfill the conditions. You can find a list on the segment's **Profiles** tab.

## Segment recalculation

When a profile (or any of its linked entities) is created or updated, the **system automatically** checks if the profile fulfills the conditions of segments and adds or removes the profile accordingly.

However, whenever you modify a segment's condition, you need to recalculate the segment to ensure that it only contains profiles that fulfill the new condition. In this situation, the segment's **Overview** page displays a warning indicating that the current profile list may not reflect the latest conditions.

![Manually recalculating a segment after a condition update](https://docs.kentico.com/docsassets/documentation/segments/segments_recalculate.png "Manually recalculating a segment after a condition update")

To manually run the recalculation, select **Recalculate segment now** in the displayed warning. This option is only available if you have the **Recalculate** [permission](https://docs.kentico.com/documentation/developers-and-admins/configuration/users/role-management.md) for the _Segments_ application. Alternatively, you can wait until a scheduled recalculation occurs.

> **Note:** **Time the recalculation**
>
> If your application is hosting a live website, do not run the recalculation during the site's peak traffic hours. Segment recalculation can be a resource-intensive process that may reduce the application's performance.

> **Tip:** **Schedule automatic recalculation**
>
> If you frequently change a segment's condition, or regularly perform bulk imports of profiles (e.g., via custom code or database scripts), you can schedule automatic recalculation for specific segments:
>
> 1. Open the **Segments** application.
> 2. Select a segment in the list.
> 3. On the **Overview** tab, select **Edit** under the segment's name.
> 4. Enable the **Schedule recalculation** property.
> 5. Select **Save**.
>
> When you enable this option for a segment, the system randomly selects a time between 2 a.m. and 6 a.m. (in the time zone of the server where the application is running). The segment is then recalculated automatically once per day at this time.
>
> The goal of this approach is to run recalculations during off-peak hours, and avoid recalculating multiple segments at the same time.
>
> However, scheduled recalculation is not required in most scenarios. When profiles are updated or created based on natural website activity, the system automatically evaluates segment conditions and adds or removes the profiles accordingly.

## AIRA Segment condition builder

Segments include an AI-powered assistant that helps you build segment conditions using natural language descriptions.

> **Note:** The **Segment condition builder** AIRA feature is disabled by default, and needs to be [enabled](https://docs.kentico.com/documentation/developers-and-admins/configuration/aira-configuration.md#manage-aira-features) by administrators.

With the AIRA Segment condition builder, you can:

- Describe the desired audience in plain language and have AIRA generate the corresponding condition.
- Modify existing conditions by describing the changes you want to make.
- Ask AIRA to explain how a condition works.

![Generating a segment condition from natural language](https://docs.kentico.com/docsassets/documentation/segments/segments_aira_builder.png "Generating a segment condition from natural language")

You can access the AIRA condition builder when [creating a new segment](#create-a-segment) or on the **Overview** tab of an existing segment in the **Segments** application.

Select **Add / Edit condition with AIRA** in the **Conditions** area to open the AIRA interface.

> **Note:** **Limitations**
>
> The Segment condition builder is limited by the condition types that are available for segments. While the builder can help create conditions quickly and efficiently, it cannot generate conditions that would not be possible when [editing manually](#edit-segment-conditions-manually).

## Edit segment conditions manually

You can edit segment conditions manually in a dedicated builder interface if you do not wish to use the [AIRA Segment condition builder](#aira-segment-condition-builder) or if the feature is not [enabled](https://docs.kentico.com/documentation/developers-and-admins/configuration/aira-configuration.md#manage-aira-features).

1. Open the **Segments** application.

2. [Create a new segment](#create-a-segment) or edit an existing one on the **Overview** tab.

3. Edit the condition in the **Conditions** area:
   - If the [AIRA Segment condition builder](#aira-segment-condition-builder) is enabled, expand the **Add / Edit condition with AIRA** menu and select **Add / Edit condition manually**.
   - If the AIRA Segment condition builder is not enabled, select **Add / Edit condition**.

4. The condition builder interface opens. Select **Add condition group**.

5. Choose a condition.

   - Use the search or select categories to find the appropriate condition.

   > **Info:** The text of conditions refers to the _contact_ entity. Contacts internally store the personal details and activities of profiles. Profiles belong to the segment when the condition is fulfilled by their underlying contact.

6. Fill in any required parameters for the condition.

7. Repeat the process to add any number of conditions.
   - Conditions are organized together within condition groups.
   - Select **Add condition group** to create multiple groups. A selector appears above the groups where you can choose if **Any** or **All** of the condition groups need to be fulfilled.
   - To add individual conditions to a group, select **Add another condition**.
   - For each group, you can select if **Any** or **All** of the conditions need to be fulfilled.

8. Select **Apply**.

![Building a segment condition manually](https://docs.kentico.com/docsassets/documentation/segments/segments_manual_builder.png "Building a segment condition manually")

The segment needs to be [recalculated](#segment-recalculation) after you update the condition.
