A note from 2026: This article was published in 2016 and refers to hybris 6.0, which is long out of support; the product is now SAP Commerce Cloud. Promotion engine APIs, rule models, deployment options, and licensing have changed significantly, so treat this proof of concept as an architectural reference rather than drop-in implementation guidance.

Promotions are a very effective way to increase sales. Businesses need to be able to easily create promotions for any and every occasion. Having a good promotion engine integrated with your e-shop will definitely increase your sales and keep your customers happy.

E-commerce platforms commonly have built-in promotion engines. This year, hybris 6.0 introduced a new promotion engine. It is based on Drools, the popular open-source Java-based rules engine project.

This promotion engine is mainly used for cart calculation. There are no promotion messages on product pages, category pages, or search result pages in hybris 6.0.

This post is about designing a solution where promotions are calculated for category and search pages. These pages all have a set of products. So the challenge is to calculate promo prices for every item according to the product-level promotion rules—and to do it fast!

Complexity

Promotion calculation is a CPU- and memory-intensive process. Performing heavy calculations for category and search pages will significantly affect overall system performance. To meet the performance requirements, you need to scale up your application cluster considerably.

Diagram showing promotion calculation load in a hybris cluster

Hybris mainly uses the promotion engine on the cart page, which is not requested very often (~5%). For category pages, you need to call the promotion engine up to 20 times more often, all within a single HTTP request session. The category page is used at least twice as often as the cart page. So the promotion calculation for category and search pages will create a significant additional burden on the application cluster.

Chart comparing promotion calculation frequency across page types

To overcome this issue, you can use brute force by scaling up the application cluster.

Diagram showing scaled-up hybris application cluster

However, adding new hybris application nodes can be costly because of the SAP licensing model.

Today’s experiment shows that the promotion engine is no longer a bottleneck in hybris.

Video of PoC

Solution

Screenshot of product list with promotion calculation

Architecture diagram for distributed promotion calculation service

Promotion calculation cluster:

Limitations

Technical details

© Rauf Aliev, July 2016