Trade agreements (Price/ discount agreement) in D365 F&O - Creation and it's Usage

Hello Readers, 
Happy to see an amazing response to my previous posts. It encourages me to share my understanding with all of you.

This post is a continuation of my last post: Trade agreements (Price/ discount agreement) in AX - Setup where I have explained the important setups required before we create trade agreements in AX.

In this post, I am going to explain the Trade agreement creation process and the importance of various fields in a trade agreement journal.

As mentioned in my previous post, trade agreement is the agreement between company & customer or company & vendor on various prices and discounts. As a part of trade agreement, different prices (Sales prices, purchase prices) and discounts (Line discounts, Multiline discounts and Total discounts) are agreed upon on various sales and purchases over a period of time and those are setup in the system. It is also called as Price/discount agreements, for a obvious reason of it being used to setup prices and discounts in the system.


1. Assumptions

Before creating trade agreements, all the required setups are being taken care of as per mentioned in my last post: Trade agreements (Price/ discount agreement) in AX - Setup. Few of those setups are:

- Activate the trade agreement combinations
- Trade agreement journal names creation
- Price/discount groups creation (if require)
- Managing the account receivable / procurement and sourcing parameter setups

2. Trade agreement path

Once setups are done in the system, we are good to create trade agreements. Trade agreement can be created from the following path in the system:

Sales and marketing > Journals > Price/discount agreement journals
                    or
Procurement and sourcing > Journals > Price/discount agreement journals
                    or
Account receivable > Journals > Price/discount > Price/discount agreement journals

3. Tables used in trade agreements 

When trade agreements are created and posted, the trade agreements data is inserted into below tables in AOT.  These are very useful during customization or for resolving any technical issues faced in agreements.

- PriceDiscAdmTable (Entry goes to this table when trade agreement journal is created)

- PriceDiscAdmTrans (Entry goes to this table when trade agreement journal lines are created) 

- PriceDiscTable (Entry goes to this table when trade agreement journal is posted. It has the same data which is visible from "View trade agreements" form for item, customer and vendor)

4. Steps to create trade agreements

1. Go to the path specified above
2. Form will open where you can see all the open journals available in the system at that moment. Those are nothing but journals which are created but not yet posted.



3. If you want to see 'Posted' journals, just select 'Posted'  in 'Show' field in place of 'Non posted'. 


NoteTo view both posted as well as open trade agreement journals, select option 'All' in the 'Show' field.

4. To create new journal, click on 'New' button (Make sure you have either 'Open' or 'All' selected in the Show field)

