Example of How Pricing Algorithms Price Items, Part 6

Learn how pricing algorithms calculate net price.

6. Calculate Net Price

6. Calculate Net Price

Let's see what happens when we calculate net price, tax, cost, margin, and shipping.

We will use a different scenario in the rest of this topic so we can fully illustrate the flow.

  • Calculate pricing for item AS100000

  • Provide a $10 discount on the order line for quantities 0 to 10.

  • Provide a $10 discount for customer Computer Service and Rentals.

Here are the main steps to calculate net price.

  1. Apply pricing terms from the sales agreement.

  2. Apply discounts from the pricing strategy.

  3. Apply the manual price adjustment.

  4. Get the invoice price.

Its more typical to apply discounts from the pricing strategy rather than to apply terms from the sales agreement, so this example starts with the strategy.

Consider an example. You add the AS10000 to an order with a quantity of 1.

Consider an example. You add the AS10000 to an order with a quantity of 1.

Note

  • Pricing algorithms get the base list price for the item from the Corporate Segment Price List.

  • Algorithms get simple, tier, and attribute adjustments from the discount list.

  • The pricing strategy references the price list and the discount list.

  • Algorithms examine the strategy, price lists, and discount lists to calculate pricing.

  • Your design time setup in the Pricing Administration work area determines run time pricing on the sales order in the Order Management work area.

Apply Discounts from Pricing Strategy

To calculate net price, you first apply discounts from the pricing strategy. Here are some typical setups you can do to meet your specific needs.

  • Apply a discount according to customer, order type, or customer class. Create a matrix that includes a condition according to these and other attributes on the order header or the order line. Use an attribute that describes item, such as Weight, or that describes the customer, such as Business Unit.

  • Cascade discounts. Pricing comes predefined to apply simple rules, then tier rules, then matrix rules. But pricing doesn't adjust the calculation after each discount. Assume you start with a value of $480, apply a simple $50 discount, which results in $430. You then apply a 10% tier discount. Pricing applies the 10% on $480, not $430. To cascade discounts so pricing applies 10% on $430, you can create your own element that stores the running unit price.

  • Modify the explanation message you display with the discount. For example, include the name of the term rule that you use in a discount matrix adjustment.

  • Include the adjustment group.

  • Remove a dimension from the adjustment basis.

Assume your set up uses the Corporate Pricing Strategy.

Assume your set up uses the Corporate Pricing Strategy.

Note

  • The Corporate Pricing Strategy contains three discount lists.

  • The Precedence for Corporate Discount List is 2.

  • Corporate Discount List contains rules for the AS10000 item.

    • There are two simple rules, a tier rule, and an attribute rule.

    • Each rule uses a Sale charge type and Price subtype except Maintenance Discount List, which uses Service and Fee.

  • None of the other lists contain rules for the AS10000.

  • Here's the set up for the tier rule.

    Minimum

    Maximum

    Application Method

    Adjustment Type

    Adjustment Amount

    0

    10

    Per Unit

    Discount Amount

    10.00 USD

    10

    100

    Per Unit

    Discount Amount

    20.00 USD

  • Assume the attribute rule gives a $100 discount when customer Computer Service and Rentals orders the AS10000.

The strategy references the Corporate Cost List. The list contains the AS10000 item, and it uses the Cost Amount attribute to specify the cost for the item.

Attribute

Value

Cost Amount

200

Now, change the quantity from 1 to 2 and see what happens.

change the quantity from 1 to 2 and see what happens.

Note

  • Your Price equals List Price minus the sum of the three new discounts.

    320 = 480 - (50 + 10 + 100)

  • The price breakdown displays the Cost Amount as Cost of Goods Sold.

  • Margin equals Your Price minus Cost of Goods Sold.

    120 = 320 - 200

Here are the SDOs.

The price breakdown displays the Cost Amount as Cost of Goods Sold

