Expand my Community achievements bar.

SOLVED

Do not show similar products in recommendations

Avatar

Community Advisor

Hi Team,

 

I have such data in the feed :

 

##entity.id entity.name entity.offerType entity.inventory
11-SPO aa 11 1
23-AS bb 22 1
34-PO cc 11 0
45-UI dd 13 4
56-OK ee 11 1

 

offerType can have the similar value .

Recommendation could return top 3 entities but 11-SPO and 34-SPO would be similar item. how do I stop 34-PO not to show in recommendatons?

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @ambikaTewari_ATCI , 

There definitely isn't the dynamic option you are looking for in the criteria filters (at least for now). If the number of offers is limited and manageable manually then you could try using static filters in the criteria sequence (of course you will have to come up with a preference sequence of the offerIds). 

One other idea is to handle this logic in the design. In your design HTML/JS code your developers can add the logic of checking with the previous recommendations offer id ($entityX.offerId) and only render the next product if the value is different, otherwise skip to the next product returned from the criteria. Check this section for inspiration of the code: 

View solution in original post

4 Replies

Avatar

Level 4

Hi, 

You might want to create a criteria sequence where each criteria has a filtering condition to look into the pool of similar items, then apply "limit the number of items" to 1 for each criteria. In that way every criteria will return only a single product. 

 

kchaitanya_0-1668612035314.png

Let us know if that works. 

Avatar

Community Advisor

Hi @kchaitanya 
We have such data in feeds :

 

We do not want "1328001-CHIES" to show up in recommendationx because "1328001-CHIDG" entity has the same entity.offerId. 
The collection/pool could have such  entity.ids who would have similar entity.offerId (such entities have entity.propertyType as MPO). I do not want entity.id  ("1328001-CHIES") to be shown in next slot by criteria if the another   entity.id ("1328001-CHIDG") with the similar entity.offerid (1328001) is already present in the previous recommended slots  .

 

In the filtering option, I do not see such option to accept first entity.id of such group (MPO) and then pick 1328001-CHILY and show it.

 

 

 

 

 

##RECSentity.id entity.name entity.categoryId entity.offerPropertyType entity.offerId
1169155-SNADP ABC Offer SPO 1169155
1254166-EWRSA sdsd Offer SPO 1254166
1256089-YHZMC werer Offer SPO 1256089
1299338-HOUMQ vdffd Offer SPO 1299338
1311806-MSYLA vdgdfv Offer SPO 1311806
1327213-YXUFP fdgdfsg Offer SPO 1327213
1328001-CHIDG dfssf Offer MPO 1328001
1328001-CHIES dfssf Offer MPO 1328001
1328001-CHIIS dfssf Offer MPO 1328001
1328001-CHILY sdfsdff Offer MPO 1328002
1328001-CHIMB ytuu Offer MPO 1328004
1328001-CHINB ytuu Offer MPO 1328004
1328001-CHIOS ytuu Offer MPO 1328004
1328001-CHIRS ytuu Offer MPO 1328004
1328001-CHISB ytuu Offer MPO 1328004
1328001-CHIWN ytuu Offer MPO

1328004

Avatar

Correct answer by
Level 4

Hi @ambikaTewari_ATCI , 

There definitely isn't the dynamic option you are looking for in the criteria filters (at least for now). If the number of offers is limited and manageable manually then you could try using static filters in the criteria sequence (of course you will have to come up with a preference sequence of the offerIds). 

One other idea is to handle this logic in the design. In your design HTML/JS code your developers can add the logic of checking with the previous recommendations offer id ($entityX.offerId) and only render the next product if the value is different, otherwise skip to the next product returned from the criteria. Check this section for inspiration of the code: 

Avatar

Community Advisor

Hi @kchaitanya That helps! thank you.

I'll try to add the logic in design to control the duplicate values.