---
title: Build real-time audiences in ODP
slug: data-platform/docs/build-real-time-audiences-in-odp
docTags: 
createdAt: 2026-08-10T12:05:20.000Z
---

Optimizely Data Platform's (ODP's) real-time audience builder uses the ODP GraphQL API, letting you segment customers in real time and further personalize your customer's web-based experience. You can create custom-built, real-time audiences using the ODP [Real-Time Audiences API](../../Audiences/realtimesegments-api-usage.mdx) or through the [Audiences page](docId\:chCPcgJQ5k5t6nUgnnd43)[ ](docId\:chCPcgJQ5k5t6nUgnnd43)in the ODP application.

Use real-time audiences:

- For customer events within the last 28 days.
- To integrate with Optimizely Feature Experimentation, Optimizely Web Experimentation, Optimizely Content Management System (CMS) 11 and 12 visitor groups, or Optimizely Campaign. See [Use ODP real-time audiences in other Optimizely products.](docId\:chCPcgJQ5k5t6nUgnnd43)

:::hint{type="info"}
**Note**

If you want to use data greater than 28 days old or use audiences for ODP reports, data sync activations, and campaigns, use the standard audiences on the **Customers > Audiences** page (see [Create standard audiences](docId\:NANHdxpeOJqww6o4qGffi)). You can also save event data to a customer's profile as a custom attribute to retain the data beyond the 28-day retention period (see [Manage custom fields](docId\:xSe13VUhsS-w2QE-GUxIZ)). 
:::

## Real-Time Audiences API

All audiences created using the [Real-Time Audiences API](../../Audiences/realtimesegments-api-usage.mdx) display on the **Audiences** page in addition to all pre-defined and custom-built audiences. You cannot edit, copy, or delete audiences that were built with the API in the real-time audience builder. When you view an audience built using the API, a message displays above the code for that audience.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/oVNsq6MO-kFdXLYxpU-x4-20260720-145614.png)

If you need an audience ID to use in the Real-Time Audiences API:

1. Go to **Customers > Audiences**.
2. Select the desired real-time audience.
3. Click **Copy Audience ID**.

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/uCWlV4E-0Xq8eftOZrmQX-20260720-145614.png)

### Data latency and freshness

Data latency is the time it takes for data to become available to you after an event occurs. The data latency for real-time audiences is less than 90 seconds, with most requests taking under 10 seconds, which means your customer data refreshes in real-time, giving you the most accurate view of your audiences. Only 0.001% of requests experience a data latency greater than 90 seconds.

## Create a real-time audience

1. Go to **Customers > Audiences.**
2. Choose **Real-Time Audience** from the **New Audience** drop-down list.

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/A9xsVf3Cvsg_ymDfVm5Ca-20260720-145614.png)
3. Enter an **Audience Name** and click **Create**. You are redirected to the real-time audience builder. 
4. Click **Add Attribute Conditions** or **Add Event Conditions**. You can use the search bar to find specific attributes or events.

   :::hint{type="info"}
   **Note**

   This creates a [condition group](docId\:chCPcgJQ5k5t6nUgnnd43) for whichever type you select (attribute or event).
   :::

   - **Attribute Conditions** – Anything that identifies a customer, such as their name, age, city, last seen email, user ID in ODP, and so on.
   - **Event Conditions** – Actions that a customer takes with your brand. For example, opening an email, adding items to their cart, viewing a page on your site, viewing product details on your site, and so on.
5. Complete the condition as desired. You can also add more attributes or events within the condition group by clicking **Add Attribute** or **Add Event**.

   :::hint{type="info"}
   **Note**

   Within each group, you can only add conditions of the same condition type you originally selected for the group (attribute or event). For more information on how to build your desired conditions, see [Real-Time audience components](docId\:chCPcgJQ5k5t6nUgnnd43).
   :::
6. Click **Save Audience** when you are done. The summary and status of your audience displays.

## Real-Time audience components

Real-Time audiences have a variety of grouping and filtering options. For information on the structure and filtering options for a real-time audience, see the sections below:

- [Condition groups](docId\:chCPcgJQ5k5t6nUgnnd43)
- [Individual event or attribute conditions within condition groups](docId\:chCPcgJQ5k5t6nUgnnd43)
- Options only available for event conditions:
  - [Define order of events](docId\:chCPcgJQ5k5t6nUgnnd43)
  - [Add additional filters to individual event conditions](docId\:chCPcgJQ5k5t6nUgnnd43)
  - [Add exclusions](docId\:chCPcgJQ5k5t6nUgnnd43)

### Condition groups

