Example of How Pricing Algorithms Price Items, Part 3

Determine which price list to use.

3. Get Price List

Determine which price list to use.

Note

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

  • Use the Derive Price List algorithm.

    • Get the default price list.

    • If term overrides exist, then apply them.

    • If line overrides exist, then validate them.

Here's what the algorithm does.

  • Examine strategies and price lists in the Pricing Administration work area.

  • Use the PricingStrategyId in the input SDO, such as 300100071623888, to determine which strategy to examine.

  • Examine the price lists on the strategy sequentially according to the Precedence attribute of the price lists on the strategy.

  • Use item, unit of measure, and charges in the input SDO to identify price lists that include the same item, unit of measure, and charges on the strategy.

  • If it finds a match, then it uses the price list as the default price list and to apply prices for the line. It uses the DefaultPriceListId attribute to identify the price list.

  • If a sales agreement applies to the line, and if the agreement overrides the line, then the algorithm uses the agreement price to price the line.

  • If a price list override exists on a line, and if the algorithm finds that the price list is valid according to the strategy and date, then it uses the override to price the line.

  • If the algorithm doesn't find a matching price list on the strategy, or if the agreement price isn't valid, or if the override price isn't valid, then it creates an error.

  • Order Management doesn't come predefined to support overriding the price list. You must manually set it up.

Here are details about attributes in the SDOs.

Entity

Attributes in Input SDO

Attributes in Output SDO

Line

AllowCurrencyOverrideFlag: Y

AppliedCurrencyCode: USD

DefaultCurrencyCode: USD

HeaderId: 1

InventoryItemId: 149

InventoryOrganizationId: 204

ItemType: Standard

LineCategoryCode: Order

LineId: 1

LineQuantity2: Ea

LineQuantityUOMCode: Ea

LineTypeCode: ORA_BUY

PriceAsOf: 2019-03-26 @ 08:32:53

PricedOn: 2019-03-26 @ 08:32:53

PricingDate: 2019-03-26 @ 08:32:53

PricingStrategyId: 300100071623888

ShipToLocationId: 929

UnreferencedReturnLineFlag: N

AllowCurrencyOverrideFlag: Y

AppliedCurrencyCode: USD

AppliedPriceListId: 300100071623855

In this example, the algorithm didn't find an override, so the applied price list and the default price list are the same. If it found an override, it would set the applied price list to the override price list.

DefaultCurrencyCode: USD

DefaultPriceListId: 300100071623855

DefaultPriceListPrecedence: 1

FromCurrencyCode: USD. This is the currency code of the price list.

HasAlternatePriceList: Y

HeaderId: 1

InventoryItemId: 149

InventoryOrganizationId: 204

ItemType: Standard

LineCategoryCode: Order

LineId: 1

LineQuantity2: Ea

LineQuantityUOMCode: Ea

LineTypeCode: ORA_BUY

PriceAsOf: 2019-03-26 @ 08:32:53

PricedOn: 2019-03-26 @ 08:32:53

PricingDate: 2019-03-26 @ 08:32:53

PricingStrategyId: 300100071623888

ShipToLocationId: 929

UnreferencedReturnLineFlag: N

Hierarchical View Object Lookups

Here are some of the functions you can use with the Derive Price List algorithm.

Function Name

Description

getCharges

Get charges for an item or subscription item.

getCoverageCharges

Get charges for a coverage item and covered item.

getItems

Get items for a configuration model.

These functions are hierarchical view object lookups. A view object lookup queries only one lookup. A hierarchical view object lookup queries two objects in the hierarchy. For example, the getCharges function uses view object x to query the price lists in the strategy according to precedence, and view object y to query the price list charges on each price list that view object x returns.

View Object Lookups

Here are some functions that are view object lookups that you can use with Derive Price List.

Function Name

Description

getOverridePriceListName

Get the price list name that OverridePriceListId identifies.

If you use a descriptive flexfield to set a specific price for each party that you set up in Trading Community Architecture, then you can use getOverridePriceListName to get the name of the price list to apply instead of using the default value from the strategy.

getStrategy

Get the pricing strategy according to Header.StrategyId.

validateOverrideCurrency

Validate the override currency on the header or the line.

validateOvrPriceList

Validate the override price list on the

line.

validateTermPriceList

Validate the override price list from the pricing term that the sales agreement specifies.