What I intend to do is to explain D365 feature to track shelf life dates. It enables meeting market demands especially for food and beverage as well as chemical products.
I’m going to deal with the following features:
- Review different capabilities of setting Manufacturing date of the batch.
- Review the generation of inspection orders for batches based on shelf life dates. This will allow evaluating of a complex of quality attributes (such as taste, texture, color and appearance) at some point of time.
- Review sales order reservation logic based on the expiration date or best before date. This will allow steering clear of shipping short-dated products to customers.
- Review reset shelf life dates possibilities.
- Review the possibility to update expiry date.
- Review the possibility to update best before date.
- Review the possibility to update shelf advice date.
I thought it would be useful to provide the terminology used within D365:
Shelf life period in days – the amount of time that a properly packaged and stored product will last remaining effective and saleable. Also, it’s a time during which the material is determined to be fully functional.
Shelf advice period in days – this is the period of time during which the manufacturer feels that their product should be revisited to check the quality.
Shelf advice date – The date after which it is recommended that an inventory batch or lot is retested to validate that it still meets testing standards. This date is calculated by adding the Shelf advice period in days to the batch date.
Best before period in days – this is the period of time during which the manufacturer feels that their product will retain its original quality.
Best before date – ‘best before’ date guarantees certain properties of the product to be effective up to this point. Once the date has passed, it may just lose some of the properties. But it does not necessarily mean that the product is no longer effective.
Production date (or Manufacturing date) is the date when your product was manufactured. More precisely, it is the date when the batch of products (also called lot) was produced.
Expiration date is the date after which your product will be expired and should not be used anymore.
How to setup it in D365:
Click Product information management > Common > Released products.
In the Tracking dimension group field, select a tracking dimension group for the item. You must select a tracking dimension group for which Active and Primary stocking check boxes are selected for Batch number in the Tracking dimension groups form.
Click the Manage inventory FastTab.
If you don’t select Tracking dimension group with batch activated then “Shelf life period in days”, “Shelf advice period in days” and “Best before period in days” will be greyed out.
In the Shelf life period in days field enter the number of days. Let’s say we want to set 6 months, so we will add 180 days.
In the Shelf advice period in days field enter the number of days. Let’s say we want to set 2 months, so we will add 90 days.
In the Best before period in days field enter the number of days. Let’s say we want to set 1 months, so we will add 30 days.
Some of the calculations:
Shelf life period in days will be added to the Manufacturing date of the inventory batch to calculate the Expiration date of the batch.
Expiration date = Manufacturing date + Shelf life period in days
Best before period in days will be subtracted from the Expiration date of the inventory batch to calculate the Best before date.
Best before date = Expiration date – Best before period in days
Shelf advice period in days will be added to the created date of the batch to calculate the Shelf advice date.
Shelf advice date = Manufacturing date + Shelf advice period in days
Note: Quality orders can be created for batches where the shelf advice date is overdue. We will review this process in the create inspection order section.
Now we have 3 options how to set Manufacturing date
Option #1 Manually set Manufacturing date when you create Batch.
Option #2 Set the Manufacturing date based on the Vendor information. Item Model group should be configured.
Option #3 Automatically set Manufacturing date upon Batch creation. Batch number group should be configured.
Let’s review all of them:
Option #1 – Manually set Manufacturing date when you create Batch:
Click Inventory management > Inquiries and reports > Tracking dimensions > Batches.
Click New button.
Set Batch number value.
As you can see Manufacturing date is editable and you can override this date. Once you save the record, it will be impossible to change that.
So, based on the calculations:
Manufacturing date = 6/29/2018 (current date but can be overridden upon batch creation)
Expiration date = 6/29/2018 + 180 days = 12/26/2018
Shelf advice date = 6/29/2018 + 90 days = 9/27/2018
Best before date = 12/26/2018 – 30 days = 11/26/2018
Option #2 – Set the Manufacturing date based on the Vendor information:
The following pre-requisites should be completed:
Go to Inventory management > Setup > Inventory > Item model groups.
Select the Purchase registration check box.
Assign configured item model group to the item. After that follow the steps below:
Click Procurement and sourcing > Purchase orders > All purchase orders.
Click New and fill in all necessary fields.
Create Purchase order line.
Select the item that has item model wti vendor batch purchase registration activated.
Then select Update line > Registration.
Add a new registration line and then click Confirm registration.
Vendor batch details will appear where you will be able to populate vendor batch details.
Set Vendor batch date and click Use as manufacturing date.
Set Vendor expiry date and click Use as expiration date.
Close the form.
Open batch details and review the calculated dates. As you can see Manufacturing date and Expiration date were set based on the Vendor batch details.
So, based on the calculations:
Manufacturing date = 6/25/2018 (set by the vendor)
Expiration date = 12/12/2018 (set by the vendor)
Shelf advice date = 6/25/2018 + 90 days = 9/23/2018
Best before date = 12/12/2018 – 30 days = 11/12/2018
Option #3 – Automatically set Manufacturing date upon Batch creation:
The following pre-requisites should be completed:
Go to Inventory management > Setup > Dimensions > Tracking number groups.
Click New and create new batch number group.
Assign created group to the item.
After that follow the steps below:
Click Procurement and sourcing > Purchase orders > All purchase orders.
Click New, fill in all necessary fields and click OK.
Create Purchase order line.
Select the item that has batch number group assigned.
Once you save the record, new batch will be created with Manufacturing date = Current date.
Generation of the quality orders for batches based on Shelf advice date (aka Generate inspection orders)
The logic of finding all batches for inspection orders is the next:
AX validates whether Quality management is turned on (Inventory management > Setup > Inventory and warehouse management parameters > Quality management tab > Use quality management field).
AX validates Shelf Advice Date which is taken from the batch. Shelf Advice Date should be less or equal to system date.
I have 3 batches with the following Shelf advice dates.
AX validates physical inventory for the found batches as:
Physical inventory = posted Qty + received Qty – deducted Qty+ registered Qty – picked Qty
AX validates real physical inventory for the found batches deducting reserved inventory as:
Available physical inventory = physical inventory (from previous step) – reserved physical inventory
I have 3 those batches on hand with Available physical inventory 10, 20 and 30 pieces.
AX validates the following configurations:
Item sampling (Inventory management > Setup > Quality control > Item sampling).
Tests (Inventory management > Setup > Quality control > Tests).
Tests groups (Inventory management > Setup > Quality control > Test groups).
Quality association (Inventory management > Setup > Quality control > Quality association).
Now we only need to run the process:
Go to Inventory management > Periodic tasks > Batches > Generate inspection orders.
I have removed Manufacturing date filter because I don’t have batches with Manufacturing date = 7/1/2018 and expired Shelf advice date.
Click OK.
Since only two batches have past Shelf advice date (today is 7/1/2018), we would expect that quality orders will be created only for those batches.
Look at the message below:
Go to Quality orders form and check the result.
The next aspect I’d like to consider related to shelf life management is batch reservation.
Sales order reservation
Batch reservation depends on Pick Criteria of the Item model group assigned to the item (Inventory management > Setup > Inventory > Item model group).
At the time of item reservation, AX will compare the Expiration date or Best before date of the batch with the Sell date. Where Sell date = Requested receipt date + customer sellable days. If batch with an Expiration date or Best before date before the Sell date, AX will throw an error message and such batch will not be reserved.
If FEFO date-controlled flag is turned off or FEFO date-controlled flag is turned on and Pick criteria is Expiration date, then at the time of item reservation, AX will compare the Expiration date.
If FEFO date-controlled flag is turned on and Pick criteria is Best before date, then at the time of item reservation, AX will compare the Best before date.
The batch reservation will fail and provide an error message prompt as shown below.
In this post we will review 3 cases:
Case 1: FEFO date-controlled flag is turned off and Expiration date of the batch before sell date
Case 2: FEFO date-controlled flag is turned on, Pick criteria is Expiration date and Expiration date of the batch before sell date
Case 3: FEFO date-controlled flag is turned on, Pick criteria is Best before date and Best before date of the batch before sell date
FEFO date-controlled flag is turned off and Expiration date of the batch before sell date:
Today is 7/1/2018 and batch expiration date is 6/30/2018.
Once you try to select that batch in the sales order line or in the batch reservation, you will get an error:
Try to select the same batch through Inventory button > Batch reservation.
FEFO date-controlled flag is turned on, Pick criteria is Expiration date and Expiration date of the batch before sell date.
For this case, we will use the same item, but we will change Item model group setting.
For this example I have 2 batch numbers on-hand.
One of them (GFE-0005B1) is expired. The second one (GFE-0005B2) is valid.
Once you open Reservation you will see only batches where Expiration date > Requested receipt date + Sellable days.
The same will be if you open Batch reservation form.
Once you try to select expired batch number directly on the line, you will see an error message:
FEFO date-controlled flag is turned on, Pick criteria is Best before date and Best before date of the batch before sell date
And again, we will change Item model group setting.
For this example I will use the same 2 batch numbers:
Validation on the sales order line:
As you can see, the system validates Best before date instead of Expiration date.
Reservation form:
If Best before date < Requested receipt date + Sellable days and Best before date is filled on the batch number, you will not see such batch numbers.
Batch reservation form:
If Best before date < Requested receipt date + Sellable days and Best before date is filled on the batch number, you will not see such batch numbers.
As I mention earlier Sell date is calculated as Requested receipt date + Sellable day.
Sellable days can be set on the customer.
Sellable days can be set per item.
In this case you will get the following error message:
If you still want to reserve the batch that has passed its best before days in inventory you can reset the dates for that particular batch.
Click Inventory management > Inquiries > Batches > Best before as of date.
Click Reset shelf life dates.
The Reset shelf life dates dialog box is displayed.
In the Best before date field, select the new date.
The Recalculate expiry date dialog box is displayed.
If you click No, keep in mind that Best before date must be less than or equal to expiry date.
If you click Yes, Expiration date will be recalculated based on the item settings.
Click OK.
Now you will be able to reserve this batch number.
There are several ways how you can update shelf life dates (Inventory management > Periodic tasks > Batches):
- Update best before dates
- Update shelf advice days
- Update expiry dates
Update best before dates
If you select System in the Date calculation type field, the system will set Best before date as Expiration date – Best before period in days.
If you select Fixed in the Date calculation type field, the system will set Best before date the value that you set on the dialog box.
Update shelf advice dates
If you select System in the Date calculation type field, the system will set Shelf advice date as Manufacturing date + Shelf advice period in days.
If you select Fixed in the Date calculation type field, the system will set Shelf advice date the value that you set on the dialog box.
Update expiry dates
If you select System in the Date calculation type field, the system will set Expiration date as Manufacturing date + Shelf life period in days.
If you select Fixed in the Date calculation type field, the system will set Expiration date the value that you set on the dialog box.
All these three processes will update the batch data but only if there are no open quality orders for the updated batch (Use quality management flag on the inventory and warehouse management parameters will be validated).
That covers the main points. If you have any comments, I’ll be happy to hear them.
*This post is locked for comments