Expand my Community achievements bar.

Peeking Underneath the Hood of Segments in AEP (Adobe Experience Platform)

Avatar

Employee Advisor

5/31/22

Authors: @Mike-Broom, @Aimee-Gregg, @Danny-Miller 

While a lot of focus in AEP is on the Real Time CDP (Customer Data Platform) and the Profile, we wanted to dive into the next area of AEP that is often overlooked or given little attention. Segments. While the Profile is the foundation for who a customer is or does, the way in which we activate them is mostly based on the segments they are a part of. For example, I want to send an email to people who abandoned cart or personalize my site for those who previously purchased a product.  

Thus, we want to dive into several intriguing ways segments are being used as they are more interesting than when they first appear.  

What are Segments? 

In its most basic form, a segment is a set of rules that evaluate and store the result/qualification of those rules on the Profile. 

Rules 

The rules are a set of criteria that describe a characteristic or behavior. It fundamentally is composed of: 

  1. Characteristics of the Profile 
    • Customer City = New York 
  2. Behavior exhibited by the Profile 
    • Purchased Product over $100 

Segment Types 

The rules that we build are the foundation in determining the Segment type. AEP has three segment types today: 

  1. Batch 
  2. Streaming 
  3. Edge 

The ingestion method for the data sources which make up these segments as well as the rules used will determine how your segments will evaluate. 

Batch Segments: As an alternative to an ongoing data selection process, batch segmentation moves all profile data at once through segment definitions to produce corresponding audiences. Once created, these segments are saved and stored so that you can export them for use. The more complex your rules are, the more your segments will shift towards Batch evaluation. Batch segments are automatically evaluated every 24 hours. If you want to evaluate a batch segment on demand, you can use a segment job. 

Streaming Segments: An ongoing data selection process that updates your segments in response to user activity. Once a segment has been built and saved, the segment definition is applied against incoming data to Real-time Customer Profile. Segment additions and removals are processed regularly, ensuring your target audience remains relevant. Note, the UI audience size will update only once per day during the daily automated segment evaluation. 

Edge Segments: The ability to evaluate segments in Platform instantaneously on Experience Edge, enabling same page and next page personalization use cases. 

Tip: As you create your use cases, it is very important to keep segment evaluation in mind. If you’re looking for real-time streaming activation to a streaming destination for example, your segments must align within guardrails to ensure it qualifies as streaming 

Rule Language 

Underneath the covers, the UI will create the language (PQL), used for Segment evaluation. As you get more advanced, you may find you can do things in PQL that provide more flexibility using the API. 

Results/Qualification on a Profile 

One of the more interesting things about how AEP’s segmentation engine works is how it stores the results. Segmentation rules are evaluated against a Profile and the result is stored as a list of Segments a Profile qualifies for (e.g. Danny qualified for the Adobe Employee & AEP certified segments). Each segment does not store a list of Profiles that qualified for it (e.g. the Adobe Employee segment does not know who qualified for it). 

This simple method helps in understanding some nuances in how AEP does what it does. 

Below is the JSON representation of segmentMembership showing how segments are stored on the Profile (more to come on this on a later post, docs here for now): 

Template 

 

 

"segmentMembership": { 
       "[namespace]": { 
         "[segment ID]": { 
           "lastQualificationTime": "[timestamp]", 
           "status": "[realized/existing/exited]" 
         }, 

 

 

 

 Example 

 

 

"segmentMembership": { 
       "ups": { 
         "76a35d79-7819-4568-8469-59fc50d3a256": { 
           "lastQualificationTime": "2021-10-26T14:04:56Z", 
           "status": "existing" 
         }, 
         "5b2f9423-7093-4263-8531-af505bdeacac": { 
           "lastQualificationTime": "2022-02-05T12:29:18Z", 
           "status": "exited" 
         }, 
         "5b2f9423-7093-4263-8531-af505bdeaxyz": { 
           "lastQualificationTime": "2022-02-05T12:29:18Z", 
           "status": "realized" 
         }, 

 

 

 

Audiences 

When building a segment in the Segmentation Builder UI, the Audiences tab lists all audiences created within AEP (e.g. Segments that have been built and evaluated), as well as audiences imported from external sources such as Adobe Audience Manager.  

On the Audiences tab, you can see all the available sources as a group of folders. As you select the folders, available sub-folders and audiences can be seen. Additionally, you can select the folder icon (as shown in the far-right image) to view the folder structure (a check mark denotes the folder you are currently in) and easily navigate back through folders by selecting the name of a folder in the tree. 

You can hover over the ⓘ next to an audience to view information about the audience including its ID, description, and the folder hierarchy to locate the audience. 

DannyMiller_1-1653618823595.png  

What does the Profile look like for Audiences? 

You will see Audiences are stored in the same data structure as Segments because they are effectively the same thing.  The main difference is that the rules for a non-AEP audience are stored outside of AEP. For example: If the Audience Manager connector was set up, then an AAM segment that was imported into AEP would be shown as an Audience. The rules are in AAM, but the results/qualification of a Profile belonging to a segment is ingested into AEP as an Audience. 

One thing to note: non-AEP audiences will have a different namespace. 

Template 

 

 

"segmentMembership": { 
       "[namespace]": { 
         "[segment ID]": { 
           "lastQualificationTime": "[timestamp]", 
           "status": "[realized/existing/exited]" 
         }, 

 

 

 

AAM Example 

 

 

"segmentMembership": { 
       "aam": { 
         "76a35d79-7819-4568-8469-59fc50d3a256": { 
           "lastQualificationTime": "2021-10-26T14:04:56Z", 
           "status": "existing" 
         }, 
         "5b2f9423-7093-4263-8531-af505bdeacac": { 
           "lastQualificationTime": "2022-02-05T12:29:18Z", 
           "status": "exited" 
         }, 
         "5b2f9423-7093-4263-8531-af505bdeaxyz": { 
           "lastQualificationTime": "2022-02-05T12:29:18Z", 
           "status": "realized" 
         }, 

 

 

 

Hope you found that interesting.  Over the next few posts, we will start to dive into various use cases and how we addressed them using AEP Segments. 

For more information on segmentation in AEP, please look at Adobe Experience League 

3 Comments