Page 1 of 1

Product level dynamic pricing

Posted: Wed Feb 15, 2012 5:08 am
by avinash
Hi,

After going through the pricing strategy being used in the Broad leaf commerce framework which is basically applying promotions at Order Item , Order, and Fulfillment Group level, I guess we need to have a promotion which basically applies at Product level. And also there should be a mechanism where we should be able to calculate the product price dynamically by applying all the product promotions to it, some thing like the PriceItemDroplet in ATG.

The problem with OrderItem level promotion is that the customer would only be able to see the discounted price after adding the item to the cart.

Regards,
Avinash

Re: Product level dynamic pricing

Posted: Wed Feb 15, 2012 12:28 pm
by jefffischer
Applying promotions outside of the cart is problematic for a couple of reasons:

1) Promotions can be created that apply to data that is not available until the item is in the cart (e.g. order total promotions). These types of promotions would need to be filtered out when looking for promotions at the product level.
2) The promotion engine applies a lot of complex logic (this is true of any promotion system) that if overused can impact the overall performance of catalog browsing.

With that being said, this type of solution can be created using Broadleaf Commerce. The general approach would be the following:

1) Use the dynamic pricing facility in Broadleaf Commerce. This provides a way to implement a service that calculates the price for an item that is displayed to the customer, rather than simply pulling the price from the database.
2) In the custom dynamic pricing service implementation, take the sku in question and create a temporary discrete order item and place in a temporary order to pass to the OfferService buildOfferListForOrder method. This would provide a list of offers valid for this temporary order. You would need to quickly filter out any order or fulfillment group promotions from this list.
3) Next, you can call applyOffersToOrder with the offer list and the temporary order to have the promotion engine place in the discounts. The discreteorderitem instance in the order will have the promotions that were applied (in case you want to list them in the UI) in addition to the reduced price that you can pass back out of the dynamic sku pricing service to the UI.

Of course, with this approach, I would consider choosing a catalog browsing approach that did not list a ton of product prices on a single page. Something more conservative is probably in order.

We are looking at making this approach more direct in the future, but this is the general approach currently.

Re: Product level dynamic pricing

Posted: Thu Feb 16, 2012 2:40 am
by avinash
Thanks Jeff for the response, the alternative approach looks good.