Code highlighting

Showing posts with label Location. Show all posts
Showing posts with label Location. Show all posts

Friday, September 30, 2016

Tutorial: Location directive failures - Common mistake #1 - Multi SKU

Preface

A lot of people that are getting to know the new Warehouse solution are struggling to set up the location directives correctly. They very often end up scheduling some work and not getting the location automatically selected by the system.

A good example is this post on the AX community where I attempt remote location directive setup data troubleshooting: https://community.dynamics.com/ax/f/33/p/141641/309594#309594

In this next series of posts I want to cover some of the more common errors people do when setting up the location directives and explain ways you can try to figure out why a location was not pre-selected automatically, if that happens.

You can read the basic information about creating location directives on MSDN, in these posts I will assume good knowledge of the concept.

Common mistake #1 - Multi SKU

This is one of the most common problems reported as "location directives are not working and I can't figure out why, everything seems right".

As most of you have probably seen on your installations, you needed to setup 2 location directives for Put for each configuration, one with Multi SKU, the other without. Often, because people don't really understand when this setting comes into play, they don't create both, but only the single sku, or only the multi sku, thus resulting in location not being assigned (allocation failing).

So here is a brief explanation:

As you know, when work is being created for an order, whether it is a sales, a purchase or any other supported order, the location directives are used to determine WHERE to pick/put the item(s). So for each individual work line location directives will be evaluated, and a location will be selected based on the work line details. The location directives will be evaluated sequentially from all the ones that meet the requirements for the particular work line (e.g., they are for the right warehouse, have the right details based on the query, etc.)

Note. There are special cases where the location to Pick/Put is pre-selected. For example, during PO registration the first pick is always from the RECV location. Another example is the Inventory movement by template, where the location to Pick from is selected by the worker himself, and only the puts are done through location directives.

One of the criteria evaluated on the location directive is the Multi SKU flag. The location directive which has Multi SKU flag selected will only be considered, if the corresponding work line being processed right now has Item number = 'Multiple' (it shows up as blank in the work details, but as "Multiple" on the mobile device). This is typically the case for when you need to put items down to a Staging / Pack / QMS areas, after having picked up multiple items from the different picking locations in the warehouse.

Therefore, if Multi SKU flag is selected for a location directive, you cannot edit the query for it. That makes certain sense, since this location directive would only apply to multiple items, thus you cannot really check if they fall withing the conditions of the query, because there are more items than one.

