# 13.3 Create a segment

## 13.3.1 Introduction

You'll create a simple segment:

* **Interest in Equipment** for which customer profiles will qualify when they visit the **Equipement** page of the Luma demo website.

### Good to know

Real-time CDP will trigger an activation to a destination when you qualify for a segment that is part of that destination's activation list. When that is the case, the segment qualification payload that will be send to that destination will contain **all the segments for which your profile qualifies**.

The goal of this module is to show that your Customer Profile's segment qualification is sent to **your** event hub destination in real-time.

### Segment Status

A segment qualification in Adobe Experience Platform always has a **status**-property and can be one of the following:

* **realized**: this indicates a new segment qualification
* **existing**: this indicates an existing segment qualification
* **exited**: this indicates that the profile does no longer qualify for the segment

## 13.3.2 Build the segment

{% hint style="info" %}
Building a segment is explained in detail in [Module 6](https://github.com/AdobePartnerTechnicalServices/aep-quickstart-guide/blob/main/module6/real-time-cdp-build-a-segment-take-action.md).
{% endhint %}

### Create Segment

Log in to Adobe Experience Platform by going to this URL: <https://experience.adobe.com/platform>.

After logging in, you'll land on the homepage of Adobe Experience Platform.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-d3766e8abcdcae565589d172ff39148a026b3712%2Fhome.png?alt=media)

Before you continue, you need to select a **sandbox**. The sandbox to select is named `--aepSandboxId--`. You can do this by clicking the text **\[Production Prod]** in the blue line on top of your screen. After selecting the appropriate sandbox, you'll see the screen change and now you're in your dedicated sandbox.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-f8fe0607dc3e272ebd2416a98220bb1d82c1a166%2Fsb1.png?alt=media)

Go to **Segments**. Click the **+ Create segment** button.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-e7162155ca4644b80586f89915aba3beda97370e%2Fseg.png?alt=media)

Name your segment `--demoProfileLdap-- - Interest in Equipment` and add the page name experience event:

Click on **Events**, and drag and drop **XDM ExperienceEvent > Web > Web page details > Name**. Enter **equipment** as the value:

![4-05-create-ee-2.png](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-0df81e01295ae04e6f6899aad7b1b374040bc8d5%2F4-05-create-ee-2.png?alt=media)

Drag and drop **XDM ExperienceEvent > `--aepTenantIdSchema--` > demoEnvironment > brandName**. Enter `--demoProfileLdap--` as the value, set the comparison parameter to **contains** and click **Save**:

![4-05-create-ee-2-brand.png](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-0a1325a4ee62d7c2631e9e7264794555c4b3c2d4%2F4-05-create-ee-2-brand.png?alt=media)

### PQL Definition

The PQL of your segment looks like:

```
CHAIN(xEvent, timestamp, [C0: WHAT(web.webPageDetails.name.equals("equipment", false) and _experienceplatform.demoEnvironment.brandName.contains("--demoProfileLdap--", false))])
```
