I created a CSV feed and have a entity.id, entity.name, entity.message for each item along with adding my entity.pageUrl (setting this to the absolute URL of my pages), I created a Design and set my Criteria. I then created a Recommendation activity and set it up with a Design, Criteria and Collection, all is displaying as expected in Edit mode, but when I launch it, no recommendations show and if I use mboxTrace, I get the following message at the bottom of the output:
It's helpful to think about this in terms of 'recommendation delivery' and 'entity ingestion':
Many types of recommendation criteria require a "key" off which to base the items to be recommended. For example in a "people who viewed this viewed these" criterion, 'this' is the key. Your page needs to tell us, in the mbox request, the key. In this example, the key is the item being viewed, specifically it is the unique identifier for that item, the entity.id. Once Target knows what the visitor is viewing, we can return the items to recommend.
Please note that not all criteria are key-based. For example "Recently Viewed" and "Top Sellers" do not require a key, and thus will work fine without passing entity.id.
Entities (we use this term instead of 'products' because we can recommend other things like articles, videos, etc.) can be ingested into Target via feeds, mbox calls, api calls, or any combination of these. The "entity.id" is an identifier that uniquely identifies the entity, so in your case sabahatu1546489 it is likely your productID. Mbox calls are primarily used for delivery, however a lot of customers find it convenient to piggyback off mboxes and pass in the full set of entity attributes on their mbox calls. However, if you pass in your full product catalog via feeds, you only need to pass a key in your mbox request and then only if you are using a key-based criterion.
Is the entityID same as the productID which we need to fetch from DOM and pass in the following function? Also does it mean the productID needs to be available on all those pages where we intent to display recommendation.
I didn't have a entityID on my page, once I added that everything started working. The documentation I read didn’t clearly highlight this, it was my assumption that providing a Feed was enough, on this page under Attributes, it says:
Attributes can be provided in the mbox or through a feed.
I thought that I didn’t need the mbox part as I’m providing it via feed, I realise now as a minimum I need the mboxCreate and set a unique entityID for each page, then I can use my Feed to add additional Attributes for use in the Recommendation engine.
Recommendation need some data, before it can show any recommendations. If you just have setup a test-site where there has been no transactions and no data sent to recommendation, then you won't get anything back from it...