# 6.1 Create a segment

In this exercise, you'll create a segment by making use of Adobe Experience Platform's segment builder.

## 6.1.1 Context

In today's world, responding to a customer's behavior needs to be real-time. One of the ways of responding to customer behavior in real-time is by using a segment, on the condition that the segment qualifies in real-time. In this exercise, you need to build out a segment, taking into account real activity on the website that we've been using.

## 6.1.2 Identify the behavior you want to react to

Go to <https://builder.adobedemo.com/projects>. After logging in with your Adobe ID, you'll see this. Click your website project to open it.

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

You can now follow the below flow to access the website. Click **Integrations**.

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

On the **Integrations** page, you need to select the Data Collection property that was created in exercise 0.1.

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

You'll then see your demo website open up. Select the URL and copy it to your clipboard.

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

Open a new incognito browser window.

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

Paste the URL of your demo website, which you copied in the previous step. You'll then be asked to login using your Adobe ID.

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

Select your account type and complete the login process.

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

You'll then see your website loaded in an incognito browser window. For every demonstration, you'll need to use a fresh, incognito browser window to load your demo website URL.

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

In this example, you want to respond to a specific customer viewing a specific product. From the **Luma** homepage, go to **Men**, and click the product **PROTEUS FITNESS JACKSHIRT**.

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

So when somebody visits the product page for **PROTEUS FITNESS JACKSHIRT**, you want to be able to take action. The first thing to do to take action, is define a segment.

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

## 6.1.3 Create the Segment

Go to [Adobe Experience Platform](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 **\[!UICONTROL Production Prod]** in the blue line on top of your screen. After selecting the appropriate \[!UICONTROL sandbox], you'll see the screen change and now you're in your dedicated \[!UICONTROL 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)

In the menu on the left side, go to **Segments** and then go to **Browse** where you can see an overview of all existing segments. Click on the **Create Segment** button to start creating a new segment.

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

As mentioned above, you need to build a segment out of all customers that have viewed the product **PROTEUS FITNESS JACKSHIRT**.

To build out this segment, you need to add an event. You can find all events by clicking on the **Events** icon in the **Segments** menu bar.

Next, you'll see the top level **XDM ExperienceEvent** node.

To find customers that have visited the **PROTEUS FITNESS JACKSHIRT** product, click on **XDM ExperienceEvent**.

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

Scroll down to **Product List Items** and click it.

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

Select **Name** and drag and drop the **Name** object from the left **Product List Items** menu onto the segment builder canvas into the **Events** section.

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

The comparison parameter should be **equals** and in the input field, enter `PROTEUS FITNESS JACKSHIRT`.

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

Your **Event Rules** should now look like this. Every time you add an element to the segment builder, you can click the **Refresh Estimate** button to get a new estimate of the population in your segment.

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

Finally, let's give your segment a name and save it.

As a naming convention, use:

* `--demoProfileLdap-- - Interest in PROTEUS FITNESS JACKSHIRT`

Your segment name should look like this: `vangeluw - Interest in PROTEUS FITNESS JACKSHIRT`

Next, click the **Save and Close** button to save your segment.

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

You'll now be taken back to the segment overview page.

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