---
title: Create an Audience with Dynamic Variables
slug: emea-aep-bootcamp-sb22/create-an-audience-with-dynamic-variables
description: >-
docTags: 
createdAt: 2024-01-30T22:33:31.221Z
---

In this exercise, you’ll create an audience by making use of Adobe Experience Platform’s Audience Builder and Dynamic Variables.

## Audience Overview

:::hint{type="info"}
To log into the Adobe Experience Platform, check the [Introduction section](docId\:dZJmcmtKEjMufjXe3Qi6D).
:::

To get an overview of available audiences in Adobe Experience Platform:

1. In the menu on the left side, click on **Audiences**. You will see a dashboard overview with information on a specific audience.
2. Click on **Browse** at the tab bar. You will see an overview of all existing audiences.

## Create an Audience for Abandoned Bookings

We want to create a rule that will select all customer profiles that have searched for a flight to a particular destination, but not booked the flight in the last 24 hours. WKND Fly want to retarget these customers with offers for their chosen destination.

To do this, we need to use Dynamic Variables in our audience definition. Dynamic variables solve the scalability problems marketers face when building audiences for campaigns.&#x20;

Unlike static audience rules which require you to explicitly capture every possible use case, Dynamic Variables can be used to build the rule logic and dynamically express relationships.

### Add  events

1. Click on **+ Create Audience**. This will open the Create Audience popup.
2. Select **Build Rule** as the create method. This will open the Rule Builder.

To define our audience:&#x20;

1. Select the **Events** tab in the Fields section.
2. Search for **Flight Selection**.
3. Drag the **Flight Selection** Event Type onto the canvas.

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/v3Yg4aFfTIoIJeoHwCOKm_image.png)

Now we want to add a second condition to look for profiles who have **not** booked a flight.

1. Select the **Events** tab in the Fields section.
2. Search for **Booking**
3. Drag the **Flight Booking** Event Type onto the canvas, to the right of the Flight Selection event.&#x20;

Your audience definition should look like:&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/-a4JWvuOoJfcIYqXW15mM_image.png)

1. To restrict the time period between Flight Selection and Flight Booking, select the **anytime** drop down.
2. Change the condition to **In Last 1 Day(s).**

![](https://adbecdn.azureedge.net/labs/archbee/emeaProjectsAEPBootZurichLab1Profile/Screenshot2023-09-20at18.04.54.png)

:::hint{type="warning"}
**IMPORTANT**: if you have used the search text box, clean the content by click the X icon on the right of the search text box.
:::

### Add dynamic variable

Now, we want to add a third condition that will ensure audience qualification only occurs when the two events reference the same flight destination.

This is our **Dynamic Variable.**

:::hint{type="info"}
**IMPORTANT**: for this part of the exercise **DON'T USE** the search text box. Navigate the folders tree to find the fields, as described in the guide.
:::

1. Select the Booking event in the canvas by clicking on it. You’ll know you’ve done this correctly when the square has a blue border.
2. Select the **Events** tab in the Fields section.
3. From the **Browse variables** section (the box below Event Types)**,** select **Booking >&#x20;**&#x74;hen select **Reservations >** then **Flight Reservations >** then **Arrival Airport Code**.
4. Drag **Arrival Airport Code** onto the canvas into the **Event Rules** section, where is says **Add event field.**&#x20;

Your audience should look like:&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/2Ce9G9DB4Ovn2D5YReavc_image.png)

We need to compare the Airport Arrival code of the Flight Selection event to the Airport Arrival Code of the Flight Booking event.&#x20;

- Select the **Events** tab in the Fields section.
- From the **Browse variables** section (the box below Event Types), select **Selection >&#x20;**&#x74;hen select **Reservations >** then **Flight Reservations >** then **Arrival Airport Code**.

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/IPvadJvCnurcmO_pLDqqF_image.png)



- Drag **Arrival Airport Code** onto the canvas into the **Event Rules** section, into the Equals condition text box.
- As you drag the Airport Arrival Code over the text box you'll be given the option to **Compare Operands.**
- Drop the Airport Arrival Code into this area.

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/mT4wU8_edPUW-RkHCMI2z_image.png)

### Add the exclusion

The final thing we want to do is add an exclusion rule to the Booking event, since we want to only include customers who have **not** booked a flight.

- Click on the **Booking** event.
- In the Event Rule, select the **include** drop down and change this to **exclude**.

Your final audience definition should look like:&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/3sQd-kd8WY2uKmhQJaPe-_image.png)

### Publish the audience

Let's publish our audience.

1. Enter a **Name** for your audience using the following naming convention, e.g. `[your name] - Abandoned Bookings`.
2. (optional) Enter a **Description**.
3. Select **Streaming** from the **Evaluation method** dropdown list.
4. Click on **Publish**.

You will be taken to the **Audience summary** screen, outlining your audience definition.

:::hint{type="success"}
​You have successfully created a Dynamic Audience.
:::

