B2B Commerce Einstein Product Recommendations API

Calls to the Product Recommendation API deliver Einstein recommendations. The API is accessed using a Connect API to provide data to a Lightning web component. The Connect API returns a set of products to populate the Commerce Einstein Recommb2b_b2c_comm_einstein_reco_api_refendations component.

Commerce Einstein Webstore Recommendations Resource

The Commerce Einstein Recommendations Connect API resource (/commerce/webstores/{webstoreId}/ai/recommendations) returns Einstein product recommendations.

Recommender Names and Anchors

You can add one or more Einstein Recommendations components to any page in B2B Commerce stores. When using a product recommender, such as SimilarProducts or ComplementaryProducts, specify product IDs. When using a category recommender, such as MostViewedByCategory or TopSellingByCategory, specify category IDs. All other anchors are supported on any page, but they’re intended for use on certain pages.

B2B recommenders don’t require that you specify an anchor type. The Connect API automatically determines the anchor type based on the anchor values and the recommendation use case that you specify.

Anchor Type Anchor Value Fields Returned
No anchor Any value that evaluates to false. For example: null or undefined. <ul><li>RecentlyViewed</li><li>TopSelling</li><li>PersonalizedForShopper</li></ul>
Product ID A list of one or more 18-character product IDs. For example: 01t000000000000001, 01t000000000000002, 01t000000000000003 <ul><li>RecentlyViewed</li><li>SimilarProducts</li><li>ComplementaryProducts</li><li>CustomersWhoBoughtAlsoBought</li><li>Upsell (not supported at this time)</li></ul>
Category ID A list of one or more 18-character category IDs. For example: 0ZG000000000000001, 0ZG000000000000002, 0ZG000000000000003 <ul><li>RecentlyViewed</li><li>MostViewedByCategory</li><li>TopSellingByCategory</li></ul>

For example, a URL containing an anchor value for the connect API looks like this.

/services/data/v55.0/commerce/webstores/0ZERM00000009eR/ai/recommendations?recommender=SimilarProducts&anchorValues=01tRM000000R8DnYAK,01tRM000000R8DWYA0

See Also