Overview
Warehouse work in Dynamics 365 is predominantly controlled by work templates and location directives, which work in tandem to create the final warehouse work that must be completed by the warehouse workers.
Work templates
Work templates are created in Warehouse management > Setup > Work > Work templates and define what work is to be performed and how it must be performed by the warehouse workers. The warehouse work consists of pairs of actions; a pick and a corresponding put step. In many cases with simple processes, the work template will consist of a single pick and put step but can contain multiple pairs if the stock needs to be staged at various locations e.g. at the end of an aisle location or a packing station. At this point, however, the actual locations to pick from and put to are unknown as these are determined by the location directives.
The first step when creating work templates is to determine the Work order type which specifies the type of work the worker will need to perform e.g. purchase orders, sales orders, raw material picking, stock movement etc. In the example below, there are multiple work templates created for purchase order receipts. Dynamics 365 works, by checking each work template in sequence number order to find the first work template which matches the query as specified in Edit query. When a matching query is found, the warehouse work will be created with the necessary picks and puts as specified in the Work template details section.
The edit query can have multiple criteria, but in this example, it just specifies that the Warehouse must be 51.

In other words, when a purchase order is receipted into warehouse 51, each of the work templates are checked in order, and as the first work template specifies warehouse 25 and the second specifies warehouse 61 respectively, they do not match. When the third work template is checked which matches warehouse 51, it will be used to create the warehouse work, and for this warehouse, requires just a single pick from one location and a put to another location.

Location directives
Location directives are created in Warehouse management > Setup > Location directives and define the actual location to pick a stock from and where to put the stock item.
In a similar way to how work templates function, the first step is to specify the Work order type e.g. purchase orders and Dynamics 365 will check each location directive in sequential order to find the first valid entry that matches the warehouse selection and any other queries entered. The following main settings would then be specified:
- Work type – specifies whether this location directive will determine a pick or a put location.
- Warehouse selection – this location directive will only be considered if the warehouse matches the work that is being created.
- Lines – is a filter criterion to allow specifying different rules to pick and put for different quantities or units. So, for example, if 1 to 10 is entered in line 1 and 11 – 20 in line 2 and the purchase order receipt is for 15, then line 2 will be selected
- Location directives actions – is where the actual location is determined. Again, similar to the work templates, the edit query allows the actual valid locations to be specified. In our example below, the edit query specifies that any location with a location profile ID of BULK-05 within warehouse 51 will be a valid Put location. It is also now possible to click the Preview button to display a list of all locations that match the query which very much aids the setup of the location directives.
Location directive:

Edit query screen:

Preview screen:

Learning with Microsoft
Further information related to work templates and location directives can be found on Microsoft Learn via the URL below.