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.
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.
The primary method for finding products is ListProducts2.
This method returns a list of ProductItem objects.
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 ofCategoryId
s for navigation lists.manufacturerSeed
: Comma-separated list ofManufacturerId
s for navigation lists.flagSeed
: Comma-separated list ofFlagId
s for navigation lists.parametricsSeed
: Comma-separated list ofParametricId
s for navigation lists.statusSeed
: Comma-separated list ofStatusId
s for the app.pricelistSeed
: Comma-separated list ofPriceListId
s, can be context or user-specific.customerId
: Adds products/prices bound to the customer.companyId
: Adds products/prices bound to the company (requirescustomerId
).culturecode
: Overrides default language, usually from user settings.asVariants
: Obsolete; useListVariantItems
instead.
User actionable parameters:
storeSeed
: Comma-separated list ofStoreId
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.
Besides ListProducts2, Norce Commerce Services provides additional methods for specific scenarios:
- List by Customer or Company:
ListProductsByCustomer returns products based on customer/company price lists. - List by IDs or Part Numbers:
ListProductsByIds3 and ListProductsByPartNos fetch details for known products. - List by Promotion:
ListProductsByPromotionRequirement lists products for a campaign or promotion. - List Included Products:
ListIncludedProducts returns products in a package. - List by Price List:
ListProductsByPriceList2 lists products for a specific price list or campaign.
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.
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:
Set
asVariants
to true:
Returns aProductItem
for each variant. UseGroupByKey
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.Use
ListVariantItems
:
For large catalogs or many variants, useListVariantItems
.
Pass product IDs from a product list to get variant-specific info.
Note: Only variant parameters are used for filtering. This method supports theexpand
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.
- BestSelling and Popular Listings:
Use sorting with thepopularityRank
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.
- TopProducts:
No longer supported and will be removed. - Node-based Listing:
Methods using navigation nodes are deprecated.
- 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.
- Working with Products and Variants: Details on handling product and variant data.
- Working with Products and Search using Norce Commerce Product Feed: Learn about integrating external search engines.