The Multi SKU flag mostly makes sense for Put location directives, because for most of the picks we are in a situation where it is:

  • an initial pick (thus, pick of 1 particular item)
  • a special pick of one or more items from a pre-defined location (like RECV I mentioned above)
  • a special pick where we continue work execution after having previously put the item(s) down to a certain location (STAGE is the typical example, since we'll need to continue to BAYDOOR after that)

Location directives do not prevent you from setting the Multi SKU flag for Picks, however, so if there's a certain scenario where you do need this, it'll be available.

Short summary

In short, if your work orders are always small, 1 item per order, then you do not need a Multi SKU location directive.
If, however, you have work orders with single items, and then some with multiple items being picked as part of one work order, you will need to have 2 separate location directives, one with and one without the Multi SKU flag, and then you can decide if you want the goods travelling to a different location in such cases.

Example walkthrough

To show the difference between the behavior of the location directives with and without Multi SKU, I have created the following location directives, which are identical apart from the flag, as well as the location to Put, so we can see the result difference. Again, only the two Put location directives are really of interest. I have chosen to show a Sales scenario, but the same applies for all other flows.

Location directive for sales Pick work lines on WH 24
Location directive for single-item sales Put work lines on WH 24

Location directive for multi-item sales Put work lines on WH 24
To summarize, the intention is that work order with single items will be put to BAYDOOR location, while multi-item orders will be put down at BAY_MULTI location.

Note. Both Put location directives have the Directive code set to Baydoor. Discussing the behavior of this field is outside the scope of this blog post, but will be covered in one of the following posts.

Now, I have created the following 4 sales orders and released each one individually to create work. I have created sufficient on-hand for picking these items. Sales orders have the following configuration:

  1. 1 line for a single item
    1. 10 pcs of A0001
  2. 2 lines for different items
    1. 10 pcs of A0001
    2. 10 pcs of A0002
  3. 2 lines for the same item
    1. 10 pcs of A0001
    2. 10 pcs of A0001
  4. 2 lines for different product variants (meaning, same item number, but different product dimensions)
    1. 10 pcs of P0004, Size = L
    2. 10 pcs of P0004, Size = S 
You can see the screenshots for work orders created, in the above order, below:

Work for sales order with a single item
Here, location BAYDOOR was used. That is correct, since the Put work line is for a single item, A0001.

Work for sales order with multiple different items
Here, location BAY_MULTI was used. That is correct, since the Put work line is for two items. You can see the Item number is blanked out on the work order line in this case.

Work for sales order with multiple lines for same item
Here, location BAYDOOR was used. That is correct, since the Put work line is for a single item, even though the quantity for this line is a combination of more than 1 work line.

Work for sales order with multiple product variants
Here, location BAY_MULTI was used. That is correct, since the Put work line is for multiple product variants. So even though the Item number stamped on the Put line is just 1 item, the product dimensions are blanked out since there is more than one.

This is one of the "confusing" parts, as the rule is not just a simple "item number is not filled in".
We treat product variants as different products in this regard, so it is important to note this particular difference.

Next step

Stay tuned for the next common mistake in one of the next posts.

Friday, August 12, 2016

Tutorial: Anchoring and Dock management profiles in Warehouse management in Dynamics AX

Scenario introduction


Today I wanted to talk about some of the less known features we have in the Warehouse management module, namely the Anchoring functionality and the Dock management profiles.
Let's start with just describing a scenario where this might be useful.

A company might be reselling goods in an environment, where deliveries are frequent, and there is no time at the dock door to sort out situations where the goods are spread out across multiple staging locations. The trucks need to pick up everything already packed nicely and be off fast. Very often, the truck driver himself would load the goods on the truck, without waiting for warehouse crew (in which case he'd have a WMDP scanner hooked in to our system). Sounds like a typical day for any distributor.

In order to achieve efficiency in the above scenario, multiple things need to come together:
  • In case of multiple picks for the same delivery, they need to all be assembled in the same place so it takes less time then to load them into the truck
  • Since the number of staging / loading lanes is limited, we need to restrict how many deliveries are placed in each one, so there is no confusion later about what goes where
  • Dock scheduling needs to be in place, so there are no hold ups due to unavailability of dock doors upon truck arrival (outside the scope of this blog post)
To help with the 2 first items, you can use anchoring and dock management. Below I will explain how to set it up and walk through a simple example of using these 2 features.

Anchoring

This feature gives you the ability to "anchor" multiple work order lines together, so that items picked all follow the same path in the warehouse. You can choose if you want the work to be grouped together based on the shipment they belong to, or the load they are on.

The setup is very simple, and you only need to choose if you want to anchor by shipment or by load.
It is done on the Mobile device menu items form for any menu items that are of type "Existing work" (apart from Cycle count grouping and Handle by License plate). First you tick the Anchor checkbox, and that will allow you to select what to Anchor by, as shown in the screenshot below:

Anchoring setup on Mobile Device Menu Items
Anchoring on Sales Picking mobile device menu item

And that's it. Now, when any of the work lines from the shipment/load is put down into a specific location, whether that is for staging or at the final shipping location, all other related work lines will be updated with the same location.

All the proper validation, such as checking for mixing rules, batch mixing, status mixing, etc. are performed, of course, along with the check for dock management rules, which we'll talk about below.

This feature is also useful when a worker is to put items for order 1 in a staging location by Dock 1, but can’t because a previous load hasn’t cleared the location. Rather than waiting for the Dock 1 staging location to become available, the worker decides to use the staging location for Dock 2 instead, and overrides the suggested staging location. The put location for all remaining items for the related work orders is updated to the Dock 2 staging location automatically.

Note

If you subsequently override the location when executing one of the anchored puts, that will be allowed, and will not update the other locations, treating this put as a 'special case'. If you do not want that to happen, you could consider not allowing your workers to override Put location (That is set up on the Worker).

Technical details


  • Work is anchored inside the WHSWorkExecuteDisplay.processWork() method, that is, during work execution, more specifically, when executing the Put step.
  • This is done by invoking WHSWorkExecute.anchorWork(), which in turn invokes depending on the setup one of the two methods:
    • WHSWorkTable::anchorWorkByShipment()
    • WHSWorkTable::anchorWorkByLoad()
  • Work lines that were anchored are stamped accordingly through the IsAnchored field

Dock management profiles

This feature extends the restrictions you can put in place on where goods can be placed in the warehouse, e.g., not allowing to have more than 1 item or batch, or inventory status, in a location.
Through dock management profiles you can restrict that items are not placed into a location, if they belong to a different order, or a different load, or even a different work order type. You configure this through the Dock management profiles form, as shown below:

Dock management profiles
Dock management profiles

These rules are validated both when work is only being created (as in, when evaluating the locations found through the Location directives), as well as when executing the Put, as in the above example with anchoring. It is also triggerred when changing the work location for a shipment or load (By clicking on Change work location button in the corresponding form).

Note, that no validation will be performed (including the general mixing rules and stocking limits) when determining the location to Put, if the Assume empty location for new wave is set on the dock management profile.

As the name implies, these restrictions only apply to staging locations and final shipping locations.
You configure this by specifying a dock managment profile on the selected location profile, as shown in the screenshot below:

Location profiles
Dock management profile Id on STAGE location profile

Note, that even though you can specify a dock management profile for any location profile, including inbound, it will not have any effect.

Technical details

  • Class WHSDockManagement is responsible for all the validation ensuring we do not mixed inappropriately in the location. 
    • Static method validateDockMgmtMixing is the entry point

Scenario walk-through

Note

I have highlighted in bold the 3 points I want to make in the walk-through.


I have created the following 3 sales orders for the demo:

  • SO 000779, part of Load USMF-000007
    • 10 pcs of item M9200 from WH 51
    • 20 pcs of item M9201 from WH 51
  • SO 000780, part of Load USMF-000007 (added after the first order was released to warehouse)
    • 7 pcs of item M9200 from WH 51
  • SO 000781, part of Load USMF-000008
    • 3 pcs of item M9201 from WH 51
I have released them to the warehouse, as a result getting three work orders:
  • Work USMF-000017
    • Pick 10 pcs of M9200 from BULK-001
    • Pick 20 pcs of M9201 from BULK-002
    • Put 30 pcs to STAGE
    • Pick 30 pcs from STAGE
    • Put 30 pcs to BAYDOOR
  • Work USMF-000018
    • Pick 7 pcs of M9200 from BULK-001
    • Put 7 pcs of M9200 to STAGE
    • Pick 7 pcs of M9200 from STAGE
    • Put 7 pcs of M9200 to BAYDOOR
  • Work USMF-000019
    • Pick 3 pcs of M9201 from BULK-003
    • Put 3 pcs of M9201 to STAGE2
    • Pick 3 pcs of M9201 from STAGE2
    • Put 3 pcs of M9201 to BAYDOOR
As you can see, the third work was directed to a different staging location, STAGE2, because I have set up the dock management profile to prevent mixing of items not belonging to the same Load. The first two work orders are both going to STAGE, since they belong to the same load.

Now, we will execute the second work and attempt to override the Put location, and put it to STAGE2 instead of the suggested STAGE:

WMDP Put step
Put step for Work USMF-000018

Work exception
Specify reason for Override Location

Location to Put into
Specify new location

Location invalid error
Error message

As you can see, we have received a message "Failed to change location due to dock management rules.". That is as we expected, because we have work 3 already on its way to STAGE2, and it belongs to a different Load, so cannot be mixed.

Let's now specify a valid location, STAGE3, which is empty and has no incoming work:

WMDP Put step with new location
Confirm Put to location STAGE3
After confirming the Put, we get the standard "Work completed" message. Let's now review the work:

Work details
Work USMF-000018
As expected, the second work was updated to reflect the overridden location. This has nothing to do with anchoring, just standard "Override Loc" behavior. But we know that the first work, Work USMF-000017 should also have been updated, because it is anchored by Load. Let's take a look:

Work details
Work USMF-000017
As you can see, it was also updated to now point to STAGE3, both on the Put and the following Pick step (as this is a staging location, so we know there are subsequent steps). Trying to execute this work now would suggest STAGE3 as the location to put the item into. 

The same can happen for loading work, updating the final shipping location on all relevant work lines, if the Sales Loading mobile device menu item was set up accordingly.

Pretty simple, but with great flow control for the warehouse managers out there.

Conclusion

Let me know if you find these features useful, and if you use them in an alternative way in your company / have modifications on top.

Thanks