Expand my Community achievements bar.

Join us for an upcoming in-person Adobe Target Skill Builders event ~~> We're hosting these live learning opportunities to equip you with the knowledge and skills to leverage Target successfully. Learn more to see if we'll be coming to a city near you!
SOLVED

User Based Recently Viewed not returning data

Avatar

Community Advisor

Hi Team,

 

This recommendation activity is using criteria user based > Recently Viewed Items.

The issue is it doesn't return the recommendations. Also, The download data csv has no data.

 

We are using Recommendations for server side and using recs API when we run below API in postman, no data is returned in the postman.

 

 

PAYLOAD : https://zzz.tt.omtrdc.net/rest/v1/delivery?client=zzz&sessionId=9a9652af18834a2faf49a5bd0bfde9ba

 

REQUEST BODY : { "id": { "tntId": "abcdefghijkl00023.1_1", "marketingCloudVisitorId": "90062127111220109930811795194526060969" }, "environmentId":"755", "context": { "channel": "web", "browser" : { "host" : "www.zz.com" }, "address" : { "url" : "https://www.zz.com/offers.mi" } }, "property" : { "token": "c72849c6-2a3c-8a3b-bf17-94885baf8879" }, "execute": { "mboxes": [ { "name": "recentlyViewed", "index": 1 } ] } }

 

any help on this would be helpful?

do we need to pass any other parameter in the request body ?

 

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I believe the mbox param on the first call needs to be entity.id in order for it work.

View solution in original post

4 Replies

Avatar

Community Advisor

@ambikaTewari_ATCI  - perhaps I am missing something but I am not seeing the entity in the request as a "read" or as a "purchase". The entity.id value needs to be present in order to set the profile attribute of view appropriately. An order needs the be present for the purchase to increment. Here is an example:

 

Screen Shot 2023-02-07 at 12.43.21 PM.png

Avatar

Community Advisor

Thank you @Eric_Vidana for your reply.

I am hitting mbox request to mark the entity.id as viewed :

 

curl --location --request POST 'https://mboxedge22.tt.omtrdc.net/rest/v1/mbox/6a120c9eba984fcd807b0713fbea09e7?client=clientcode' \
--header 'Content-Type: application/json' \
--data-raw '{
"mbox": "offerDetailsMbox",

"mboxParameters":
{
"id": "OFF-20337-BRSTX"

}
}

 

Then I hit the recommendations API to get the recentlyViewed entities :

curl --location --request POST 'https://tenantcode.tt.omtrdc.net/rest/v1/delivery?client=clientcode&sessionId=af76a9e40ef740ae8ae3c0...' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": {
"tntId": "b5cddeea8d304cdabf3710bdb81f743b.31_0",
"marketingCloudVisitorId": "17530970345778067201121397709658911877"
},

"environmentId":"575",
"context": {
"channel": "web",

"browser" : {
"host" : "www.zzz.com"
},
"address" : {
"url" : "https://www.zzz.com/adasd.mi"

}
},
"property" : {
"token": "c72434c6-2a3c-8a3b-bf17-3434gt555"
},
"execute": {
"mboxes":
[
{
"name": "recentlyViewed",
"index": 1
}
]
}
}


'but it is not returning any data. so do I need to pass the entityId also in the recommendations API to get the results ?

Avatar

Correct answer by
Community Advisor

I believe the mbox param on the first call needs to be entity.id in order for it work.