Note

  • The Calculate Net Price step provides the input SDO.

  • The Line entity in the input SDO represents one order line of a sales order.

  • The input SDO includes four ChargeComponent entities, one for each of the discount list candidates.

  • The algorithm creates entities for each successful pricing candidate in the output SDO. There are three successful candidates, so the SDO includes three DiscountCandidate entities, three TermSetup entities, and three ChargeComponent entities.

  • The service mapping works the same way as described earlier in this topic. The diagram doesn't include it for brevity.

Here's what the algorithms do.

What the Algorithms Do

How the Algorithms Do It

1. Get discount candidates.

Examine the discount rules that are currently active on the pricing strategy. Examine them sequentially according to the value of the Precedence attribute for the list on the strategy. Stop when we find the first list that contains a successful candidate.

All active discount rules on the strategy are candidates.

In our example, the precedence for Corporate Discount List is 2, so the algorithm examines the rules on SP Discount List first, then Corporate Discount List.

Identify the successful discount rule candidates. To be successful, the discount list must.

  • Contain the same item that the order line contains, such as AS10000.

  • Contain the same unit of measure that the order line contains, such as Each.

  • The access set on the discount list must match the business unit on the sales order header.

In our example, SP Discount List has a precedence of 1, so the algorithm examines it first. It doesn't find a candidate, so it examines Corporate Discount List. It finds at least one candidate so it doesn't examine any other lists, such as Discount List Recurring.

All four rules in Corporate Discount List meet the criteria, so they're all successful candidates.

2. Qualify charge criteria.

Qualify the rule for each successful candidate.

The input SDO specifies.

ChargeSubtypeCode: ORA_PRICE
ChargeTypeCode: ORA_SALE

So, the algorithm filters out the Maintenance Discount List rule because its charge type is Service, not Sale, and its subtype is Fee, not Price.

At this point, only three discount candidates remain.

3. Filter according to item precedence.

If you add a row to you discount list and set Item Level to All Items, and if you also add a specific item to the list, then the algorithm uses the row that contains the specific item and ignores the row that contains All Items. This example doesn't include a row that contains All Items, so this behavior doesn't apply.

4. Get discount candidates for configure options.

-

5. Convert currency.

If a candidate doesn't use the same currency that the input SDO specifies, then the algorithm converts the currency. For example, if the Tier Discount rule uses RMB but the input SDO specifies USD, then the algorithm converts RMB to USD.

6. Get pricing terms.

The algorithm gets pricing terms from your setup in Pricing Administration, such as on a matrix class that you import. For details, see Import Discount List Batches that Include Pricing Matrices.

The algorithm also examines terms that you set up in a sales agreement. For details, see Overview of Setting Up Sales Agreements in Order Management.

7. Apply pricing terms.

Apply the pricing terms we found. Run the Apply Pricing Terms algorithm.

Find charges in the pricing terms that match charges on the order line.

Create a separate TermQueue entity for each match we find.

In our example, three rules match, so we create a separate term candidate for each of these rules.

8. Get the pricing basis.

Get the pricing basis from the price list that's defined on the strategy. We need the pricing basis so we can apply adjustments to it.

Assume the Corporate Pricing Strategy contains the Corporate Segment Price List. This price list contains the AS10000, and the Base Price attribute for the AS10000 on the list contains 480.00.

9. Apply simple adjustments.

Create a chargeComponent entity for each TermQueue that references a simple discount rule. Store the chargeComponent in the Charge entity in the output SDO.

In our example, the Corporate Discount rule is the only simple rule that matches the criteria. Assume the rule applies a $50 discount.

Calculate the running unit price: 480 minus 50 equals 430.

10. Apply other adjustments.

-

11. Apply tiered adjustments.

Create a chargeComponent entity for each TermQueue that references a tier discount rule. Store the chargeComponent in the Charge entity in the output SDO.

In our example, the Tier Discount rule is the only tier rule that matches the criteria. Assume the rule applies a $10 discount.

Calculate the running unit price: 430 minus 10 equals 420.

12. Apply matrix adjustments.

