This post is intended as a brief overview of the purpose and nature of the Spread Discount Driver Workflow Process which is used when a user uses the Spread Discount Button in the Quote Line Items Totals Applet. It's the sort of button most of us have seen more than once, and maybe you just ignored it.
User Behaviour and Options
As a side note, this button, and the underlying processing that we will investigate, is according to the documentation, the recommended way of entering discount over the total Quote or Order, as opposed to the Discount field in Quote Header.
So when the User gets round to clicking the button, the user must first decide how to apply the Discount – as a target price, a percentage or discount amount. This will be used in the process that follows.
The default behaviour of the Spread Discount button will be to update the Quote, based on the value entered in the Manual Discount field (visible in the Pricing View Tab). If the user had already entered a Manual Discount, Manual Price Override is updated instead.
Note – One Time Line Items
It is important to note that Spread Discount will only update Line Items with the Type of “One Time”. Any items with the Type “Recurring” or “Usage” will be ignored.
Note – Spread Discount Button Scope
The User is not limited to applying the Spread to the whole of the Quote. For example, the User can select two or more items in the Line Items Applet and proceed to click the Spread Discount button, choosing “Selected Items” from the Applet.
The User may of course also make use of the other options (Product, Service, Training) which will apply the Discount to only Sales Products, Service Products or Training Products in the Quote or Order.
Note – Maximum and Minimum Prices (in Price List)
When maximum and minimum prices are configured, Siebel will respect these rules while spreading the discount.
Discount Amount and Target Total
When the User clicks the Spread Discount button and chooses one of the above options, a calculation is performed based on the choice of the User in the Source Field of the Pop-up Applet.
If you enter a Discount Amount or Target Total, Spread Discount first calculates a weighted average before distributing discounts. It calculates the weighted average as follows:
If the Source is List Price
Weighted Average = Line Item List Price / Total List Price
Manual Discount Amount = Weighted Average * Discount Amount
If the Source is Net
Weighted Average = Line Item Net Price / Total Net Price
Manual Discount Amount = Weighted Average * Discount Amount
For complete details of the calculations performed, see the relevant documentation .
The Spread Discount Driver Workflow Process is responsible for the actual work of the discount spreading. From the above picture, in order to understand the process at a high level it is important to note the following steps as being pertinent to the Spread Discount principle.
- As mentioned previously, not all items can be discounted, only one-time price items and this is the filtering step
- This Business Service is supplied by Oracle. The Method SpreadDiscount is hidden in Siebel Tools. For details of the basic calculation see the section below.
- Further PSP Processing happens at this stage – the Pricing Engine may have other work to do
Sync Row Set
- The Row Set representing the Quote, obtained in the first step of the Workflow Process but now with the successfully discounted Line Items, is returnedto the Quote and the Database
Readers familiar with Order Management will observe that many of the Business Service steps are using the Row Set Transformation Toolkit.
SpreadDiscount Method Algorithm
Below is a basic outline of the logic applied by the SpreadDiscount Method of the Business Service.
Siebel begins by obtaining the Base Price from the Pop-Up Applet and converts the Base Price and Minimum andMaximum Prices to the Currency specified in the Applet.
Suppose 2 items, as follows:-
Widget Quantity 1 Base Price 10 Minimum Price 7
Grommet Quantity 3 Base Price 5
Amount to Discount 5.50
Siebel then adds up all Base Prices up (multiplying each by Quantity) to get the Total Base Price. Then Siebel proceeds to get the Target Price (calculated from Amount To Discount or Percent To Discount depending on what theUser entered, as necessary). So it might look something like this, in our example:
Total Base Price = 10 + (3*5) = 25
Target Price = 25 - 5.50
Then Siebel will calculate the total to discount: Total To Discount = Total Base Price – Target Price.
Target Price = 19.50
The logic will loop through the rows of the Quote, following the logic below.
- Loop through all Rows that have not reached the Min/Max Price.
- Discount each amount by (Base Price/Total Base Price) * Total To Discount
- If that discount pushes the Line Item Price beyond Min/Max:
- Set the final price of item to its Min/Max
- …and remove that row from further discounts
First Line of Quote Discounted Price: (10 / 10) * 5.5 = 5.5
But that would push it below Minimum Price so set it to Minimum Price = 7.00 and remove from further adjustments
- After round completes, make adjustment so "removed" rows are not taken into account in the next round's calculation. For each of these rows:
- It’s Base Value * Quantity will be subtracted from the Total Base Price
- It’s Discount Amount*Quantity will be subtracted from Total To Discount
Subtract price of first item from Total Base Price (25 -10) = 15
Discount Amount * Quantity (3 * 1) subtracted from Total to Discount so Total to Discount is now 2.5
Looping continues until:
- Total To Discount can be spread evenly across all remaining line items
- or All items have been discounted to their respective min/max
So in our case, the next line would be processed like this:
Second Line Discounted (5/15)* 2.5 or 0.83 / item with Quantity of 3
Then Siebel will loop through all rows to convert each row back to the Line Item Currency and to round each to line item precision. Finally Siebel will add up rounding remainders and amount discounted.
The rounding remainder is added to the element with highest Base Price*Quantity that has not already reached its Min/Max. This continues until the rounding remainder rounds to 0 or until no items can be discounted further.
The Spread Discount Driver Workflow Process delivers reliable and understandable discounting to line items or entire Quotes in a simple to visualize way. The Workflow Process could be further customized to take into account custom logic. Functional Consultants who study the functionality would do well to familiarize themselves with the functionality to be able to predict the outcome.