Expand my Community achievements bar.

SOLVED

Create segment in AEP to identify audiences based on product purchase

Avatar

Level 2

Hi Team,

Need your help on whether below usecase can be achived

 

How to create a segment in AEP to find the users who visted the product but not purchased it. Say user visits two product pages(P1 and P2) and bought one product(P1) only. How to create the segment for this use case in AEP where user has purchased a product P1 but not P2. How AEP understands or basically group the events based on product and find that the P2 has not been purchased.

 

I was able to do it say a positive use case with single product but not with multiple views of the same product or multiple products

 

Include audience who have at least 1 Any event where ((Value equals 1 and Value does not exist happening in a single event))

 

select _Any1 from xEvent where _Any1.commerce.productViews.value = 1.0 and _Any1.commerce.purchases.value.isNull()

 

Sample JSON ingested into AEP from website :  https://jsoneditoronline.org/#left=cloud.d78fce9b4fb34683976c8df3ffbcdc44&right=local.tofuba

 

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@selvendranr9588 I think we can make it simpler (and should handle all use cases).  Give this a try.  The wording is weird because of the first "Exclude" but I think it will work.

Include audience who Exclude audience who have at least 1 Purchases event where ((SKU equals P1))AND have at least 1 Purchases event where (Exclude((SKU equals P2)))

DannyMiller_2-1657899571245.png

 

View solution in original post

3 Replies

Avatar

Level 5

Hi @selvendranr9588 , this can be achieved with sequential segmentation where you can plan journey of your events and define criteria for qualification. In your case segmentation would be 2 events. 1st purchased product p1 and then not purchased product p2. Here is the PQL : Include audience who have at least 1 Purchases event where (Unique Identifier equals P1) THEN have at least 1 Remove From List event where (Unique Identifier equals P2) 

Refer snapshot : 

AtulChavan_0-1657895324922.png


Here is the documentation : https://experienceleague.adobe.com/docs/experience-platform/segmentation/home.html?lang=en#sequentia...



 

Avatar

Employee Advisor

@selvendranr9588 I think the challenge we might have w/ the sequential approach is that the purchase of the second product P1 may have occurred before product P2.  If you need to handle that approach, I' consider making it a separate Segment and exclude it.

 

I have not played around with the "remove from list" event, but I'd use the Exclude instead.

Thus, to handle both the exclude of P2 purchase at the same time and after, I'd use this:
DannyMiller_1-1657898614169.png

 

Include audience who Exclude audience who have at least 1 Purchases event where ((SKU equals P1) AND (Exclude(SKU equals P2))) THEN Exclude audience who have at least 1 Purchases event where (Exclude((SKU equals P2)))
 

Avatar

Correct answer by
Employee Advisor

@selvendranr9588 I think we can make it simpler (and should handle all use cases).  Give this a try.  The wording is weird because of the first "Exclude" but I think it will work.

Include audience who Exclude audience who have at least 1 Purchases event where ((SKU equals P1))AND have at least 1 Purchases event where (Exclude((SKU equals P2)))

DannyMiller_2-1657899571245.png