Optimize Code for Multiple Anchor Recommendations
Passing multiple product anchors to Commerce Cloud Einstein enables you to provide product recommendations based on customer-specific items.
We recommend passing the basket object as a context-object in the isslot tag. But if there are added criteria for filtering out the products, we recommend that you use the approach described here to assemble a collection of products for the context-object.
Note: You can use this approach wherever you want to pass multiple anchors to the Commerce
Cloud Einstein recommender. For example, in the shopperβs cart, product wish list, and
order history. Also keep in mind that Einstein uses up to five products from the passed
context-object as anchors for the recommendations.
Some development work is required to process multiple product anchors. Personal implementation can vary substantially, but API calls remain generally the same.
To pass multiple product anchors to Einstein from a shopperβs cart: