Skip to content

Recommendation Settings

The Recommendation request has several settings that can affect how it returns products. Below is an overview of the settings, and their effects:

SettingData TypeDefault Value
AllowFillIfNecessaryToReachNumberOfRecommendationsBooleanTrue
AllowProductsCurrentlyInCartNullable BooleanNull
AllowReplacingOfRecentlyShownRecommendationsBooleanTrue
Custom**
NumberOfRecommendationsInteger10
PrioritizeDiversityBetweenRequestsBooleanFalse
PrioritizeResultsNotRecommendedWithinSecondsNullable IntegerNull
RecommendVariantBooleanTrue
SelectedBrandPropertiesNullable Data KeyNull
SelectedProductPropertiesNullable Data KeyNull
SelectedVariantPropertiesNullable Data KeyNull

AllowFillIfNecessaryToReachNumberOfRecommendations

Define whether Fill is permitted in the recommendation to ensure the recommendation slider is fully populated with products.

Fill can be further refined through the use of a Filter Scope.

Defaults to True.

AllowProductsCurrentlyInCart

Defines whether the recommendation slider is allowed to display products that have already been added to the card.

Defaults to Null.

AllowReplacingOfRecentlyShownRecommendations

Defines whether or not to switch up the recommendation slider with varied products, to prevent users from continuously being presented with the same limited number of products.

Defaults to True.

Custom

The Custom setting is meant for internal use by Relewise, and should not be used. If you believe you need to employ a custom recommendation setting not found on this page, make sure to reach out to us first, so we can assist you in implementing your desired functionality correctly.

NumberOfRecommendations

Defines the amount of products to be returned in the recommendation request. Default value is 10. Relewise recommends not returning more products than you need, to keep response sizes minimal.

Defaults to 10.

PrioritizeDiversityBetweenRequests

This setting prevents users from seeing recommendations that have previously been shown in other recommendation sliders with this setting set to True.

Defaults to False.

PrioritizeResultsNotRecommendedWithinSeconds

Defines a period of time, in seconds, where Relewise will prioritize not recommending products that have already been recommended to the same user. This has no effect if the user is anonymous.

Defaults to Null, which is treated as 1 second.

RecommendVariant

Defines whether the request may return Variant products alongside regular products.

Defaults to True.

SelectedBrandProperties

Defines the Brand properties to be returned in the request.

Defaults to Null.

SelectedProductProperties

Defines the Product properties to be returned in the request. Common data keys include DisplayName, Pricing, CategoryPaths.

Defaults to Null.

Note that the property allVariants should be used with caution, as it returns all variants regardless of filters. This means that for sites with a large amount of variant products, the response can become prohibitively big and cumbersome. To avoid performance issues, use this property sparingly and with caution.

If you are uncertain of whether or not to use allVariants, reach out to us so that we might advise you on the best case for your site.

Example of a SelectedProductProperties

json
"SelectedProductProperties": {
    "DisplayName": true,
    "CategoryPaths": true,
    "Assortments": false,
    "Pricing": true,
    "AllData": true,
    "ViewedByUserInfo": false,
    "PurchasedByUserInfo": false,
    "Brand": true,
    "AllVariants": false
}

SelectedVariantProperties

Defines the Product properties to be returned in the request. Common data keys include DisplayName, Pricing, AllSpecifications.

Defaults to Null.

Don't know us? Don't worry - you can find more information about us, by visiting our main page www.relewise.com