5. As you click on New button, the new line will be created where it asks for journal name which is mandatory (That's the reason it is important to create journal names beforehand while creating trade agreement. Different journal names can be setup for different purpose such as price agreement journal, discount agreement journal, price adjustment journal, price&discount journal from RFQ etc. so it will be easier to select an appropriate journal name for a specific purpose. In this way it will be easier to consolidate all the similar trade agreements journals for reporting and analysis purpose)



6. Select the journal name from the drop down. Let's say we have selected 'Pric' Here.



7. Click on Lines --> Journal lines form will open to add trade agreement lines with necessary information.



8. Press Ctrl+N to add a new line for adding the information

9. You can see Price (Purch) in the 'Relation' field in the line already (It is the same default relation which was selected against the  journal name 'Pric' during setup)

10. You can override this relation from the line and select appropriate relation from the following options if require:

      -Price (purch.)  --> For setting up the purchase price
      -Line disc. (purch.) --> For setting up the line discount for purchase 
   -Multiline disc. (purch.) --> For setting up the multiline discount for purchase
      -Total disc. (purch.)  --> For setting up the total discount for purchase
      -Price (sales)  --> For setting up the sales price
      -Line discount (sales)  --> For setting up the line discount for sales
      -Multiline disc. (sales) --> For setting up the multiline discount for sales
      -Total disc. (sales) -->  For setting up the total discount for sales

11. Here we can create lines for all the relation types in a single journal as well

Some information on Account code and Account selection in the journal line

a.  If you are selecting account code as 'Table', you  can see all the customers in the drop down for the account selection field. 
b.If account code is selected as 'Group', you can see customer price/discount groups in the drop down for the account selection field. It is the same customer price/discount groups which was created for price and discounts during setup
c. If account code is selected as 'All' , the account selection field is disabled as you don't have to select anything because it is applicable to all the customers. 

If trade agreements exist for Account code Table, Group and All, then trade agreement search engine gives preference to Table, Group and All respectively while returning the price or discounts for the orders (as described in my last post: Trade agreements (Price/ discount agreement) in AX - Setup)

Some information on Item code and Item relation in the journal line

a. If you are selecting item code as 'Table', you  can see items in the drop down for the item relation field.
b. If item code is selected as 'Group' , you can see item discount groups in the drop down for the Item relation field. It is the same item discount groups which were created during setup for line and multiline discounts..
c. If Item code is selected as 'All' , the Item relation field is disabled as you don't have to select anything because it is applicable to all the items. 

If trade agreements exist for item code Table, Group and All then trade agreement search engine gives preference to Table, Group and All respectively while returning the price or discounts for the orders (as described in my last post: Trade agreements (Price/ discount agreement) in AX - Setup) 

12. Select appropriate account code among the Table, Group and All and accordingly select value in the account selection field. 

13. Select appropriate item code among the Table, Group and All and accordingly select value in item relation field

14. Add the product dimensions (Configuration, Size, Color), Storage dimensions (Site, Warehouse, Location) and tracking dimensions (Batch number, serial number) in the journal line. These are the dimensions which are active in dimensions groups for the item . These dimensions can only be added for Item code: Table. (Refer my last post Trade agreements (Price/ discount agreement) in AX - Setup on the setup & importance of dimensions groups in the trade agreements)

15. 'From' & 'To' : Add 'From' quantity and 'To' quantity i.e the quantity range for the trade agreement. The trade agreement will be active for this quantity range upon posting. The active trade agreement will be applicable to sales/ purchase orders when order line quantity falls between the given quantity range. 

If 'From' and 'To' fields are blank, means there are no lower or upper limits to quantities. If  only 'To' field is blank, means there is no upper limit to quantity range. If  only 'From' field is blank, price is applicable to any lower quantities starting 1.

16. Unit (Unit of measure): It is either purchase or sales unit and can be flown from the item details form into the trade agreement lines automatically upon selecting the item. This unit can be override before posting a trade agreement. When trade agreement is created for a particular unit and the same unit is used in the order then when prices or discounts are requested from the order, the value from this trade agreement is returned. Also this 'unit' is used as a parameter for searching the active trade agreements. (Refer previous post Trade agreements (Price/ discount agreement) in AX - Setup to know how active trade agreements are searched)

17. Currency & Amount in currency: It is the currency in which the trade agreements are being created. Once currency is selected in the trade agreement line, we can add its corresponding amount in the amount in currency field in the agreement line. When orders are created in that currency and prices or discounts are requested from the orders, this 'currency' is also used as a parameter for searching the active trade agreements. Once active trade agreements are found, the amount (Amount in currency) will be automatically applicable to the orders. For price agreement, it is the sales or purchase price of the item. For discount agreement, it is the discount amount of the item or various discount groups

18. Include generic currencyThis field is enabled when the generic currency is selected in the trade agreement lines. But prior to that the generic currency needs to be setup in the account receivable parameter. When this field is enabled, it can be ticked only when instead of creating the trade agreement in different currencies, you want it to create in generic currency and then use exchange rate to convert the generic currency into a specific order currency in real time when price is requested from the sales or purchase order. It is only applicable to Price trade agreement

19. From date and To date: It is the duration in which the trade agreements are active. If the dates are blank, means it is applicable to any dates. There is no duration limit in that case

20. Price unit: It means the number of item units to which the unit price (Amount in currency) is applicable. Default it is set to 1. If price unit is changed to 10, then the price set in amount in currency is for 10 units of item. It is only applicable to price trade agreement

21. Price charges: It is the fixed charges on price applied once for each invoice

22. Discount percentage 1 and discount percentage 2 : It is to set the line discount, multiline discount and/or total discount percentage in the trade agreement on various sales or purchase transactions. We can either set the discount amount in the amount in currency field or discount percentage in the discount percentage fields or we can set both in trade agreement. When it happens, first the discount amount is applied on the order if given. Then the discount percentage 1 is applied on the remaining amount (after the deduction of discount amount). then the Discount percentage 2 is applied on the remaining amount (after the deduction of discount percentage 1). It is nothing but discount on discount.

23. Find next: It is used to find the valid trade agreement for the combination (Order) which is requesting the price or discount. When search engine finds the trade agreement for the combination, and if 'Find next' option is selected for that trade agreement, search continues for a specific trade agreement combinations. Search stops when all the combinations are searched or when valid trade agreement is found for which the Find next option is cleared.. If multiple trade agreements are found then appropriate action will be taken depending on whether price is requested or the discounts. (Refer previous post Trade agreements (Price/ discount agreement) in AX - Setup to know more about different actions which will be taken while returning price or discount)

26. Lead time: It is only used in price trade agreement and not in discount. When lead time is set in the price trade agreement, it is used in the purchase order to set the delivery date based on the lead time or in the sales order to set the requested ship date and requested receipt date based on the lead time (only if these dates aren’t already fulfilling the lead time or when delivery date control is not set to ATP or CTP in the sales order). Lead time from the trade agreement is only applicable when that trade agreement is applied to the order.

27. Working days: If it is ticked, only working days are considered in lead time.

28. Disregard lead time: When it is ticked, lead time is ignored and the delivery date control is applied to order lines. However lead time may still be used by master scheduling.


5. Trade agreements examples

A. Price (sales) - For sales price

Relation: Price (Sales)
Account code: All
Account selection: Blank (Non editable)
Item code: Table
Item relation: 1000
Product Dimensions: Select value if applicable (only in case of product master)
Storage dimensions/ Tracking dimensionsHere site is 1 and warehouse is 11 has been added
From: 0
To: 10 
Unit: ea
Price unit: 1
From date: 17-05-2020
To date: 28-05-2021
Amount in currency :15
Currency: USD
Discount percentage 1: Blank (as it is a price agreement and not the discount agreement)
Discount percentage 2: Blank (as it is a price agreement and not the discount agreement)



Expected result: The price sales agreement is created and sales price for item 1000 is set to 15 USD which is applicable to all the customers . This is valid for the quantity upto 10 and valid between 17-05-2020 to 28-05-2021. 
It means if sales order is created in currency USD for any customer which has the item 1000, quantity upto 10 and created during the validity period then the sales price of 15 USD is returned for that order. 
(This trade agreement is applied, provided it is the only agreement for the combinations given. If multiple trade agreements are exist for such combination, then the trade agreement search engine takes the appropriate preference and returns the sales price)


Note: You can setup the purchase price with the similar approach and with the relation as Price (purchase)

B. Line discount (Sales) - for sales order line discount

Relation: Line discount (sales)
Account code: Group
Account selection: 01
Item code: Table
Item relation: 1000
Product Dimensions: Select value if applicable (only in case of product master)
Storage dimensions/ Tracking dimensions: Here site is 1 and warehouse is 11 has been added
From: 5
To: 10 
Unit: ea
Price unit: field is disabled
From date: 17-05-2020
To date: 16-05-2021
Amount in currency:15
Currency: USD
Discount percentage 1: 2 
Discount percentage 2: Blank (as it is not for discount)



Expected result: The line discount sales agreement is created and the discount amount for the item  1000 is set to 15 USD which is applicable to customers which are part of customer price/discount group 01 selected in the agreement. Also the discount percentage is set to 2%. It is valid for the quantity between 5 to 10 and valid between 17-05-2020 to 16-05-2021. 
It means if sales order is created in currency USD for item 1000 and for the customer which is a part of customer price/discount group 01, on let's say 22-07-2020 and the quantity of the order is 7. In this case the line discount amount of 15 USD is applicable to the line's net amount and on top of that the discount percentage of 2 is also applied on the remaining amount. (Net line amount - Discount amount).  

Calculation
Net line amount: 15*6= 90 USD
Net amount after discount: 90 - 15 (discount amount)= 75 USD
Discount percentage: 75*0.02 (discount percentage) = 1.50 USD,
Discount amount on net amount after discount: 75 - 1.50 =73.50 USD (This is the final amount after deducting discount amount and discount percentage)

(This trade agreement is  applied, provided it is the only agreement for this combination. If multiple trade agreements are exist for such combinations, then the trade agreement search engine takes the appropriate preference and return the line discount)


Note: You can setup the purchase line discount with the similar approach and with the relation as Line disc. (purch.) 

C. Multiline disc. (Sales) - For sales order multiline discount

Relation: Multiline disc. (sales)
Account code: Table
Account selection: US-001
Item code: Group 
Item relation: 01
Product Dimensions: Blank
Storage dimension/ Tracking dimensions: Blank
From: 50
To: 99
Unit: ea
Price unit: Blank
From date: 17-05-2020
To date: 16-05-2021
Amount in currency :4
Currency: USD
Discount percentage 1: 3
Discount percentage 2: 4


Expected result: The multiline discount sales agreement is created and the discount amount is set to 4 USD for the all the items which are part of item discount group "01" selected in the agreement and is applicable to customer 'US-001'. Also two discount percentages are set as well. The discount percentage 1 is set to 3% and discount percentage 2 is set to 4%. It is valid for the quantity between 50 to 99 and valid between 17-05-2020 to 16-05-2021. 
In this case when sales order is created for the customer 'US-001' during the validity period in currency USD. The multiline discount amount is applicable to line items which are part of the item discount group selected in the agreement. here discount amount of 4 USD is applicable to the order lines and then discount percentage 1 and discount percentage 2 is applied respectively. 


When sales order is created, you need to calculate the multiline discount in order to get the multiline discount applied to the order line items (Path: Sales order --> Sell header tab --> 'Calculate' field group --> Multiline discount)


Once you click on 'Multiline discount' button in calculate section, the multiline discount is calculated and visible in the 'Totals' form for the sales order.


Note:
This trade agreement is  applied to orders, provided it is the only agreement for the combinations. If multiple trade agreements are exist for such combinations, then the trade agreement search engine takes the appropriate preference and returns the discount

If both line and multiline discount is valid for the order then it is used in combination as per the parameter set in the Account receivable parameter. Refer previous blog Trade agreements (Price/ discount agreement) in AX - Setup for more information.

Note: You can setup the purchase multiline discount with the similar approach and with the relation as Multiline disc. (purch.)


D. Total disc. (Sales) - Discount for the entire sales order

Relation: Total discount (sales)
Account code: Table
Account selection: US-002
Item code: All
Item relation: Blank
Product Dimensions: Blank
Storage dimension/ Tracking dimensions: Blank
From: 99
To: Blank
Unit: ea
Price unit: blank
From date: 17-05-2020
To date: 16-05-2021
Amount in currency:4
Currency: EUR
Discount percentage 1: 3
Discount percentage 2: Blank



Important: Please make sure to ticked 'Total discount' checkbox for the item for which total discount is to be applicable (Path: in item details form --> Sell fast tab --> Total discount)

(This trade agreement is  applied, provided it is the only agreement for the combinations. If multiple trade agreements are exist for such combinations, then the trade agreement search engine takes the appropriate preference and returns the discount)

Expected result: Total discount agreement is created and the discount amount is set to 4 EUR. It is applicable to customer 'US-002'. Also the discount percentage 1 is set to 3%. It is valid for any quantity starting from 99 and is valid between 17-05-2020 to 16-05-2021.

When sales order is created in currency EUR for the customer 'US-002 ' with quantity 150 during validity period. In this case the total discount of 4 EUR is applicable to the order and the discount percentage of 3 is also applied to same order on the remaining amount after the deduction of total discount amount. This discount is applied on the total order amount and not on the line's net amount. 


When sales order is created, you need to calculate the total discount in order to get the total discount applied to the order (Path: Sales order --> Sell header tab --> 'Calculate' field group --> Total discount)

Once you click on total discount button in calculate section, the total discount percentage is calculated and visible in the total discount field at path: Sales order --> Header view --> Price and discount fast tab --> Discount or charges field group --> Total discount %


Total discount is also visible in 'Totals' form for the sales order




Note: You can setup the purchase total discount with the similar approach and with the relation as Total disc. (purch.)

6. Validate and post the Agreement

Once trade agreements are created, those needs to be validated to know if all the mandatory fields are setup properly and no business logic is violated. To ease the validation, there are different options given such as 
- Validate all the lines in the agreement, 
- Validate only the selected lines, 
- Validate only the lines with errors or warnings




Click Ok to validate the journal. You can setup a batch for it as well.

Once validation is successful, you can post the journal in order make the price and discounts active in the trade agreement. Once it is active, it can be searched to get valid price and discounts for the orders. Click 'Ok' to post the journal. You can setup a batch for it as well.


In case of any discrepancies arise after posting the journal, it can be rectified by editing the journal. 

Details regarding how to edit the posted journals and other important utility functions of trade agreements can be seen in next blog post.

In this way, you can create, validate, post, view trade agreements in D365 F&O.  


Next post: Trade agreements (Price/ discount agreement) in D365 F&O :- Certain utilities


Please post if any queries or suggestions to be made regarding this topic !!!


Till then, Keep DAXing ðŸ˜Š

------------------------------------------------------------------------------------------------------------------------------------
Abhijeet Hele |  Dynamics AX Enthusiast | My Profile 
DisclaimerThe information provided on this site represents my own opinion/view and does not represent the opinion/view of my employer or Microsoft.

Trade agreements (Price/ discount agreement) in D365 F&O - Setup

Hello readers, Its been a while since my last post. Hope you are all well and safe😊

In this post, I am going to explain the Trade agreements in AX. It is also called as Price/discount agreementsHope !! it will give you more insight on the way agreements are setup with vendors and customers.

As the name suggests, it is used to setup the prices (sales prices & purchase prices) and the discounts (Line discounts, Multiline discounts & Total discounts) for the item, customer and Vendor combinations.  Once price and discount rules are set up in the trade agreements, the valid prices and/or discounts are fetched and applied to quotations, orders, and invoices in AX.




A. Types of agreements


Following four types of agreements can be created for sales and purchase:


1) Price agreements: for setting up the sales and purchase prices for item & customer or item & vendor combinations which are used for fetching the item prices in sales and purchase orders. Prices are for each item hence it can only be setup for item code Table
2) Line discount agreements: for setting up the line discount for item & customer or item & vendor combinations which are used for fetching the discounts for sales or purchase order line
3) Multiline discount agreements: for setting up the discount for items & customer or item & vendor combinations which are applicable for multiple sales or purchase order lines. As Multiline discount is for multiple items combination, it cannot be setup for single item. It can always be setup for Item code Group or All
4) Total discount agreement: for setting up the discount for items & customer or item & vendor combinations which are applicable for the entire sales or purchase order. As Total discount is for the entire order, it is always application in the order header irrespective of any items in the sales or purchase order lines, hence it cannot be setup for item code Table or Group. It can always be setup for item code All

