The Recommendations API allows users to promote and recommend items to their customers. Users can get item recommendations from catalogs on their site using algorithms provided by installed apps.
Note: Currently, the Recommendations API is for use with Wix Stores only.
With the Recommendations API, you can:
- Get a available for use on your site.
- Get a suggested by a given algorithm.
Algorithms are programs that identify and return a set of item recommendations based on a catalog. There are different types of algorithms, identified by their
algorithmType that calculate different kinds of recommendations. For example, Algorithms with the
RELATED_ITEMS also take a list of items as input and use those to calculate recommendations.
For example, Wix Stores provides the following algorithms:
|“From the same categories”||Returns items that share the most categories with items in the list provided.|
|“Frequently bought together”||Returns items that are frequently bought together with the first item in the list provided.|
|“Frequently viewed together”||Returns items that are frequently viewed together with the first item in the list provided.|
|“Best sellers”||Returns the items from the catalog with the highest number of sales.|
- You must have a Wix app that provides algorithms installed on your site, and you must have a Wix app whose catalogs are supported by those algorithms installed on your site. For more information see the method. Currently, the only app providing algorithms and their supported catalogs is Wix Stores.
- No caching is implemented, so repeat calls take the same time to complete as the first call.
- Catalog: A set of products or services available for purchase in a Wix app. For example, a set of products in Wix Stores.
- Algorithm: A program implemented by a Wix app, such as Wix Stores, which returns a list of item recommendations.
This article shares a possible use case your app could support, as well as an example flow that could support the use case. You're certainly not limited to this use case, but it may be a helpful jumping-off point as you plan your app's implementation.
In this scenario, you are selling products through multiple channels, one of which is a website using Wix Stores. You want your app to showcase the bestselling items from each of your channels. To show the bestselling items from the Wix Stores catalog in your app, follow this basic flow:
algorithmIdof the "Best sellers" algorithm.
to get the
algorithmIdfrom step 1. Use the Wix Stores appId (
215238eb-22a5-4c36-9e7b-e7c08025e04e) in the algorithm object.
- For each item in the object returned by
Get Recommendation, call in the Wix Stores Catalog API using the recommended item’s
- Using the product information in the responses from
Get Product, display the bestselling items in your app.
Returns a list of recommendation algorithms that can be used on your Wix site or project. These algorithms can be used with to provide item recommendations to the customer.
Algorithms are run by the apps that provide them, and can only be used on catalogs they support. Apps may provide algorithms for use with their own catalogs and/or catalogs from other apps.
The app which provides an algorithm is referenced by that algorithm’s
The apps whose catalogs are supported by an algorithm are referenced by the IDs in that algorithm’s
For an algorithm to be considered “Available” and returned in this method’s response, the algorithm must meet the following conditions:
- The algorithm’s
appIdmust match the ID of an installed Wix app.
- At least 1 of the IDs in
catalogAppIdsmust match the ID of an installed Wix app.
Wix app IDs are .
Returns a recommendation object containing a list of items to recommend to the customer.
Get Recommendation determines which items to recommend based on the given recommendation algorithms.
Get Recommendation doesn’t run the algorithms. It calls the installed apps that provide them.
Apps may provide algorithms for use with their own catalogs, or for use with catalogs from other apps. For example, Wix Stores provides algorithms that can only be used on its own catalogs. To run an algorithm, the app providing it must be installed, and an app providing a supported catalog must be installed. For more information and to see which algorithms are available on your site or project, call .
Get Recommendation operates as follows:
- Get Recommendation receives as input a list of algorithms as an array. These algorithms can be provided by different apps and can apply to different catalogs.
- Get Recommendation calls the app that corresponds to the
appIdof the first algorithm in the list of algorithms. It passes that algorithm’s ID and the IDs of any subsequent algorithms in the array for the same app.
- The app runs the algorithms.
- Get Recommendation returns items recommendations from the first algorithm (according to its position in the
algorithmsarray) that meets the minimum number of recommendations. At that point Get Recommendation stops calling other apps.
- If none of the algorithms run by the first app meet the minimum recommended items, Get Recommendation finds the next algorithm in the array with a new
appId(an ID of an app that has not yet been called), and repeats the process.
- If no algorithms in the
algorithmsarray recommend at least the minimum recommended items, Get Recommendations returns an empty array.