Containers

A container is a package that holds selected products or product categories. Use containers to specify the promoted products for certain types of promotions.

In a promotion rule, a container holds a set of products that the customer must buy to participate in the promotion. Certain types of promotions require use of a container to specify the products that are included in the promotion. It’s mandatory to use a container when you create one of the following types of promotions:
  • partner-product

  • buy-one-get-one

  • product bundle

  • product multi-buy

  • product discount with limited quantities

A container is optional when you create a free gift promotion.

Using Containers

After you add a container to a promotion rule, specify the products in the container. To do so, add one or more Qualifying Products or Qualifying Categories conditions to the container. These are the only two types of conditions that are supported by containers.

The following image shows the Conditions area of a partner-product promotion with two containers:

When you define multiple containers, avoid an overlap in the products that match the containers. Creating an overlap can cause performance problems and excessive memory consumption during the rule evaluation. Examples of container overlaps are:
  • Defining the same qualifying products in different containers.
  • Defining the same categories in different containers.
  • Defining a category in one container and a sub-category in a different container.

Containers in Partner-Product and Bundle Promotions

Depending on the type of promotion you are creating, you may have one container or several containers in your Conditions area. Consult the table for an overview of how to use containers to create specific types of promotions.

Type of Promotion Promotion Condition Promotion Action Instructions

Partner-product promotions

Example: Buy X, get Y 50% off

  • One or more Container elements specifying the full-price products or product categories.

  • One or more Container elements specifying the discounted products or product categories (the "partner products").

One of the following:

Percentage Discount on Partner Products

Fixed Discount on Partner Products

Target Fixed Price on Partner Products

Creating a Partner-Product Promotion.

Buy-one-get-one-free

Example: Buy one X, get Y free

  • One Container element specifying the products or product categories included in the promotion.

  • A second Container element specifying the free products or product categories.

Percentage Discount on Partner Products

Creating a Buy One, Get One Free Promotion

Product bundle

Example: Buy X, Y, and Z for $100

A separate Container element for each of the products included in the bundle. Target Bundle Price Creating a Fixed-Price Bundle Promotion

Product multi-buy

Example: Buy 3 X for $25

One Container element specifying the products or product categories in the multi-buy promotion.

Target Bundle Price Creating a Multi-Buy Promotion

Containers in Free Gift Promotions

You can create a free gift promotion that combines a Qualifying Products or Qualifying Categories condition with the Free gift action.

Example: "Buy a digital camera and get a memory card as a free gift." In this example, the digital camera is the qualifying product and the memory card is the gift.

In this type of free gift promotion, you can decide whether the qualifying products are eligible for further discounts:

  • If you add the qualifying products to a container, then the promotion consumes both the qualifying products and the free gift. No further product-level discounts can apply to the qualifying products.

  • If you do not add the qualifying products to a container, then the promotion only consumes the free gift. The qualifying products are still eligible for further product-level discounts.

For instructions, see Creating a Free Gift Promotion.

For more information about how Promotion Engine limits the promotions that can apply to a product, see Order Entry Consumption.

Containers Best Practice for Buy X Get X Discount/Free

For “Buy X Get X Discount” or “Buy X Get X Free” scenarios, when implementing discount or free offers on the second identical products or categories in the cart, follow the best practices for using containers.

Use only one container instead of two containers in Conditions area and both the “Qualifying products” and the “Partner products” containers in Actions area should reference this same single container.

If you use two containers that contain identical products or categories, the evaluation of Drools rule may enter an infinite loop without ever stopping. Specifically, the infinite loop issues can occur in the methods of RuleNetworkEvaluator.doUpdatesReorderRightMemory, RuleNetworkEvaluator.doRiaNode2 or RuleNetworkEvaluator.doUpdatesReorderLeftMemory. This can lead to high CPU usage and memory consumption, eventually causing the entire SAP Commerce Cloud process to stop responding.

You can refer to the following table for the best practice examples.

Type of Promotion Promotion Examples Promotion Condition Promotion Action

Partner-product promotions

(Buy X, get X discount scenario)

1. Buy any product Cyber-shot W55, get any Cyber-shot W55 for 50% off.

2. Buy any Sony cameras, get any Sony cameras for 20% off.

Only one single Container element specifying the qualifying products or product categories. Both the “Qualifying products” and the “Partner products” containers in Actions area should reference the same single container defined in Conditions area.

Buy-one-get-one-free

(Buy one X, get a second X free scenario)

1. Buy one Cyber-shot W55, get a second Cyber-shot W55 for free.

2. Buy any one Sony camera, get a second Sony camera for free.

Only one single Container element specifying the qualifying products or product categories. Both the “Qualifying products” and the “Partner products” containers in Actions area should reference the same single container defined in Conditions area.