Expand my Community achievements bar.

SOLVED

Inject Entities using Mbox for Produc Rec.

Avatar

Community Advisor

Hello guys,

Is it possible to inject multiple entities via targetPageParams()? 

 

Thanks

Luca

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Luca_Lattarini 

I think you're looking to implement Recommendations for product page is this understanding correct? 

 

If so, then yes it's possible to inject multiple entities to targetPageParams function.

If you pass all parameters on the page, you can quickly make updates by updating the page. 

 

On a product page, you might want to recommend specific items, or items with a particular price or inventory level. For a product page, you might need to set up frequently changing attributes (such as value and inventory), in addition to the keys required for a category page.

 

Recommendations require an at.js reference on the page.

For example, you can use the following code in the header section of your product pages:

function targetPageParams() { 
   return { 
      "entity": { 
         "id": "37895", 
         "categoryId": "My Category", 
         "value": 100.56, 
         "inventory": 399 
      } 
   } 
}

Hope this helps. Thanks 

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @Luca_Lattarini 

I think you're looking to implement Recommendations for product page is this understanding correct? 

 

If so, then yes it's possible to inject multiple entities to targetPageParams function.

If you pass all parameters on the page, you can quickly make updates by updating the page. 

 

On a product page, you might want to recommend specific items, or items with a particular price or inventory level. For a product page, you might need to set up frequently changing attributes (such as value and inventory), in addition to the keys required for a category page.

 

Recommendations require an at.js reference on the page.

For example, you can use the following code in the header section of your product pages:

function targetPageParams() { 
   return { 
      "entity": { 
         "id": "37895", 
         "categoryId": "My Category", 
         "value": 100.56, 
         "inventory": 399 
      } 
   } 
}

Hope this helps. Thanks 

Avatar

Employee Advisor

Hi @Luca_Lattarini 

As @Gokul_Agiwal suggested, you can definitely inject multiple entity/entity attributes into mbox and use those to create collection as well, without uploading feeds.

 

 

Avatar

Community Advisor

How can I insert Multiple Entity? And How can I update single entity or the entire collection of Article?