getRecommendations( )


Retrieves the recommended items provided by your plugin.

The getRecommendations() function is called by Wix to gather the recommended items based on the selected algorithm. It returns recommendations based on the specified options.

Where to find getRecommendations()

When you add the Recommendations service plugin, a folder is automatically added to your site. Use the .js file in the folder to write the code to determine which recommended items to retrieve.

For more information on customizing your recommendations plugin, see Recommendations Service Plugin.

Method Declaration
Copy
Method Parameters
optionsOptionsRequired

Recommendation options.


contextContextRequired

Metadata about the request.

Returns
Return Type:Promise<GetRecommendationsResponse>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?