Eric Deschambault
Feb 2, 2022
(0 votes)

eCommerce merchandising series: dynamic categories (B2C)

This is the 3rd post in my "eCommerce merchandising series", where I share some ideas and strategies that I had the chance to implement in my years working with B2C and B2B retailers on the Optimizely Commerce platform! Today, I'd like to share some thoughts on dynamic category pages, that is, category product pages that are updated dynamically in your product catalogue, based on rules, without manual intervention. The rules configured by the merchandising team will allow to determine what products will be displayed on those category pages.

A typical use case would be the brands category pages. For retailers having multiple brands, they will want to have the option to display category pages per brands, which is time consuming and low value to maintain manually. Those brand pages are usually outside of the main catalogue hierarchy (but might sometimes fall under a main category if it makes sense to showcase brands for a specifc category of products).

Another typical use case would be to display the newest products in a category page. Here, it can also make sense to display newest products under every main category.

While this is a core feature in Optimizely B2B Commerce, it's not yet the case in B2C Commerce, but hopefully will be added soon:) Nonetheless, most of our retail clients ends up having this type of requirement. Since the Optimizely B2C Commerce platform is quite extensible in that matter, we were able to build our own engine that allows to display showcase products in a category, based on rules created by the merchandising teams via the Commerce Catalogue UI. I'm sure there are many other ways to achieve this - don't hesitate to comment below ;) -  but I wanted to share one approach here that worked out pretty well and that consists of (1) creating a block to configure the category rules, (2) extending the categories to allow merchandisers to stack multiple rules per category and (3) creating a schedule job to update the categories based on the rules.

Let's take a closer look, shall we.

Dynamic Category Rules Block

This block is actually quite powerful and allows the merchandisers to create a dynamic category based on either an existing promotion (ex: "20% end of year sale") or based on existing product attributes. It also allows them to apply an uppder and lower inventory threshold, so that, for example, the dynamic category would discard products with inventory less than 10 units.

The "Promotion" section is a drop and down that exposes all active and future promotions configured in the Optimizely Marketing module. It's important to also display future promotions if we want to allow merchandisers to prepare the dynamic category ahead of a time, before a specific campaign kicks in.

The "Product attributes" is composed of 3 fields: 

  1. Field Name: all product attributes are exposed in a dropdown. If your products are coming from an ERP or PIM, it's important to synch enough product attributes that will give the flexibility needed by the merchandisers to build their rules. Make sure to speak with them when creating the attributes!
  2. Filter Operator: This operator can be "Equal", "Not equal", "In" , "Not In", "Contains" or "Not Contains" (note that we could easily think of other operators if there's such a need with your product attributes).
  3. Filter Value: this is a simple text field.

For example, if there's a Boolean product attribute called "New Arrivals", the rules would be: "New Arrivals" EQUALS "True"

Extending the commerce catalogue categories

The Category page type in Optimizely B2C Commerce Catalogue has been extended to add a new section that we have called "Product Assignment". This allows the merchandising team to toggle on or off the dynamic assignment for this category, as well as to add their dynamic category rules block. They can then publish the page right away, or schedule it at a future time (ex: to publish at the same time as a campaign).

Bonus : to allow merchandisers to preview the rules, we made sure that they could use the native "Preview" feature of the Optimizely. The "Preview" feature will render the category page using the rules in the category, even though the page is not published yet, allowing to preview what it will look like.

Scheduled Job

Finally, we created a scheduled job to automatically refresh the dynamic categories at a specific interval. This typically runs after a product import or synch from the ERP, and update the assignation of products to the dynamic categories, so that the products are displayed on the front-end as well as in the commerce catalogue.


Voilà! It's that simple :) From a site visitor perspective, on the website, dynamic categories and regular categories just look the same. This is a tool to help maintain the product catalogue and to give the flexibility to the merchandising teams to create their own dynamic category rules.
Let me know in the comments what you think of this solution, and how you would typically solve this kind of challenge.

>> Don't miss out my other blog posts in this serie:

Feb 02, 2022


Please login to comment.
Latest blogs
Official List property support

Introduction Until now users were able to store list properties in three ways: Store simple types (int, string, DateTime, double) as native...

Bartosz Sekula | Mar 28, 2023

New dashboard implemented in CMS UI 12.18.0

As part of the CMS UI 12.18.0 release , a new dashboard has been added as a ‘one stop shop’ to enable editors to access all of their content items,...

Matthew Slim | Mar 28, 2023

How to Merge Anonymous Carts When a Customer Logs In with Optimizely Commerce 14

In e-commerce, it is common for users to browse a site anonymously, adding items to their cart without creating an account. Later, when the user...

Francisco Quintanilla | Mar 27, 2023

How to Write an xUnit Test to Verify Unique Content Type Guids in Content Management

When developing an Optimizely CMS solution, it is important to ensure that each content type has a unique GUID. If two or more content types share...

Minesh Shah (Netcel) | Mar 27, 2023

Extend TinyMCE in Optimizely CMS 12

Since technologies are upgraded to newer versions the ways to extend or override the out-of-the-box functionality are also changed a little bit so...

Ravindra S. Rathore | Mar 27, 2023 | Syndicated blog

Telemetry correlation for Scheduled Jobs in Optimizely

I previously demonstrated how to correlate telemetry to Azure Application Insights within a Hangfire job. But how about those jobs that are built a...

Stefan Holm Olsen | Mar 23, 2023 | Syndicated blog