Advanced pricing method hierarchy

Article09/20/20236 min read

When creating a new sales document, the system will determine the price calculation method. In this topic, we presume that the price calculation method is set to the advanced pricing method.

To explain how a price is selected in a sales order line, we will give an example. Let’s say you have created a sales order for customer C0015, with an order line for item number 15:

And let’s assume you have specified the following price lines for item 15 on the Sales Prices page. Lines that do not match the selected item number, customer, customer group or campaign are already filtered out in this picture.

So which price from the price list will be chosen for the order line? First, the system will filter out all price lines that are not valid for this order. The picture below explains when a price line is valid or invalid.

Which lines are valid?
Item numberOnly price lines with same item number as the item on the order line are valid.
Sales type/Sales code
  • Lines with Sales Type CUSTOMER are only valid when the customer is equal to the customer on the order or to the sales price reference customer (when this field is specified for the customer on the order).
  • Lines with Sales Type CUSTOMER PRICE GROUP are only valid when the customer group is linked to the customer on the order.
  • Lines with Sales Type CAMPAIGN are only valid when this campaign is selected on the order.
  • Lines with Sales Type ALL CUSTOMER are always valid.
Starting date
  • For sales orders: only price lines with no starting date or a starting date that is before or equal to order/shipment/promised delivery/requested delivery date are valid: Which of these dates is applicable depends on the ‘Sales Price Reference Date’, specified on the customer card.
  • For other sales documents: only price lines with no starting date or a starting date that is before or equal to the order date are valid.
Currency codeOnly price lines that have no currency code (i.e., representing the default system currency) or have the same* currency code as the currency on the order header are valid.
Variant codeOnly price lines that have no variant code or have the same variant code as the item on the order line are valid.
Unit of measureAll unit of measure codes are valid.
Minimum quantityOnly lines that have a lower minimum quantity than the quantity in the order line are valid.
Ending date
  • For sales orders: only price lines that have no starting date, or a starting date that is before or equal to the order date are valid. Which of these dates is applicable depends on the ‘Sales Price Reference Date’, specified on the customer card.
  • For other sales documents: only price lines with no starting date or a starting date that is before or equal to the order date are valid.
Note

When a different unit of measure code is specified in the price line than in the order line, the minimum quantity is recalculated using the item unit of measure table.

Note

When determining the sales discount instead of the sales price, a similar process is followed. But additionally, the item discount group is then also considered. If no item number is found at a certain level but a discount is present for an item discount group that is assigned to the item, then this discount will be considered. And instead of the sales type customer price group, the system will search for the sales type customer discount group.

Using the rules in the picture above, the pink lines in the picture below are filtered out of the price list in our example. The reason why they are not valid (in combination with our order example) is highlighted in red.

Note

When no lines remain, the Unit Price of the item card would be used on the order line.

After filtering out these invalid price lines, the system will continue to filter lines (in 4 steps) based on a certain hierarchy (which also applies when a discount is retrieved). The most important fields are Currency Code and Variant Code. The first step the system will take is checking whether price lines exist in which the values of both fields match the values in the order (line). If so, it will continue to step 2 with those price lines. If they are not found, it will look further for lines that contain only the correct currency code. If those are not found, it will look for lines that contain only the correct variant code. And finally, if those are not found, it will continue to step 2 with the remaining price lines (which have no value for both fields).

In the second step, the remaining lines are filtered on the Source Type field. Lines with sales type Campaign trump lines with CUSTOMER, which in turn trump lines with CUSTOMER PRICE GROUP, which in turn trump lines of type ALL CUSTOMERS.

Next (if multiple lines still exist), price lines with the most recent starting date will be selected. And of those lines, the price line(s) with the highest minimum quantity remain(s).

Applying these four steps to the valid price lines we had left in our example, would filter out the orange lines in the picture below, resulting in 1 remaining (grey) price line. Explanation:

Step 1: Since price lines with USD and RED exist, 5 lines are filtered out.

Step 2: CUSTOMER trumps ALL CUSTOMER, so the line with ALL CUSTOMER is filtered out.

Step 3: As price lines with UoM BOX exist, the price line with no UoM is filtered out.

Step 4: As 2017 is older than 2018, the line with starting date 01/01/2017 is filtered out.

Step 5: As 10 is higher than 0, the line that remains is the line with minimum quantity 10.

The unit price that will be used in the order will be 9 USD.

In the example above, the price line that is selected in the end contains the currency USD. Since the order contains the same currency, the price does not need to be recalculated. However, if the selected price line contains an empty currency code (representing the local currency as set up in the General Ledger Setup), the price would be recalculated to USD before entering it in the order line. See Sales prices and discounts in sales documents for more details.

In the example above, the price line that is selected in the end contains the unit of measure BOX. Since the item on the order line is also specified in BOX, the price does not need to be recalculated. However, this is not always the case. Below, four possible situations that could result after step 5 are described.