B. Agreement combinations


The price and discount can be setup for the following combinations of item, Customer and vendor:



C. Preference

Here preference is given to the item code or account code in the following manner while searching for the trade agreement for sales or purchase:

Table: First preference is given to code Table. When trade agreement is searched, it checks for the agreement created for single customer (Account code: Table) or single vendor (Account code: Table) and/or single item (Item code: Table) which are given in the sales or purchase order

Group: When trade agreement is not found for code Table, then second preference is given to code Group. When trade agreement is searched, it checks for the agreement created for the group of customers (Account code: Group) or group of vendors (Account code: Group) and/or group of items (Item code: Group). Item/ customer/ vendor which are given in the sales or purchase order should be part of those groups. 

How to create price/discount groups for customers/vendors/ items are given below in this post.

All: When trade agreement is not found for code Table or Group, then third preference is given to code All. When trade agreement is searched, it checks for the agreement created for All items (Item code: All) and/or All customers (Account code: All) or All vendors (Account code: All). Items, customer or vendor which are given in sales or purchase order are part of code 'All'.

D. Prerequisites

Before we create any trade agreement in AX, it is important to complete certain prerequisites:

1. Activate trade agreement

It is important to activate certain trade agreement combinations in order to create the trade agreement for those combinations. It will reduce the risk of wrong combination being used and also improve the system performance as trade agreement search engine only searches for the active combinations trade agreements.

