--- title: "clearExcludedProducts()" slug: "clearexcludedproducts" updated: 2024-06-13T14:09:48Z published: 2024-06-13T14:09:48Z canonical: "docs.xgen.ai/clearexcludedproducts" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.xgen.ai/llms.txt > Use this file to discover all available pages before exploring further. # clearExcludedProducts() `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 ```javascript 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. ```javascript // Create integration (use existing integration if you already created one) const integration = new XG(...config); // Clear excluded products integration.clearExcludedProducts(); ```