Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Inject Entities using Mbox for Produc Rec.

1982luca
Level 8
Level 8

Hello guys,

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

 

Thanks

Luca

1 Accepted Solution
gokula
Correct answer by
Level 5
Level 5

Hi @1982luca 

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
gokula
Correct answer by
Level 5
Level 5

Hi @1982luca 

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

gaureshk3014423
Level 9
Level 9

Hi @1982luca 

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

 

 

1982luca
Level 8
Level 8

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