A. To activate price/ discount between item & customer

Path: Sales and marketing > Setup > Price/discounts > Activate price/ discount

Here you can activate item and customer combinations against the price, line discount, multiline discount and total discount by ticking the appropriate checkbox.


B. To activate price/ discount between item & vendor

Path: Procurement and sourcing > Setup > Price/discounts > Activate price/discount 

Here you can activate item and vendor combinations against the price, line discount, multiline discount and total discount by ticking the appropriate checkbox.



2. Product, storage and tracking dimension groups setup

It is very important to keep the Product, storage & tracking dimension groups setup in mind while creating the trade agreement. The dimensions which are active in the product/storage/tracking dimension groups are very important while creating the trade agreement as these dimensions are used in the order and trade agreement search engine searches through these active dimensions while searching for the price or line discount for a specific item in the sales or purchase order. It includes active 'For sales prices' and 'For purchase prices' dimensions from the dimensions groups while searching for the prices for sales and purchase. It follows the following order in search for price/discount:

1. Firstly, it searches the trade agreement for the active product/storage/tracking dimensions which are used in the order for which price or line discount is requesting
2. If not found, it searches the trade agreement for the active product dimensions which are used in the order for which price or line discount is requesting
3. If not found, it searches the trade agreement with no active dimensions from product/storage/tracking dimension groups are specified

