User Based Recently Viewed not returning data | Community
Skip to main content
ambikaTewari_ATCI
New Participant
February 1, 2023
Solved

User Based Recently Viewed not returning data

  • February 1, 2023
  • 1 reply
  • 1309 views

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 ?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by evidana

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

1 reply

New Participant
February 7, 2023

@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:

 

ambikaTewari_ATCI
New Participant
February 7, 2023

Thank you @evidana 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=af76a9e40ef740ae8ae3c0315905fc00' \
--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 ?

evidanaAccepted solution
New Participant
February 7, 2023

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