At the highest level, conditions are organized in groups. **Add Attribute Conditions** creates an attribute condition group. **Add Event Conditions** creates an event condition group.

Each condition group starts with one of the following filters, depending on the condition group type (attribute or event):

- **Attribute conditions** – **\[Include/Exclude]** people who match **\[all/any]** of these attributes
- **Event conditions** – **\[Include/Exclude]** people who have done **\[all/any]** of these events

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/XOmLo7IDQ7hcxHy4TH5zt-20260720-145614.png)

For both of the previous filtering statements, select if you want to **include** or **exclude** customers who match **all** or **any** of the filters in the condition group.

Selecting **all** uses "and" logic for the rest of the filters in the condition group, meaning customers must match all of the filters in the condition group. It also populates an additional drop-down list only for event condition groups, with **in any order** and **in this order** options. Select **in any order** if it does not matter in which order customers match each event. Select **in this order** to define the order in which customers must match each event.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/LhiiIAP9rB-ff-VldNwvt-20260720-145614.png)

Selecting **any** uses "or" logic, meaning customers must match at least one of the filters in the condition group.

### Add events or attributes within condition groups

After you select the desired **include**/**exclude**, **all**/**any**, and **in this order**/**in any order** filters, complete the rest of the conditions in each condition group. For each condition:

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/UEKDsPBKmDxSGx2kWRIgU-20260720-145614.png)

1. Select an attribute or event from the first drop-down list.
2. Select the qualifying term from the second drop-down list (for example, **is exactly**, **is at least**, **is**, **is not known**, **in the last**, **between**, **contains**, and so on).
3. Enter the desired value for the attribute or event that you selected in step 1.
4. Select the time unit (**minutes**, **hours**, or **days**).

   :::hint{type="info"}
   **Note**

   Only available for event conditions. The maximum is 28 days.
   :::

As described in step 6 of the [Condition groups](docId\:chCPcgJQ5k5t6nUgnnd43) section, you can continue to define attributes or events within condition groups by clicking **Add Attribute** or **Add Event**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/XTTnYk45T0rc8fa5BxSnD-20260720-145614.png)

You can also continue to add more condition groups to your audience by clicking **Add Attribute Conditions** or **Add Event Conditions**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/9bzE2u0GPRxuxcZW0s6jM-20260720-145614.png)

### Additional filters for event conditions

For each event condition, you can click the filter icon to **Add Count** or **Add Filter**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/s67xB-t4U1vZ3OAlqbV1m-20260720-145614.png)

Select **Add Count** to define the number of times you want customers to match the corresponding event. For example, if the event is **App View**, you can define how many times you want customers to view the app to qualify for the audience.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/yjgs-JBg6CiLOmNjwIqIs-20260720-145614.png)

Select **Add Filter** to define a specific property to further filter customers that match the corresponding event. For example, if the event is **App View**, and you define a filter on that event for **Campaign ID**, then customers who have viewed the app within your specified time and belong to the defined campaign would qualify for the audience.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/C5RF91Q6qVJsPTjJnuX27-20260720-145615.png)

### Add exclusions for event conditions

When you [set a specific order](docId\:chCPcgJQ5k5t6nUgnnd43) for your event condition group, an additional option displays to **Add Exclusion**.

1. Click **Add Exclusion** and select the desired event from the drop-down list.

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/UZKXgTQ7ROES1639svqOE-20260720-145614.png)
2. Select one of the following options in the next drop-down list:
   - **with anything** – Excludes customers who have not matched the selected event since step 1. For example, if you select **App Uninstall success** for your exclusion event, the audience does not include customers who have uninstalled the app at any point, even if they qualify for the other conditions in the audience.
   - **with the same** – Excludes customers who have matched the selected event and property since your chosen step. This option displays two additional drop-down lists: **Select a property** and **step**. For example, if you select **App Uninstall success** for your exclusion event, **Email Sent** for the property, and **step 1**, the audience does not include customers who have uninstalled the app with the same email sent from step 1.
3. Continue to add exclusions as desired, or remove any that you no longer want.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/WYnYLfgz3YfcCPKgzkDzQ-20260720-145614.png)

:::hint{type="info"}
**Note**

Exclusions only apply to one event condition group. They do not affect any other condition groups in the audience. You can also add exclusions as an entire condition group. See [Condition groups](docId\:chCPcgJQ5k5t6nUgnnd43).
:::

## Edit a real-time audience

:::hint{type="info"}
**Note**

You cannot edit real-time audiences that are pre-defined or that you built using the Real-Time Audiences API.
:::

1. Go to **Customers > Audiences**.
2. Either click the name of the real-time audience or select the options menu **(...) > Edit**. If you click the name of the audience, you must click **Edit Audience** to begin editing the audience. If you select **(...) > Edit**, the edit view displays automatically.

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/oUpFIgzKBL_Wa-G8jdVwH-20260720-145614.png)
3. Edit the audience as desired. For example, you can delete conditions or entire condition groups, add attributes or events within condition groups, add new condition groups, and so on.
4. Click **Save Audience**. The summary and status of your audience displays.

## Copy a real-time audience

:::hint{type="info"}
**Note**

You cannot copy real-time audiences that are pre-defined or that you built using the Real-Time Audiences API. You can copy the [Audience ID to use in the Real-Time Audiences API](docId\:chCPcgJQ5k5t6nUgnnd43).
:::

1. Go to **Customers > Audiences**.
2. Click the name of the audience and select **Copy Audience** from the **Edit Audience** drop-down list.

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/igb447Rb3qhB2NlDP7kvW-20260720-145614.png)
3. Click **Copy Audience**.

## Delete a real-time audience

:::hint{type="info"}
**Note**

You cannot delete real-time audiences that are pre-defined or that you built using the Real-Time Audiences API.
:::

1. Go to **Customers > Audiences**.
2. Either click the name of the audience or select the options menu **(...) > Delete**. If you click the name of the audience, you must select **Delete Audience** from the **Edit Audience** drop-down list to delete the audience. If you click **(...) > Delete**, click **Delete** in the conformation message to confirm the deletion.

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/539b1Ysc1c3ADjVuNCdTQ-20260720-145615.png)

## Access custom events in your real-time audience

If you created a custom event-action pair that only displays in ODP reports and customer profiles and does not display in the real-time audience builder, follow these steps:

1. Create or edit a real-time audience on the **Customers > Audiences** page.
2. Click **Add Event Conditions**.
3. Select **Connect New Event-Action Pair**.
   - If your custom event-action pair uses an existing event type, select **Choose from existing events** and select your event type from the drop-down list. Otherwise, select **Connect new event type** and enter the same event name you used when you originally created the custom event-action pair.
   - If your custom event-action pair uses an existing action, select **Choose from existing actions** and select your action from the drop-down list. Otherwise, select **Connect new action type** and enter the same action name you used when you originally created the custom event-action pair.
4. Click **Connect Event-Action Pair**.
5. Continue editing the audience as desired. When done, click **Save Audience**.

When you connect the new event-action pair in your real-time audience, it matches the event and action name to your previously created event-action pair. If the names do not match, it does not create a new event-action pair.

:::hint{type="info"}
**Note**

This only works if you have already created the event-action pair, and it is not displaying in the real-time audience builder. To create a new custom event-action pair, see the [developer documentation on custom events](<../../Understand ODP/thebasics-events.mdx>).
:::

For example, if you created the following custom event:

```javascript
zaius.event('web_form', {
  action: 'impression',
  form_name: 'Opticon Newsletter',
  campaign: 'Opticon Newsletter'}); 
```

And you do not see it as an option in the real-time audience builder, follow the steps above. For step 4, select **Connect new event type** and enter *web\_form*. For step 5, select **Connect new action type** and enter *impression*.

## Use real-time audiences in ODP web campaigns

After you create real-time audiences, you can use them to target customers in web campaigns. For more information, see [Configure campaign enrollment](docId\:md5X-h_YxDucRZLU6RTt8).

## Use ODP real-time audiences in other Optimizely products

The following integrations are currently available for ODP real-time audiences:

- [Optimizely Web Experimentation](docId:8r8kPcfPk_gyXkMubzNwK) – Use ODP real-time audiences as audiences in your Optimizely Web Experimentation experiments.
- [Optimizely Feature Experimentation](docId:6UBBxxRv331nBIVZ2lun8) – Use ODP real-time audiences as audiences in your Optimizely Feature Experimentation experiments.
- [Optimizely CMS 11 and 12](docId\:JbM7Wexw_dnppQj4mOrKF) – Use ODP real-time audiences in the Visitor Groups feature in Optimizely CMS 11 and 12. You must have the visitor group package installed.

  :::hint{type="info"}
  **Note**

  This is a third-party integration and is not an Optimizely sub-processor. See [Optimizely's Third-Party Add-Ons & Platform Integration Terms](https://www.optimizely.com/legal/third-party-add-ons-platform-integration-terms).
  :::
- [Optimizely Campaign](#) – Use ODP real-time audiences as audiences in your newsletter, transactional, and marketing automation campaigns.

  :::hint{type="info"}
  **Note**

  The Optimizely Campaign integration is only available for the EU region.
  :::