For example: If size is the product dimensions specified for the item, site and warehouse are the storage dimensions specified for the same item, serial number is the tracking dimensions specified for the item in the order, then 
- It first checks the trade agreement for the size, site, warehouse and serial dimensions for the item. If not found then, 
- It checks for the trade agreement for the size dimension for the item. If not found then 
-Finally it checks the trade agreement where no size, site, warehouse and serial dimensions are specified. 


3. Setup trade agreement journal names 

It is important to setup trade agreement journal names as these journal names are used to create price /discount agreement journal for setting up different prices and discounts for different items, customers and vendors. Different journal names can be setup for different purpose such as price agreement journal, Discount agreement journal, Price adjustment journal, Price&discount journal from RFQ etc. so it will be easier to select appropriate journal names for specific purpose. In this way it will be easier to consolidate all the similar trade agreements for reporting and analysis purpose. Journal names are created at the following path:

Procurement and sourcing > Setup > Price/Discounts >Trade agreement journal names

                                            or

Sales and marketing > Setup > Price/Discounts >Trade agreement journal names

Following default relation can be setup for journal names. These relations can be override in the actual trade agreement journal if require:

-Price(purch.)
-Line disc. (purch.)
-Multiline disc. (purch.)
-Total disc. (purch.)
-Price (sales)
-Line discount (sales)
-Multiline disc. (sales)
-Total disc. (sales)
-Postage discount

