What is the use ProductOption Enum in Hybris?

Products are core to any commerce. This is the product which drives the whole business and workflow associated with it. Be it procurement, inventory management, Media management, order management, fulfillment to name a few. Everything revolves around Product.

Essentially, this leads to having hundreds of attribute associated with products. Price, Stock , promotion, categories are few data set attached to product. Since not every page will want to have every data set to be populated. This is also not efficient to propagate all data sets to front layer.

Product Option is an Enum, which categorize hundreds of attribute of products into few data sets. For example attribute related to stocks (stock level, stock status) will be under Stock data set. Now the population of Product data will be done on the required data sets of Product Option Enum.

Take the example of Order history page, here we don’t want user to see stock data, product reviews, product delivery modes. So it is useless to populate these data sets.


Hybris provides a Bean class DefaultModifableConfigurablePopulator, which takes a Map of populators as one of the property. This map will contain Product Option enum as the key and corresponding populator bean id as the value.


<alias name="defaultProductConfiguredPopulator" alias="productConfiguredPopulator"/>
<bean id="defaultProductConfiguredPopulator" class="de.hybris.platform.commercefacades.converter.impl.DefaultConfigurablePopulator" >
<property name="populators">
<map key-type="de.hybris.platform.commercefacades.product.ProductOption">
<entry key="BASIC" value-ref="productBasicPopulatorList"/>
<entry key="PRICE" value-ref="productPricePopulatorList"/>
<entry key="PRICE_RANGE" value-ref="productPriceRangePopulator"/>
<entry key="GALLERY" value-ref="productGalleryPopulatorList"/>
<entry key="SUMMARY" value-ref="productSummaryPopulatorList"/>
<entry key="DESCRIPTION" value-ref="productDescriptionPopulatorList"/>
<entry key="CATEGORIES" value-ref="productCategoriesPopulatorList"/>
<entry key="PROMOTIONS" value-ref="productPromotionsPopulatorList"/>
<entry key="STOCK" value-ref="productStockPopulatorList"/>
<entry key="REVIEW" value-ref="productReviewPopulatorList"/>
<entry key="CLASSIFICATION" value-ref="productClassificationPopulatorList"/>
<entry key="VARIANT_FULL" value-ref="productVariantFullPopulatorList"/>
<entry key="REFERENCES" value-ref="productReferencesPopulator"/>
<entry key="DELIVERY_MODE_AVAILABILITY" value-ref="productDeliveryModeAvailabilityPopulator"/>


If You want to add a new populator to the system, for example say video.

<enum class="de.hybris.platform.commercefacades.product.ProductOption">


Now redefine the configureable populator bean to include your populator. Now the product data will start having your data set as well.

<alias name="videoProductConfiguredPopulator" alias="productConfiguredPopulator"/>
<bean id="myProductConfiguredPopulator" parent="defaultProductConfiguredPopulator">
    <property name="populators">
        <map key-type="com.myproject.facades.product.MyProductOption" merge="true">
            <entry key="Video" value-ref="videoOptionPopulator"/>



What does ATP means in hybris?

ATP – Available to promise.

ATP is an integer, which defines, the number of stock that is available to promise to customer as sell-able. In real life, the stock present in warehouse doesn’t necessarily means that it is the amount, you can sell. this is because

  • Some stock available at a warehouse, when it start operations (after a reconciliation, typically every morning). it is known as Stock on hand (SOH).
  • some stock at a warehouse, may already be ordered, and waiting to be shipped. we can not sell it again. such stock is known as reserved.
  • We may ask for more stock from other partner/warehouse in a timely manner. such stock is called oversell.
  • an order is cancelled. so it would be available again. we need to subtract ordered quantity from reserved.
  • An order is returned. so it would be available again. we need to subtract ordered quantity from reserved.

so we see, there may be many business rules, which may define the ATP level. A typical definition of ATP may be:

ATP = ( SOH + OverSell ) – reserved

How to split an order into multiple consignment

While fulfilling an order, some time it is necessary for business to split the order into multiple orders.

For instance, a customer orders two items A and B, now A has delivery window of 2 days, while B can be delivered in minimum 5 days. Now business has the option to either ship both items in 5 days. But what if item A is fresh, and will get destroyed in 5 days. There may be a case, where customer wants a mandatory delivery of item A within 2 days. In such situations, if business house doesn’t want to loose customer, it has no choice but to split order and ship it multiple times. This is the case of split consignment.

Now there may be various conditions, which may call for splitting the order into multiple consignments. Above example is just one of them. For example, we may want to split consignment, based on warehouse from where item will be picked up. We may want to split consignment, based on product type (fresh or ambient) etc. These situations which decides the business logic to be a case for splitting the consignments, are known as splitting strategies. We can have as many as strategy to split, as we want.

By default, hybris creates only one consignment for an order. This is done by following service.


As you can see, that the orderSplittingService accepts a list of strategies, we can create many strategies, and split our order. The actual business logic for splitting will go into strategy class.

How to set up a svn environment for hybris projects?

Maintaining a version system for any project is one of the most crucial aspect. Hybris projects are not special in this regard. They also do have the same life cycle in terms of development. We need to maintain different environments like SIT, UAT etc. To provide a local development environment is also equally important.

Since the size of OOB Hybris is huge, it is difficult to put everything in SVN (or GIT). Also it is not advisable. The hybris is improvising every day. A new release should not give us pain in terms of development.

The best practice for versioning a hybris project could be:

  • Put only custom folder, containing customized extensions to versioning software.
  • Pass latest local.properties, localextensions locally to each developers.
  • Maintain copy of latest local.properties, localextensions in each of servers like development and SIT, UAT etc.
  • Hybris software is wrapped around custom folder on each environment.
  • Media folder could possibly in SVN or can be passed locally like property files.


  • production environment, normally is not connected to SVN. Rather we take the most stable copy from UAT and deploy it using some deployment tool like , bamboo.

What is omni-commerce?

I have heard of omnipotent. Alright, that is God, or a mobile now a days. But what the hack is this omni-commerce?

As the word suggest, a commerce which is present every where.

Just look around you and get a life. When did you last ordered a dress or ring for your wife (ok ..girlfriend)?

  1. You went to a local store, select it from hundred of it shown by salesperson, and after some negotiation, you bought it.  You are old school. You are so single channel person.
  2. You browsed through tanishq website. Select a design. Note down the SKU of ring. Then you go to a nearby Tanishq and buy the same ring at the same price. You need not to go through that staring look of sales person. Bravo. You have gone multi channel.
  3. You went to Amazon, download their pamphlet for rings, pass it to your girlfriend, she selects one, you called their call center, and ordered one. They deliver it to your sweetheart’s home. You have moved to next class of cross channel (select from print, ordered online).

From above, you see how a simple process of buying a ring could be modified, and how being shopping experience is boosted up now a days.

Now think of a more moderate approach. When you think of buying a ring. You start your action via a research on web. You want to see same kind of result all over. Be it mobile, web or physical shop. Same experience. Same price. Same discount. You want to use your makemytrip voucher in ebay retail. And you want to redeem it at all places, mobile , web, physical store or a kiosk at railway station. you want to modify delivery address. you want to have multiple option for payments. You want a seamless return and refund process.

Such kind of agile and dynamic behavior is served by omni commerce. Here customer centric application are made instead of channel specific.

Hybris is one of the leader in omni commerce technologies.