Extension Config


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

Note

If you created your service plugin extension with the CLI, required fields are automatically populated for you.

Configuration Params
catalogAppIdsArray<string>

App IDs of catalogs for which recommended items can be found.


deploymentUristring

URI where the application implementing the SPI is deployed.


supportedAlgorithmsArray<AlgorithmConfig>

The algorithms that this application can use to calculate item recommendations.

0
Did this help?

getRecommendations( )


Important: This is a handler function. Implement it only as part of the service plugin.


This method retrieves an array containing the lists of recommended items returned by each algorithm. Items must be selected from catalogs in Wix apps installed on the site.

If a requested recommendation algorithm's type is RELATED_ITEMS then the items field is included in the request. The response should contain items related to those submitted. How the related items are selected depends on the recommendation algorithms used. For example, items can be in the same category, or can be frequently bought or watched together.

Method Declaration
Copy
Method Parameters
payloadGetRecommendationsEnvelope
Returns
Return Type:GetRecommendationsResponse | Promise<GetRecommendationsResponse>
Errors
AlgorithmNotSupportedWixErrorclass
ItemAppIdNotSupportedWixErrorclass
Did this help?