These are nothing but various ways of creating price/discount agreement journal lines.

Add name, description and select default relation to create specific trade agreement journal name.

We can also see all the posted price/discount agreement journals created from a particular journal name. Click on 'Price/discount agreement' button on the top to view all the journals.


4. Create price/discount groups 

Create price groups, line discount groups, multiline discount groups and total discount groups for the items, customers or vendors so it can be used in trade agreement journals for setting up prices and discounts for the group. 

Groups can be created by selecting appropriate options among Price group, Line discount group, Multiline discount group and Total discount group.

A. Customer price discount group

We can create price or discount groups for the customer by selecting appropriate options from the following path:

Path: Sales and marketing > Price/discounts > Customer price/discount groups 
                    
                                                  or

         Inventory management > Setup > Price/discount > Customer price/discount groups 



We can also view the trade agreement and create the one for the customer price/discount group selected. Select the group --> Click on 'Trade agreements' button to view the appropriate options.



B. Vendor price discount group 

We can create price or discount groups for the vendors by selecting appropriate options from the following path:

Path: Procurement and sourcing > Setup > Price/discount > Vendor price/discount group

                                        or
         Inventory management > Setup > Price/discount >  Price/ discount groups > Vendor price/discount groups 


You can view the trade agreement and also create the one for the vendor price/discount group selected. Select the group --> Click on 'Trade agreements' button to view the appropriate options.

C. Item discount group 

It creates the Line discount group, Multiline discount group and Postage group for the items. It doesn't include the total discount group as total discount is applicable to item code All and not to item code Group.  


You can create discount groups for the items from the following path:

Path: Sales and marketing > Price/discounts > Item discount groups

                                              or
         Procurement and sourcing > Price/discount > Price/discount groups> Item discount groups

                                             or
         Inventory management > Setup > Price/discount > Item discount groups 


You can view the trade agreement and also create the one for the item discount group selected. Select the group --> Click on 'Trade agreements' button to view the appropriate options.



5. Item/ Customer/ Vendor master setup


A. Assign item discount groups for items

