Sana Assistant (online)
Table of Contents

ProductSearchSuggestion reference

This article provides reference material about ProductSearchSuggestion record.

ProductSearchSuggestion record

Properties

Value

The product search suggestion value.

FacetFilter

The facet filter which should be applied instead of searching for suggestion value.

Methods

ForProductCategory

Creates the product category search suggestion. This method allows the creation of search suggestion related to the specific category page.

Example:

var suggestion = new ProductSearchSuggestion(Value: "black");
var categoryId = "BlackAndWhite";
var facetFilter = new ProductSearchFacetFilter(
    Values: [new ProductSearchFacetFieldValues(Name: "ProductCategory", Values: ["B&W"])],
    RangeValues: []);

var categoryFacetSuggestion = new ProductSearchSuggestion(Value: "Black & White", FacetFilter: facetFilter);
var categorySuggestion = ProductSearchSuggestion.ForProductCategory("Black & White", categoryId, facetFilter);

See also