Example of How Pricing Algorithms Price Items, Part 8

Now we calculate cost, and then margin.

8. Calculate Cost and Margin

Before we get into the details, note that you can get actual costs from a source that isn't the cost list. For example, get the average cost from the Oracle Costing Service and use it when you calculate the margin. You can also use the service to calculate markup and base list price. You call the service through Oracle Integration Cloud or Integration Cloud Service. You can call a service that resides outside of Oracle Pricing from the pricing algorithm to calculate costs, margin, markups, or base list price.

Now let's get back to our example. Here are the SDOs.

Calculate Cost and Margin

Note

  • The output SDO from the Calculate Tax step provides the input SDO.

  • The running unit price on the input SDO is 300 USD.

  • The running unit price on the output SDO is 100 USD.

Here's what the algorithms do.

What the Algorithms Do

How the Algorithms Do It

1. Determine cost list.

Get the cost list that the pricing strategy references.

Look up costs in sequential order according to precedence. Stop looking as soon as we find the cost list that applies for this customer and item.

2. Get cost elements.

Get cost elements from the cost charges on the cost list.

A specific item takes precedence over an All Items specification on the list.

3. Create charge components for costs.

Write each cost that remains after finishing the get cost elements step. Create a separate charge component in the output SDO for each element.

This example includes only one charge component because there's only one cost.

The algorithm adjusts the running unit price in the output SDO for each charge component it adds.

4. Delete cost elements.

Delete them so they don't cause problems the next time the algorithm runs.

5. Calculate margin.

Calculate the final running unit price.

Here are details about attributes in the SDOs.

Entity

Attributes in Input SDO

Attributes in Output SDO

ChargeComponent

(for the costs)

-

ChargeComponentId: 12
ChargeId: 1
CurrencyCode: USD
ExtendedAmount: -400.00 USD
PriceElementCode: QP_COST_OF_GOODS_SOLD
PriceElementUsageCode: COST
SequenceNumber: 1011
SourceTypeCode: COST_LIST
UnitPrice: -200 USD

Unit Price is the amount of the cost.

ChargeComponent (for the margin)

-

ChargeComponentId: 13
ChargeId: 1
CurrencyCode: USD
ExtendedAmount: 200.00 USD
PriceElementCode: QP_MARGIN
SequenceNumber: 1012
SkipRunningPrice: Y
TaxIncludedFlag: N
UnitPrice: 100 USD

Unit Price is the margin.

Here are some of the functions you can use with the algorithms.

Algorithm Name

Function Name

Description

Calculate Margin

-

No functions are available.

Derive Cost List

getCostCharge

Get the cost charges.

Get Cost Elements

getCosts

Get costs for the item.

Create Charge Component with Running Unit Price

-

See the Finalize List Price step.