Once Item line discount groups and Item Multiline discount groups are created (Refer point 4 section C),  those are assigned to items and discount agreements are created for those groups. When any such item is used in the sales or purchase order, the discount pertaining to that group will be applicable to the item in the order.

Path: Select specific item in the released products > Purchase or Sell fast tab > Discounts field group > Line discount group/ Multline discount > Assign groups to these fields as applicable



Note: For total discount, checkbox needs to be ticked for the item in order to include the item in the calculation of total discount.

B. Assign customer price/discount group to customers & vendor price/discount group to vendors

- Once vendor price/ discount groups are created (Refer point 4 section B), those are assigned to vendors and agreements are created for those groups. When order is created for any such vendors, the price and discount for the group is applicable to the order (Order header/Order lines)

Path: Select vendor > Purchase order defaults fast tab > Discount field group > Multiline discount/ Total discount group/ Price group/ Line discount group > Assign groups to these fields as applicable



- Once customer price/discount groups are created (Refer point 4 section A), those are assigned to the customers and agreements are created for those groups. When order is created for any such customer, the price and discount for the group is applicable to the order (Order header/ Order lines)

Path: Select customer > Sales order defaults fast tab > Discount field group > Multiline discount/ Total discount / Price / Line discount > Assign groups in these fields as applicable


6. Account receivable parameters Setup

Different values are setup in the account receivable parameter to set the behaviors of sales trade agreement.

Path: Account receivable > Setup > Account receivable parameters > Prices
  • Setting up the date type i.e. Today's date, requested ship date or requested receipt date Depending on the date type selected here, the appropriate date will be picked up from the sales order to find the valid sales trade agreement. Default value is 'Today'
  • Optional: Setting up the generic currency and exchange rate type: Trade agreement can also be created for generic currency and then use exchange rate to convert generic currency into a specific order currency in real time when price is requested from the sales or purchase order. When creating the trade agreement for generic currency, make sure to tick 'Include generic currency' checkbox in the agreement journal. This setup is only applicable to price trade agreement and not to the discount agreements.
  • Optional: Apply smart rounding after currency conversion: It is checked when you would want to apply smart rounding to the price when it is returned from the valid trade agreement. In order to apply smart rounding you would need to setup the behavior for smart rounding for foreign currencies in the system. It is nothing but returning the price keeping in view the smallest denomination i.e. price returned with ending 0.99 or 0.95 or 0.98. When price for generic currency is converted into order (Foreign) currency then before returning the price, smart rounding rules are applied depending on setup done in the system for different foreign currencies in order to decide the ending of the price i.e 156.95. 199.99 etc.
  • Discount: Default values is 'Line'. It decides how Line discount and Multline discount are used together in the sales order lines. We can select different values depending on how we want discounts to get applied, These values are:
         - Line
         -Multiline
         -MAX(Line, Multiline)
         -MIN(Line, Multiline)
         -Line+Multiline
         -Line*Multiline
  • Optional: Trade agreement evaluation: During changing the price and discount conditions by the external sources, if you want to trigger a dialog to decide whether to keep current price/discount or it should inherit from external sources, then add the type of external sources such as AIF, retail POS, Sales agreement, Sales quotation, project quotation etc. in the trade agreement evaluation section in account receivable parameter
  • Optional: Calculate Total discount on posting: If ticked, total discount will be calculated automatically when posting and when selecting certain actions


7. Procurement and sourcing parameters Setup

Different values are setup in the procurement and sourcing parameter to set the behaviors of purchase trade agreement

Path: Procurement and sourcing > Setup > Procurement and sourcing parameter > Prices

  • Setting up the date type i.e. Today's date or Delivery dateDepending on the date type selected here, the appropriate date will be picked up from the purchase order to find the valid purchase trade agreement. Default value is 'Today'

  • Discount: Default values is 'Line'. It decides how Line discount and Multline discount are used together in the purchase order lines. We can select different values depending on how we want discounts to get applied, These values are:
         -Line
         -Multiline
         -MAX(Line, Multiline)
         -MIN(Line, Multiline)
         -Line+Multiline
         -Line*Multiline

  • Optional: Trade agreement evaluation: During changing price and discount conditions by the external sources, if you want to trigger a dialog to decide whether to keep current price/discount or it should inherit from external sources, then add the type of external sources such as AIF, retail POS, Sales agreement, Sales quotation, project quotation etc. in the trade agreement evaluation section in procurement and sourcing parameter
  • OptionalCalculate Total discount on posting: If ticked, total discount will be calculated automatically when posting and when selecting certain actions.


