Expand my Community achievements bar.

AEP field to capture last 5 SKU browsed

Avatar

Level 6
Has anyone tried creating a field in AEP to derive last 5sku browsed using computed Attribute or different method ? The field should be derived inside AEP using the webSdk data that is getting ingested, without using external systems/tool to calculate the last 5sku browsed
 
 
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

3 Replies

Avatar

Level 7

@Pradeep-Jaiswal Right now, Query Service is the only reliable way to do this inside AEP.

AEP doesn’t support maintaining a rolling or fixed-size array on a profile in real time. Features like Computed Attributes or Data Prep are either aggregation-only or stateless, so they can’t “remember” previous values or enforce a last-5 constraint.

The practical pattern is:

  • Run a scheduled Query Service job (hourly if you need it fairly fresh)
  • Choose your primary identity (ECID, customerID, etc.)
  • Rank SKU browse events per profile by timestamp
  • Select the top 5 most recent SKUs
  • Build an array from those values
  • Write the Primary ID and the array into a separate profile-enabled dataset
  • Profile stitching will then overwrite the last5BrowsedSkus attribute on the profile with the newly computed array

This approach isn’t real-time, but it’s scalable, and fully supported within AEP

Avatar

Level 7

@Pradeep-Jaiswal hope the response helped in getting resolution for your question. Can you mark it as 'Correct Answer' to help others find resolution too.

Avatar

Community Advisor

Hi @Pradeep-Jaiswal  - As we discussed earlier, we are doing the same, we are using the history of viewed products by filtering the event type based on prodView events and then calling a streaming API via custom action to save it on the profile. For us we are fetching all the products not exactly last five because for us the usecase is to increase the ranking of the product depending on how many times it was viewed in the past.

 

Thanks,

Arpan