Working with Master and Variation Products

Product Output Configuration per Strategy/Endpoint

For each strategy or endpoint that outputs products (e.g., /products, /search, /recommendations, or /suggestions), you can define which product types should be included. Make sure that the product types you want to display are configured explicitly.

Related Stacked Endpoints:

  • /e/masters
  • /e/oneVariant
  • /e/variants

Working with Master Products

If you want to include master products in the results, there are several important considerations:

Facet Settings

Master products often do not have attributes themselves. As a result, the facet endpoint must be adapted accordingly.

  • facets: Update this endpoint to retrieve property groups from the variants of the master product.
  • facet_options: Decide how the facet counts should be calculated. Should the count reflect the number of matching master products or the number of variants?

Best Variant Selection

You can configure the output to include only one variant per master, which is commonly referred to as the best variant. It is up to the content manager to define what "best" means. For example, it might be:

  • The cheapest variant, or
  • The variant that best matches the selected facets.

If this behavior is not desired, you can simply return the original input block in the strategy output instead.

Non-Master Products

Not all products are master or variation products. Products that fall into neither category are typically called “products”. Ensure that they are also included in the API response where relevant.