This article presents a sample flow your app can support. You aren't limited to this exact flow, but it can be a helpful jumping off point as you plan your Recommendations integration.
In this flow, a site owner selects a recommendation algorithm provided by your app, and adds a "Related Products" widget to display the recommendations. Wix calls the Recommendations service plugin to get a list of items recommended by the algorithm, which are then sent to the widget.
Before implementing this flow, configure your app, so it can communicate with your Recommendations service plugin implementation.
Note: Currently, only the Online Stores app has a user interface (UI) that supports recommendations. To work with the Online Stores app, ensure that you include catalogAppIds: ["215238eb-22a5-4c36-9e7b-e7c08025e04e"]
when configuring your Ecom Recommendations Provider extension in the Wix Dev Center.
Alternatively, you can implement your own custom UI to display recommendations by leveraging one of Wix’s Development Frameworks and the Recommendations API.
algorithmType
of RELATED_ITEMS
are listed under the "Related Products" section.A site visitor navigates to a page with the Related Products widget.
Wix sends a Get Recommendations service plugin request to your app. The payload includes the algorithmId
of the selected algorithm. If the widget is installed on a products page, the items
field is populated with the product's ID as catalogItemId
and the Wix Stores app ID as appId
:
On any other page, the items
field is empty.
Your app responds with a list of recommendations.
Example of a successful response from your app:
The site displays the recommended products in the widget based on the IDs of the products returned in your response.