---
title: [Bonus] Create an Audience with Dynamic Variables
slug: qatar-airways-hol/bonus-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 Segment Builder and Dynamic Variables.

## Audience Overview

:::hint{type="info"}
To log into the Adobe Experience Platform, check the **Introduction Section.**
:::

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. Qatar Airways 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.

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. You will immediately notice the **Events** tab selected underneath **Fields**.&#x20;

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)

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.**

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** sectio&#x6E;**,** select **Booking >**
4. Then select **Reservations >** then **Flight Reservations >** then **Arrival Airport Code**
5. 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)

:::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.
:::

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

To do this:

- Select the **Events** tab in the Fields section.
- From the **Browse variables** section, select **Selection >**

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

:::hint{type="warning"}
For this part of the exercise DON'T use the search text box. Navigate the folders tree to find the fields.
:::



1. Then select **Reservations >** then **Flight Reservations >** then **Arrival Airport Code**
2. Drag **Arrival Airport Code** onto the canvas into the **Event Rules** section, into the Equals condition text box.&#x20;
3. As you drag the Airport Arrival Code over the text box you'll be given the option to **Compare Operands.**
4. Drop the Airport Arrival Code into this area.

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

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.

1. Click on the **Booking** event.
2. 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)

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.
:::

