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.
The Commerce Einstein Recommendations Connect API resource (/commerce/webstores/{webstoreId}/ai/recommendations
) returns Einstein product recommendations.
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. |
|
Product ID | A list of one or more 18-character product IDs. For example: 01t000000000000001 , 01t000000000000002 , 01t000000000000003 |
|
Category ID | A list of one or more 18-character category IDs. For example: 0ZG000000000000001 , 0ZG000000000000002 , 0ZG000000000000003 |
|
For example, a URL containing an anchor value for the connect API looks like this.
See Also