# Listing, Searching, and Finding Products in Norce Commerce Product Service **Overview:** This page explains how to develop frontend applications that use Norce Commerce Services for searching, finding, and listing products, including handling product variants. It covers common practices, input parameters, and tips for optimizing performance and usability. ## Approaches to Product Listing and Search There are two main patterns for listing and searching products: - **Using Norce Commerce Services:** Call API methods directly, often with caching for performance. - **Using External Search Engines:** Update external search indexes using the Norce Commerce Product Feed. This is not explained further on this page. [Learn more about this pattern here.](/developer-portal/app-development/working-with-products-and-search-using-norce-product-feed) You can also combine both approaches, such as using external search for initial queries and Norce Commerce Services for loading filters or details. The best approach depends on your needs, systems and catalog complexity. ## Understanding the ProductItem Model The `ProductItem` entity in Norce Commerce is complex and may return more data than needed for a given client. Familiarity with the model helps you extract relevant information efficiently. - [Learn more about the ProductItem and ProductItem2 data models.](/developer-portal/app-development/productitem-model) ## Listing, Searching, and Browsing Products The primary method for finding products is [**ListProducts2**](/api-reference/services/productservice/openapi/products/listproducts2). This method returns a list of [**ProductItem**](/api-reference/schemas/product#productitem) objects. ### Input Parameters Parameters are categorized as: - **User Actionable:** Most often set by user actions (e.g., filters, search). - **Contextual:** Most often set by application context (e.g., site config like a specific page with products listed, or user from a profile, like customer specific assortments). - **Either:** Can be set by context or user action. **Contextual parameters:** - `categorySeed`: Comma-separated list of `CategoryId`s for navigation lists. - `manufacturerSeed`: Comma-separated list of `ManufacturerId`s for navigation lists. - `flagSeed`: Comma-separated list of `FlagId`s for navigation lists. - `parametricsSeed`: Comma-separated list of `ParametricId`s for navigation lists. - `statusSeed`: Comma-separated list of `StatusId`s for the app. - `pricelistSeed`: Comma-separated list of `PriceListId`s, can be context or user-specific. - `customerId`: Adds products/prices bound to the customer. - `companyId`: Adds products/prices bound to the company (requires `customerId`). - `culturecode`: Overrides default language, usually from user settings. - `asVariants`: Obsolete; use `ListVariantItems` instead. **User actionable parameters:** - `storeSeed`: Comma-separated list of `StoreId`s, usually chosen by the user. - `pageNo`: Page number to return. - `filter`: User-selected filters. **Parameters that can be either contextual or user actionable:** - `sort`: Sets sort order; can be context or user-driven. - `pageSize`: Number of items per page; can be context or user-driven. - `searchString`: Search term; can be user input or context-based. > **Note:** Norce free-text search covers fields like `PartNo`, `ERPName`, `IntegrationPartNo`, as well as supplier part numbers, EAN codes, names, manufacturer, synonyms, category names, and product family names in the specified or default language. ### Other Listing Methods Besides **ListProducts2**, Norce Commerce Services provides additional methods for specific scenarios: - **List by Customer or Company:** [**ListProductsByCustomer**](/api-reference/services/productservice/openapi/products/listproductsbycustomer) returns products based on customer/company price lists. - **List by IDs or Part Numbers:** [**ListProductsByIds3**](/api-reference/services/productservice/openapi/products/listproductsbyids3) and [**ListProductsByPartNos**](/api-reference/services/productservice/openapi/products/listproductsbypartnos) fetch details for known products. - **List by Promotion:** [**ListProductsByPromotionRequirement**](/api-reference/services/productservice/openapi/products/listproductsbypromotionrequirement) lists products for a campaign or promotion. - **List Included Products:** [**ListIncludedProducts**](/api-reference/services/productservice/openapi/products/listincludedproducts) returns products in a package. - **List by Price List:** [**ListProductsByPriceList2**](/api-reference/services/productservice/openapi/products/listproductsbypricelist2) lists products for a specific price list or campaign. ## Dynamic Listing Results Some listing methods allow you to control the amount of data returned using the `expand` parameter. For example, `expand=None` returns basic info, while `expand=PriceOnhand` adds price and availability. Currently, only **ListProductsByPriceList2** and **ListVariantItems** use this pattern. ## Handling Product Variants in Listings Variants are often not shown in product listings until a user views a specific product. However, you may want to display variant data (e.g., color images, buy buttons) in the list. There are two main approaches: 1. **Set `asVariants` to true:** Returns a `ProductItem` for each variant. Use `GroupByKey` to group results. *Note: Paging and filtering are based on products, not variants. This can result in more items than the page size if products have many variants.* 2. **Use `ListVariantItems`:** For large catalogs or many variants, use [`ListVariantItems`](/api-reference/services/productservice/openapi/variants/listvariantitems). Pass product IDs from a product list to get variant-specific info. *Note: Only variant parameters are used for filtering. This method supports the `expand` parameter for dynamic results.* > **Note:** For larger more complex variant structures, use the approach with **ListVariantItems**, because of the risk of a performance hit the other approach might have. ## Additional Listing Features - **BestSelling and Popular Listings:** Use sorting with the `popularityRank` parameter instead of legacy options. - **Families:** Methods exist to list products from the same family, but this may be unified in the future. - **Search Suggestions:** [**SearchProductsLite2**](/api-reference/services/productservice/openapi/products/searchproductslite2) provides search suggestions for autocomplete functionality. ## Deprecated and Obsolete Methods - **TopProducts:** No longer supported and will be removed. - **Node-based Listing:** Methods using navigation nodes are deprecated. ## Key Takeaways - Choose the listing/search approach that fits your catalog and performance needs. - Understand the `ProductItem` model to extract relevant data. - Use the `expand` parameter for efficient data retrieval where supported. - For variants, prefer `ListVariantItems` for large catalogs. - Refer to the API documentation for method details and parameter options. ## Further Reading - [Working with Products and Variants](/developer-portal/app-development/working-with-products-and-variants): Details on handling product and variant data. - [Working with Products and Search using Norce Commerce Product Feed](/developer-portal/app-development/working-with-products-and-search-using-norce-product-feed): Learn about integrating external search engines.