blog logo
[ultimatesocial count="true" networks="linkedin,facebook,twitter" url="" skin="minimal"]

9 Frequently Asked Questions About Discount Proration in Demandware

Robert Ward • September 15, 2015

By Robert Ward, Technical Lead

discount prices

Marketers know that offering a discount or special promotion is an effective way to attract customers and drive sales. However, issues can arise when it comes to discount proration, or applying promotional adjustments across an eCommerce order. This is a topic that often comes up on some of our Demandware eCommerce implementations. We find that many of our clients regularly have a business need to spread promotional adjustments across the items in an order and account for these adjustments in some manner. The following are nine questions that we often see when it comes to discount proration with our clients’ Demandware stores.

1.  Why Would I Need Proration?

The reasons for this type of requirement are varied; however, the most common reason seems to be for accounting and/or record-keeping purposes. Clients often feel that they can get a more realistic picture of how their marketing campaigns are performing, if they can determine the margins on all of the products that are associated with a given campaign.

2.  What Is An Example of Proration?

For example, say that your client is running a Buy One Get One (BOGO) promotion. So, if the customer pays full price for Product A, they receive Product B of equal or lesser value for free. Mathematically, these types of promotions are essentially just a half-off discount on two items. But psychologically, the word FREE tends to increase the perceived value received, making BOGO an effective tactic to boost sales.

While from the customer’s perspective, Product A was full price and Product B was free, this is not necessarily true from an accounting perspective. These numbers can be deceptive, making Product A seem profitable and Product B seem unprofitable. Since both products contributed to the promotion (and thus the sale), it is more accurate to say that both products each deserve a portion of the discount.

3.  How Can I Use Demandware For Proration?

To start, it is important to know that there are 3 types of promotions in Demandware: Product, Shipping, and Order. Product and Shipping discounts typically apply to a specific line item in the order, so the discount assignment on those tends to be fairly accurate (with the exception of BOGO, as you’ll recall from the previous section). Order discounts, however, are applied to the entire cost of an order, so their impact is a little harder to quantify at the item level.

As a result, pro-rated order discount values are not stored in the order. If your accounting, fulfillment, or order management system (OMS) needs to know the pro-rated amounts, a custom solution will need to be developed.

Thankfully, Demandware does provide a bit of help right out of the box. The Demandware API has a few methods that can automatically perform the calculations for you. The PriceAdjustment, ProductLineItem, and Shipment objects all have a method or two that determine the pro-rated price of the item they are applied to, when factoring in both order-level and BOGO price adjustments.

4.  How Is the Proration Distributed Among the Items?

Best of all, these prorations are determined relative to each item’s share of the order.

For example, say you have two products in an order: Product A ($50) and Product B ($100). Since Product B accounts for two-thirds of the order total, it will receive two-thirds of any pro-rated order and/or BOGO discounts.

5.  How Robust are Demandware Proration Capabilities?

By default, Demandware’s proration API only calculates the pro-rated prices for “qualifying” units only. Qualifying products can be defined in the promotion setup in Demandware Business Manager. By disabling global product exclusions, you can effectively make all products “qualifying” for a promotion if you so choose.

In addition, the proration API takes into account “excluded” products. Product exclusions can also be defined in the promotion setup in Business Manager. In addition, class exclusivity still applies as well. For example, if a product line item receives a class exclusive product-promotion, it can still receive a pro-rated order discount as well, since an Order type promotion and a Product type promotion don’t overlap.

6.  How Does Demandware Proration Work with Taxes?

Demandware calculates tax for product line items AFTER both product and pro-rated price adjustments are considered. Additionally, there is a promotion site preference called Line Item Tax Basis, that will (when enabled) tax items according to their pro-rated price after order-level and BOGO discounts have been accounted for.

Something to watch out for is the way taxes are rounded. If they are calculated on a line item basis, the final values could possibly be higher than expected due to a combination of “off by one cent” miscalculations from each line being rounded up.

7.  How Does Demandware Proration Work With Shipping Costs?

For the most part, shipping costs are unaffected by order-level and BOGO prorations. The only exception to the rule is on shipping promotions that need a certain merchandise total to qualify. The default merchandise total used to make this determination is the prorated one. So, there is a possible scenario where a shipment would appear to qualify for a certain shipping promotion, but ultimately falls short of qualifying once the prorated discounts are considered.

8.  What Are Demandware Proration Limitations?

With all that, the API methods are simply that– methods. There is currently no way to configure the Demandware platform to use those pro-rated values by default in the order export. Depending on the order management system you are integrating with, you will likely need to put pro-rated prices into custom attributes for them to appear in the order XML.

Second, it is common that clients who require discount proration will often have more complicated tax scenarios than the average. On occasion, the tax scenarios can not be achieved with the proration API, and will require a complex series of custom calculations.

9.  Anything Else I Should Know About Proration?

It is imperative to have a solid strategy in place for proration ahead of beginning development. Since this is a complex requirement for all but the most basic options, it is necessary to have a thorough list of test scenarios and expected outcomes available long before user acceptance testing begins.

Ideally, the implementation team would start with this documentation already available, so that the expected values can be compared against the output. In addition, since Demandware only supports the prorated prices API in custom attributes, it is important to set up a solid data mapping strategy to the OMS as early on in the project as possible.

To learn more about LYONSCG’s Demandware services, or to request more information, please visit our Demandware page.


Robert Ward is a Technical Lead on the LYONSCG Implementation team, and has been building Demandware sites since 2011. Robert is a certified Demandware Developer, and he is an avid fan of all things basketball-related.

Robert Ward

About the author

Robert Ward

Subscribe to our blog

Let's discuss the next step in your commerce journey.

XSchedule a meeting