Introduction

The Recommendations service plugin (formerly SPI) provides functionality for integrating advanced recommendation algorithms into your Wix site. This allows you to offer personalized product suggestions, enhancing user engagement and overall shopping experience. You can implement custom or external recommendation algorithms that don't come natively with Wix with your eCommerce purchase flows.

For example, you can provide recommendations based on user behavior, related products, or other custom logic, enriching how Wix apps such as Wix Stores and Wix Bookings display suggestions to users.

Wix eCommerce calls the service plugin endpoint getRecommendations() to retrieve the relevant product suggestions.

Configure your service plugin

To configure and customize your plugin, you need to provide important information in the service plugin configuration file.

Configuration file fields

NameTypeDescription
catalogAppIdsArray Required. App IDs of supported catalogs.

The following are Wix apps that provide catalogs and their app IDs:
Wix Stores: "215238eb-22a5-4c36-9e7b-e7c08025e04e"
Wix Bookings: "13d21c63-b5ec-5912-8397-c3a5ddb27a97"
Wix Restaurants: "9a5d83fd-8570-482e-81ab-cfa88942ee60"
supportedAlgorithmsArray Required. Recommendation algorithms implemented by the app. See the table below for details on the structure of the supportedAlgorithms object.

supportedAlgorithms properties

PropertyTypeDescription
reservedintReserved field with a value of 1.
namestringRequired. Algorithm name. This value is not translatable.
descriptionstringRequired. Algorithm description. This describes how the algorithm works and if it has any limitations regarding site content, number of items in the catalog, site traffic, and so on. This value is not translatable.
additionalInfogoogle.protobuf.StringValueA supplemental description. It can be used to help break up and organize information. You can, for example, display this information as a tooltip or as an additional section that is collapsed by default.
algorithmTypeenumAlgorithms may have the following types:
* RELATED_ITEMS - This type of algorithm provides recommendations based on 1 or more other provided items. For example, when an item is added to a cart, the algorithm can suggest other items frequently bought together with that item.
* GLOBAL - This type of algorithm provides general recommendations based on site or project statistics.
algorithmIdstringRequired. Algorithm ID. This must be unique for a specific app but does not have to be unique across all apps on the site or in the project.
Copy

Learn more:

To add a service plugin

  1. Add the plugin to your site.
  2. Update the getConfig() function in the -config.js file that is added to your site during step 1.
  3. Update the getRecommendations() function in the .js file that is added to your site during step 1.
Did this help?