Skip to main content
SahuSa1
Level 3
March 26, 2026
Question

How to evaluate profiles on only the latest events in AEP segments?

  • March 26, 2026
  • 1 reply
  • 60 views

Hi Adobe community, greetings! 

 

Has anyone tried or is there any way to evaluate profiles and consider their latest event? I found this blog and was trying to replicate this but I was not able to. 
 

Link - https://medium.com/adobetech/how-to-capture-latest-experience-event-in-adobe-experience-platform-and-learn-dynamic-segmentation-4cea352b2262

 

Has anyone tried and found success?

 

Our requirement was to qualify users who have Account status as active. For example - If in the morning we got an event for a user saying Account status is active and then in the evening we get the account status is inactive. How do we make sure that we look at the latest event only, considering the look back period of evaluation timeframe for the audience is set to “In last 1 day or 24 hours”?

 

Thanks,
Sambit

1 reply

Level 2
March 31, 2026

Hi ​@SahuSa1 

 

The Best Way: Profile Attributes

  1. Map the "Account Status" field to an XDM Individual Profile schema (not just an Event schema).
  2. Logic: AEP uses "Last Write Wins." The profile will automatically only hold the most recent status.
  3. Segment: Filter by Profile Attribute: Status == "Active".

The Alternative: Event Exclusion
If using only Events, create a Sequential Segment:

  1. Include: Event where Status == "Active".
  2. Then Exclude: Any following event where Status != "Active".

Recommendation: Use Profile Attributes. It is faster, handles "latest state" automatically, and works better for streaming.

Santosh Kumar | AEP & CJA Expert
SahuSa1
SahuSa1Author
Level 3
March 31, 2026

Thanks for your reply ​@santoshkr . For the suggested alternative approach, I guess if there are 3 such events - event 1 - Status = Active; event 2 - Status = Inactive; event 3 - Status = Active; in a given time frame, will the profile not get qualified in the sequential segment rule? 

 

Profile attribute is approach B for us, while we still want to check if using events we can still achieve the desired results. 

 

Thanks,

Sambit

Level 2
April 1, 2026

Hi ​@SahuSa1 

 

Great catch. You’re right—in a standard sequential segment (Include A -> Exclude B), if the user has a third event that returns to 'Active', the logic can get messy because AEP looks for any occurrence of the exclusion, not necessarily the order of the very last timestamp.

If you must stay 100% Event-based (Approach A), the most reliable way to ensure you only qualify the latest state is to use a 'Within' time constraint combined with a 'Count' or 'Exclude' logic, but even then, it isn't foolproof for 'latest' status.

The most robust Event-only logic for your 3-event scenario would be:

  1. Include: Event (Status == 'Active') in the last 24 hours.
  2. Exclude: Event (Status == 'Inactive') where the Timestamp is AFTER the 'Active' event.

However, here is the 'Expert' insight on why Approach B (Profile) is the industry standard:
In AEP, Events are a history of what happened, whereas Profiles are the current state of the user. Using Events to determine 'Current Status' is essentially trying to make a Time-Series database act like a Relational database. It increases processing latency and can lead to 'flapping' segments.

By using the Profile Attribute, AEP’s 'Last Write Wins' handles that 'Active -> Inactive -> Active' sequence automatically. The profile simply updates to the most recent value, and the segment evaluation becomes a simple 'True/False' check, which is significantly faster for Streaming segmentation.

 

Recommendation: If you absolutely must use Events, use the 'Exclude After' logic, but for production stability, I highly suggest moving this specific field to the Profile Schema.

 

Thanks, 

Santosh Kumar

Santosh Kumar | AEP & CJA Expert