Create a chargeComponent entity for each TermQueue that references an attribute discount rule. Store the chargeComponent in the Charge entity in the output SDO.

In our example, the Attribute Discount rule is the only attribute rule that matches the criteria. Assume the rule applies a $100 discount.

Calculate the running unit price: 420 minus 100 equals 320.

13. Control manual adjustments.

If the pricing term doesn't allow the flow to apply a matrix adjustment, then the algorithm sets the Can Adjust attribute on the charge to N to prevent the user from applying a manual adjustment in the Order Management work area.

Here are details about attributes in the SDOs.

Entity

Attributes in Input SDO

Attributes in Output SDO

Charge

ChargeSubtypeCode: ORA_PRICE

ChargeTypeCode: ORA_SALE

PriceTypeCode: ONE_TIME

RunningUnitPrice: 480.00

RunningUnitPrice: 320.00

ChargeComponent

-

ChargeComponent for the simple Corporate Discount rule.

ChargeComponentId: 5
ChargeId: 1
CurrencyCode: USD
ExplanationMessageName: QP_DISCOUNT_ADJ
ExtendedAmount: -100 USD
PriceElementCode: QP_DISCOUNT_ADJ
PriceElementUsageCode: PRICE_ADJUSTMENT
PriceValidFrom: 2019-06-03 @ 21:58:27
SequenceNumber: 1004
SourceId: 300100177810852
SourceTypeCode: PRICING_TERM
UnitPrice: -50 USD

ExtendedAmount equals UnitPrice 50 multiplied by Quantity 2 equals $100.

Details for the other charge components contain similar data.

Note

  • The list price provides a value of 480 for the RunningUnitPrice in the input SDO.

  • The RunningUnitPrice is 480 minus discounts from the three rules equals 320.00.

Here are some of the functions you can use with the Apply Discounts algorithm.

Function Name

Description

getDiscountRules

Get the discount rules that you set up on the strategy for the item.

getPricingTerm

Get the pricing term.

getComponentDiscountRules

Get the discount rules that you set up for configure options in a configured item.

Here are some of the functions you can use with the Apply Pricing Terms algorithm.

Function Name

Description

getAdjustmentBasisName

Get the translated name of the adjustment basis.

getChargeDefinitionName

Get the translated name of the charge definition.

getContractHeader

Get details from the contract header.

getContractLine

Get details from the contract line.

This step also uses the Apply Matrices and Apply Tiered Pricing algorithms. See the first part of this topic for a description.

Apply Manual Price Adjustments

What happens when you apply a manual price adjustment?

Assume your competitor offers a similar product, so you apply a manual price adjustment to match that price.

Assume your competitor offers a similar product, so you apply a manual price adjustment to match that price.

Note

  • You click the pencil in the Your Price column.

  • You use the Price Adjustments dialog to specify the manual price adjustment.

  • You apply a $300 price override.

Examine the breakdown.

Examine the breakdown.

Note

  • The override is 300, Your Price before the adjustment was 320, so the algorithm does a minus 20 adjustment.

  • Your Price equals List Price minus the sum of the four discounts.

    300 = 480 - (50 + 10 + 100 + 20)

  • Margin equals Your Price minus Cost of Goods Sold.

    100 = 300 - 200

Here are the SDOs.

What happens when you apply a manual price adjustment

Note

  • The output SDO from the Apply Discounts from Pricing Strategy step provides the input SDO.

  • The ManualPriceAdjustment entity contains the values you set in the Price Adjustments dialog when you modify the sales order in the Order Management work area.

  • Use the Apply Manual Adjustments For Goods and Services algorithm.

  • The running unit price for the charge on the input SDO after applying discounts from the pricing strategy but before applying the manual adjustment is $320.

  • The running unit price for the charge on the output SDO after applying the manual adjustment is $300.

  • The algorithm uses the ManualPriceAdjustment entity to apply the sales price charge on the line.

  • The algorithm uses your set ups in the Pricing Administration work area.