E. Different values for searching the price/discount agreement

Below values are used from the sales or purchase order lines to search for the valid price and discount agreement for those order lines:

● Customer/vendor 
● Item number 
● Product dimension, Storage dimension and Tracking dimension
● Quantity 
● Currency 
● Unit of measure 
●Date type (defined in the Accounts receivable parameter setup and Procurement and sourcing parameter setup)
    
1. For price
As per the preference given above (In section A), the combination of Item and customer or item and vendor are searched along with other values defined above to find the valid price trade agreement. Posted trade agreements are searched based on the order in which those are created (based on RecID). When all the trade agreements are searched or when valid trade agreement is found where Find next option is cleared then the search stops. If multiple trade agreements are found for the combination to get the valid price then trade agreement with lowest price will be considered for the order line

2. For Line discount
As per the preference given above (In section A), the combination of Item and customer or item and vendor are searched along with other values defined above to find the valid trade agreement for line discount. Posted trade agreements are searched based on the order in which those are created (based on RecID). When all the trade agreements are searched or valid trade agreement is found where Find next option is cleared then the search stops. If multiple trade agreements are found for the combination to get the valid line discount, then it takes the sum of all the valid line discount or the valid line discount percentage for order line

3. For Multiline discount(It is created for Account code TableGroup & All and Item code GroupAll
Below values are used from the sales or purchase order lines to search for the valid price and discount agreement for those order lines
  • Customer/ Vendor 
  • Item's multiline discount group
  • Overall quantity  
  • Currency 
  • Unit of measure 
  • Date type (defined in the Accounts receivable parameter setup and Procurement and sourcing parameter setup)

Overall quantity
It is the sum of quantities of all items belong to specific Multiline discount group and sum of quantities of all items that isn't belong to any multiline discount group. 
For example: If there are 8 lines in the sales order, out of which lines 1, 3 and 4 are belong to Multiline discount group A, so it takes the sum of quantities of those lines,  lines 2 and 6 are belong to multiline discount group B, so it takes the sum of quantities of those lines, Line 5, 7 and 8 are not belong to any multiline discount group, so it takes the sum of quantities of those lines as well.

Once this quantity categorization is done, as per the preference given above (In section A), the combination of Item and customer or item and vendor are searched along with the values defined above to find the valid trade agreement. Posted trade agreements are searched based on the order in which those are created (based on RecID). When all the trade agreements are searched or when valid trade agreement is found where Find next option is cleared then the search stops. If multiple trade agreements are found for the combination, then it takes the sum of all the valid discounts or the valid discount percentages for each order line.

Note: For all those lines where no multiline discount group is attached, the multiline discount trade agreement created for item Code All are applicable,.

4. For Total discount  (It is created for Account code TableGroup & All and Item code All)
Below values are used to search for the valid trade agreement:
  • Customer/ vendor
  • Currency
  • Total order amount
  • Date type (defined in the Accounts receivable parameter setup and Procurement and sourcing parameter setup)
As per the preference given above (In section A), the combinations for customer or vendor are searched along with the values defined above to find the valid trade agreement. Posted trade agreements are searched based on the order in which those are created (based on RecID). When all the trade agreements are searched or when valid trade agreement is found where Find next option is cleared then the search stops. If multiple trade agreements are found for the combination to get the valid total discount, then it takes the sum of all the valid total discounts or the valid total discount percentages for the entire order.


Once all these setups are understood and completed, we are good to create trade agreement in the system for different customers, vendors and items. To understand on how to create & post trade agreement will be explained in the next blog post. 


Please post if any queries or suggestions to made regarding this topic !!!

Happy Daxing ðŸ˜Š
------------------------------------------------------------------------------------------------------------------------------------
Abhijeet Hele |  Dynamics AX Enthusiast | My Profile 
DisclaimerThe information provided on this site represents my own opinion/view and does not represent the opinion/view of my employer or Microsoft.

Manage contractual commitments with purchase agreement in D365 supply chain management

Hello Reader, In this post, I am going to deep dive into purchase agreement management in D365 supply chain and how it is useful in managing...