Price Engine in Dynamics 365 for Finance & Operations

In a previous blog post I talked about setting up prerequisites when using the trade agreement journals in Dynamics 365 for Finance and Operations. After all that preparation is done, you are ready to embark on a pricing journey that will fascinate you with all of its options. The price engine in Dynamics 365 for Finance and Operations is very sophisticated and complex. This means it covers a wide range of options, but requires understanding and extensive setup to perform as expected.

Trade agreement journals are available in both the procurement and sourcing as well as the sales and marketing modules. This article will introduce them using a sales price example, but the mirror image of the functionality is available for vendor prices/discounts and all concepts are applicable.

Please note that this article only details price type journals and not the different discount types. Some of the information might be relevant for setting up discount type journals but it does not detail the specifics of the different discount types. Keep your eyes out for a future post about discount journals.

About the Journals

Like any journals in the system, the creation starts with a journal header. The journal header relies on the journal names being set up in the system – please refer to this article for details. When creating the header, make sure to select the appropriate journal name and overwrite the default description. The journal name entered will be the keyword(s) used to search/filter journals after created/posted.

Dynamics 365 Trade agreement journals

Once you’ve created the journal header, navigate to the lines form and enter the details of the journal. Start by selecting the appropriate relation type on each line to indicate what you are setting up. Please note that if the journal names are setup with this information, it should default to the correct line type but still allow the user to manually change it.

Dynamics 365 Journal Lines

Every field on the journal line works as a differentiating factor. That means you can specify a different price for each situation where at least one of these values differ, and create a price matrix. For example, you can set up a price for a customer for a product sold out of warehouse A, and a different price from warehouse B.

On two journal lines if all the information is the same and only the price differs, the system will throw a warning at validation. The problem with this setup is that the system would have no way of knowing which price to apply, as all the factors are the same. However, this is a warning that allows the user to proceed after acknowledging it. Validation therefore is essential. If two identical journal lines are posted, the price engine will always apply the one that was created first. The price engine relies on the record ID as the differentiating factor and it will find the lower one first.

The following information can be used as differentiating factors between prices/discounts in a trade agreement journal line:

  • Customer/Vendor relation
  • Item relation
  • Storage dimensions – if the storage dimension group is set up appropriately for the item(s)
  • Tracking dimensions – if the tracking dimension group is set up appropriately for the item(s)
  • Product dimensions – if the product dimension group is set up appropriately for the item(s)
  • Quantity or Quantity ranges
  • Currency
  • Date range (from and to dates)
  • Unit

Item and Customer Relations

The ‘table-group-all’ relation concept is found all over the system. It is the basis of the trade agreement journals as well. Prices/discounts are available to be set up for a particular customer/vendor, a previously defined group of customers/vendors (in which case the groups must be assigned to the appropriate customer/vendor accounts on the customer/vendor master file) or all customers/vendors. The same concept applies to the item relation. Then combining the two makes it possible to create nine different combinations of relation types.

Journal Lines in Trade Agreement

Please note that the customer/vendor groups and item groups used and referenced for trade agreement journals are NOT the standard customer/vendor and item groups. These groupings are created particularly for price/discount purposes and you will find them under Setup/Prices and discounts in the Sales and marketing/Procurement and sourcing modules.

Dynamics 365 Finance and Operations Trade Agreement Journals Discount Groups

Allowing the setup of prices in this manner means that an item could have nine different types that apply for it at the same time. For example, a price is setup for item ‘A’ when it is sold to customer ‘A’. Another price is set up for item group X when sold to customer group X and item A is part of item group X, while customer is part of customer group X. The hard-coded price engine logic will determine which price applies in these scenarios. Therefore; it is important to understand this pricing logic prior to configuring prices/discounts in the system.

The base principle of the price engine is a fallback logic. It looks for the most specific match to the information on the sales order line and will apply the first one it finds. Loosening the criteria one step at a time, it will search until it finds the closest match, applying a fallback logic.

For example, the first thing it will look for when a sales order line is created is a trade agreement journal for that particular customer as a table relation. It will look for that item as a table relation for that particular warehouse (if applicable) in that currency (must be a match) with a particular quantity range that the sales order line quantity falls into, and with a specified date range it falls into (and any further product, storage and/or tracking dimensions that are applicable).

The sequence of the fallback logic is as follows:

  Specific item (Table) Group of items (Group) All items (All)
Specific customer   (table) 1 2 3
Group of customers (group) 4 5 6
All customers (All) 7 8 9

Please note that when it comes to prices, the search stops once the first applicable price is found. For discounts, there is an option to apply multiple discounts by instructing the system to continue searching for applicable discounts even after the most relevant one is found and applied.

Tips and Tricks

1. Quantity Ranges

When using quantity ranges to set up volume-based pricing, the start of a range must be equal to the end of the previous range. If the next number is used instead, the system will consider the partial quantities in between the two numbers as uncovered area and will throw an error message indicating that there are quantities not covered. The quantity used as the end of one range and as a start of the next will be priced according to the range where it is the closing quantity.

As per the example on the screenshot below, if the sales line is a quantity of 10, the price engine will apply the price from the top trade agreement journal line.

Dynamics 365 Finance and Operation Price Engine

2. Currency

Make sure to note the currency on the price journal. If the same product is sold/purchased in several different currencies, separate trade agreement journal lines need to be created for each. The system considers any information on the journal line as an exact search criterion, and if the sales order is set up in a different currency, no prices will be found from trade agreement discount journals.

3. Date Ranges

It is not mandatory to specify date ranges on the journal lines. If ‘From date’ and ‘To date’ are left empty, the journal is valid from the time of posting until it is modified or obsolete. When using seasonal pricing, it is possible to have one journal with no ‘From date’ and ‘To date’ information set up and then another one with specified dates. Because one is for a more specific criteria than the other, during those specific dates the limited time journal will automatically apply in place of the generic one, and when that date range passes it will automatically fall back to the general one.

Additional Notes from the Author

The price engine in the system has multiple functionalities to consider, not only the trade agreement journals. The item master record might contain pricing information, as well as a price type costing record that might be set up and activated. There may also be sales/purchase agreements present in the system for the customer/vendor. The engine applies a fallback logic between these record types. The following is the sequence of these different price record types taken into consideration by the engine:

  1. Purchase/Sales agreements
  2. Trade agreement journal lines
  3. Item price from the item master record

The naming of this functionality has changed twice throughout the different versions of the system. In 2009 and previous versions it was called Trade Agreement Journals, and in the 2012 versions of Dynamics AX, the name changed to Price/Discount Journals. In Dynamics 365 Finance and Operations it is once again called Trade Agreement Journals. In the Dynamics AX 2012 versions, the naming throughout the system isn’t consistent; users may find references to trade agreement journals in places, however the menu items and the journals themselves are named Price/Discount Agreement Journals.

The journal lines form in the AX2012 versions does not have a ‘New’ or a ‘Delete’ button, so make sure you are aware of the hot key combinations:

  • To create a new line press Ctrl + N or the down arrow when your cursor is on an existing line
  • To delete a line, highlight the line and press Alt + F9
  • To save the information on the form, press Ctrl + S

Please contact us if you have any questions about Dynamics 365 for Finance and Operations!

Read Case Study of a Manufacturer's Dynamics 365 Implementation with Encore

"We met our three project goals of 100% completion of critical business requirements at Go Live, completed with 90% Best Practices or better, and GO Live done in a timely manner."

Read Case Study

What Is a D365 Implementation Really Like?

Read Case Study