Colleagues from e-commerce, in case anyone was interested, are there powerful engines for calculating shopping cart / promotions out there that allow the following (everything below is my own creation, there may be inaccuracies):
1) application of N promotions on M products in the cart in the most optimal way (minimum cart amount or most gifts). Example when it’s not the case: several promotional items enter together with several accessories into various promotions like “buy an accessory and get a gift/discount”. Usually, promotions are applied in some specific order, and the products under promotion are locked out from subsequent promotions.
This also includes the automatic determination that a buy 4 get 20% off offer is better than a buy 2 get 30% off.
2) calculating promotions for abandoned carts (if the price drops – an email is sent to the abandoner). This implies the possibility for batch processing and easy scalability in terms of performance.
3) adding a recommended product to the cart that leads to a decrease in the total cost. This happens, for example, if after reaching N rubles the delivery becomes free, but the total is less than the cost of delivery. As a result, you add a product, and the cart becomes cheaper. Such a feature exists in Hybris, but not exactly this way: these added products need to be set up as promotions, and typically there are significantly more accessories.
In general, some closer integration with recommendation capabilities seems to be from the same field.
4) splitting the cart into two parts. After the first purchase, you get a discount for the next purchase or a voucher, which when applied to the second part of the cart results in a reduction in overall expenses. This also covers promotions like get cheapest free.
5) promotions like “buy X products from category1 and Y products from category 2, get N% discount”. The cart can include more than X products from category1 and more than Y products from category2. How to choose products? And what if there are a couple more such promotions?
6) taking into account various external factors, such as loyalty cards, vouchers, orders, the customer’s region, and so forth.
7) capability to function for both retail and online stores. That is, it’s a separate cluster capable of calculations, which is accessed in real-time by other systems – online stores, POS terminals, ERP.
Accordingly, to maximize profits, and not savings, read some of the above points in reverse, so that promotions are applied in a way that is least favorable for the customer (possibly with an option for the customer to change this).