Skip to content
Last updated

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.

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.

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.

Listing, Searching, and Browsing Products

The primary method for finding products is ListProducts2.
This method returns a list of 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 CategoryIds for navigation lists.
  • manufacturerSeed: Comma-separated list of ManufacturerIds for navigation lists.
  • flagSeed: Comma-separated list of FlagIds for navigation lists.
  • parametricsSeed: Comma-separated list of ParametricIds for navigation lists.
  • statusSeed: Comma-separated list of StatusIds for the app.
  • pricelistSeed: Comma-separated list of PriceListIds, 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 StoreIds, 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:

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.
    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 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