Here's what the algorithm does.

What the Algorithm Does

How the Algorithm Does It

Validate manual price adjustments.

Makes sure.

  • There's a matching charge.

  • Pricing can manually adjust the charge.

  • Pricing supports the manual adjustment type.

  • Pricing can determine the rate for the currency conversion.

  • The currency type supports a manual price adjustment according to amount.

Convert currency.

If you must do a currency conversion, then determine the conversion rate.

Calculate manual adjustments for rolled up charges.

-

Calculate manual adjustments for native charges.

-

Here are details about attributes in the SDOs.

Entity

Attributes in Input SDO

Attributes in Output SDO

ManualPriceAdjustment

AdjustmentCurrencyCode: USD
AdjustmentTypeCode: PRICE_OVERRIdE
AdjustmentValue: 300
ChargeDefinitionId: 3001000070841552
ChargeParentEntityCode: LINE
ChargeParentEntityId: 1
ChargeRollupFlag: N

Adjustment Type Code identifies the value the user selects for the Type attribute in the Price Adjustments dialog.

Adjustment Value identifies the value the user enters in the Amount attribute in the Price Adjustments dialog.

-

ChargeComponent

-

ChargeComponentId: 8
ChargeId: 1
CurrencyCode: USD
ExtendedAmount: -40 USD
PriceElementCode: QP_CUSTOM_ADJUSTMENT
PriceElementUsageCode: PRICE_ADJUSTMENT
PriceValidFrom: 2019-06-03 @ 21:58:27
SequenceNumber: 1007
SourceId: 0
SourceTypeCode: MANUAL_ADJUSTMENT
UnitPrice: -20 USD

Unit Price is the amount of adjustment needed to bring the net price to the value that you enter for the Adjustment Value after Pricing subtracts the automatic adjustments.

In this example, automatic adjustments are the sum of the discounts that the algorithm calculated. Recall the equation we used before you applied the manual adjustment.

  • Your Price equals List Price minus the sum of the three new discounts.

    320 = 480 - (50 + 10 + 100)

So, if Your Price is 320, and if you enter 300 as a price override for the manual adjustment, then we need to subtract another 20 from 320 to get to the Net Price of 300.

There's a quantity of 2 on the order line, so Extended Amount equals manual adjustment 20 multiplied by Quantity 2 equals $40.

Here's a function you can use with the Apply Manual Adjustments For Goods and Services algorithm.

Function Name

Description

getChargeDefinition

Use the charge definition code to get the view object for the charge definition.

Get the Invoice Price

Next, we calculate the invoice price.

calculate the invoice price

Note

  • You use the Create Charge Component with Running Unit Price algorithm. For details, see the Finalize List Price section earlier in this topic.

  • If you create a rounding rule for the currency that the charge references, then the algorithm rounds according to the rule.

  • The running unit price in the input SDO is 300.000.

  • The running unit price in the input SDO is also 300.000. No rounding happens in this example.

Here's what the algorithm does.

What the Algorithm Does

How the Algorithm Does It

1. Get the rounding rules.

-

2. Round.

Round the net price according to the rounding rules. Assume the rules in the example round to the nearest hundredth.

3. Calculate.

Calculate the difference between the rounded value and the value that the algorithm hasn't rounded, then store the difference as a rounding adjustment.

Assume you create a rule that rounds to decimal precision two, or hundredth. If the input SDO contained 300.473, then the rounded value would be 300.47, and the adjustment for the net price is 47 cents.

Here are details about entities in the SDOs.

Entity

Attributes in Input SDO

Attributes in Output SDO

ChargeComponent

-

ChargeComponentId: 9
ChargeId: 1
CurrencyCode: USD
ExtendedAmount: 600 USD
PriceElementCode: QP_NET_PRICE
PriceElementUsageCode: NET_PRICE
SequenceNumber: 1008
SkipRunningPrice: Y
TaxIncludedFlag: N
UnitPrice: 300.00 USD