clearExcludedProducts()

Prev Next

clearExcludedProducts() is used to clear the excluded products and reset them to no excluded values.

Excluded products must be configured prior to the prediction API being called. Otherwise, the excluded products will not be included in the request.

Syntax

clearExcludedProducts()

Parameters

None.

Return Value

This function has no return value.

Examples

Clear the context

In this example, we will clear the excluded products so that all products will be available for recommendations.

// Create integration (use existing integration if you already created one)
const integration = new XG(...config);

// Clear excluded products
integration.clearExcludedProducts();