Siebel Pricing Administration Guide > Pricing in the Run-Time Application > Spread Discount Pricing >

About the Spread Discount Algorithm


This topic contains a high-level description of the algorithm used by the spread discount service:

  • Get the BasePrice (List Price or Net Price).
  • Convert all prices (BasePrice, Min, Max) to BaseCurrency. (Defaults to system currency, but user chooses from dialog box.)
  • Add up all BasePrices up (multiplying each by Qty) to get TotalBasePrice.
  • Get TargetPrice (calculated from AmtToDiscount or PercentToDiscount if necessary).
  • Calculate total to discount: TotalToDiscount = TotalBasePrice - TargetPrice.
  • Loop through the discounts one at a time:
    1. Loop through all Rows that have not reached min or max:
      • Discount each amount by (BasePrice/TotalBasePrice)*TotalToDiscount
      • If that discount pushes price beyond min or max, then:

        - Set the final price of item to its min or max

        - Remove that row from further discounts

    2. After round completes, make adjustment so maxed out rows are not taken into account in the next round's calculation. For each of these rows:
      • Its BaseValue*Qty will be subtracted from TotalBasePrice
      • Its DiscountAmt*Qty will be subtracted from TotalToDiscount
    3. Looping continues until:
      • TotalToDiscount can be spread evenly across all remaining line items, or
      • All items have been discounted to their respective min or max.
  • Loop through all rows to convert each back to the line item currency and to round each to line item precision.

    Add up rounding remainders and amount discounted.

  • The rounding remainder is added to element with highest BasePrice*Qty that has not already reached its min or max.

    This continues until the rounding remainder rounds to 0 or until no items can be discounted further.

Siebel Pricing Administration Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.