D365FO: Filter codes to restrict products available for customer sale

Product filter codes functionality was introduced in Microsoft Dynamics AX 2012 R3. It can be used to categorize inventory items in the warehouse or restrict product purchase/sale from/to particular vendor/customer.

This post covers setup required to restrict product from a sale to particular customer.

The scenario that I have used in example as follows:

To buy specific product every customer should hold a license. The license is valid for particular period, so it is required to perform license validation whenever you create a sales order and if customer does not have active license we should not be able to sell it.

To make it work in AX, firstly we need to enable Product filters in Warehouse management parameters, i.e. activate “Enable customer filters” parameter.

WHSFilters_WHS_Parameters

There are few options how you can setup filter code validation: on the item group level or item group and filter code combination. This setup is driven from the Item group and if you would like to consider Filter code as additional criteria, then you need to activate “Use filter code” for those product filters.

WHSFilters_Item_Groups

In this example we will setup validation for item group and Filter code 1, i.e. we have all products in one group and filter code will determine whether product is licensed or not.

On the next step we need to create values which we are going to use as a product filter. You can find this option in warehouse management setup. I have created two filter codes: Licensed and Other (i.e. non-licensed).

WHSFilters_Product_Filters

Now we should specify what products should not be restricted from the sale at any time. This can be done in “Generally available products”. On this form we should list Item groups or Item groups with any Filter code combination that do not require Product filters validation.

As you see from the below screenshot all items with Filter code 1 = Other would not be controlled at sale.

WHSFilters_Generally_Available_Items

To complete the setup we need to assign Filter code value to the items in Item group.

I have choose two products from the group and assigned Filter code 1 as “Licensed” for one of them and left another one as available (Filter code 1 = Other).

WHSFilters_Item1WHSFilters_Item2

NOTE: Product filter codes are available only for items that are enabled for advanced warehouse management processes.

To verify the setup we did we should create a sales order and add both items to the sales order lines.

On the below screenshot you see that I have been able to create sales line for item with Filter code 1 = “Other”, but I could not add “Licensed” product to my sales order because of the warning message:

WHSFilters_SO_warning

Let’s try to create filter code for this customer and add this product to the sales line once again.

On the Customers form we have Product filters button under Set up group:

WHSFilters_Customers

On the product filter codes form we need to add a line with required item group and filter code. I will leave Start date/time and End date/time as blank (i.e. no expiration date) but we can used these fields to define period when customer license is valid:

WHSFilters_Customer_Filters

NOTE: Product filter codes can be also specified on a customer group level.

Go back on the sales order and create same line once again. This time it worked:

WHSFilters_SO

That is all, now we cannot sell “licensed” products if customer won’t have product filter code “license” assigned.

Leave a comment