Tuesday, September 16, 2014

Tutorial: Generating shipping labels using the GS1 SSCC-18 barcode format

As a follow up to my previous post about printing labels using the new WHS solution, I wanted to describe an extra feature that is available out of the box in the new Warehouse management solution and allows to generate the license plate shipping label in the format of an 18-digit serial shipping container code (SSCC), which is "used by many companies to identify a logistics unit, which can be any combination of trade items packaged together for storage and/or transport purposes; for example, a case, a pallet or parcel.", as quoted from GS1.

Here is an example of an SSCC-18 barcode (description of each of its components is provided here):

Configuring the SSCC in Dynamics AX

Let's take each part of the code above and see where we set it up in Dynamics AX:

  • Application Identifier for SSCC is always 00 and is therefore also hard-coded in the X++ code
  • Extension Digit in AX is used to specify the type of the logistics unit - pallet, case, etc. This is set up in the Unit sequence groups by specifying a digit 1-9 in the field License plate packing type, and is during work execution retrieved based on the item being processed. If no item is specified, Extension Digit will be set to 0.


There is currently no validation implemented for this field, meaning you can type in any integer. Typing in a value that is more than 1 digit will obviously compromise your SSCC integrity

Here is how I have set up my Unit sequence group "Ea PL" for this demonstration:

  • GS1 company prefix is set up in the Warehouse management parameters and thus will be unique per company in Dynamics AX.


There is currently no validation implemented for this field, meaning you can type in any string with a length of 8 or less characters. The requirement is of course that you only type in numerical data. Note also that according to the standard, the company prefix can be as large as 10 digits, which is not supported in AX right now, but is rather easy to customize if necessary.

Here is how I have set up the GS1 company prefix for this demonstration:

  • Serial reference is currently only set up to be generated based on a number sequence for License plate IDs. Many people request that the Container ID (used as part of manual packing or containerization flows) is used instead, but that's as of right now not possible and requires a customization. 


There is currently no validation implemented to ensure the length of the generated number is within the required 6-9 digits, or that the generated string actually only consists of digits. It is therefore your responsibility to ensure the corresponding number sequence segments are set up correctly, ensuring that the combined length of GS1 company prefix and generated license plate ID is always 16 digits.

Here is how I have set up the License Plate ID number sequence for this demonstration:

  • The check digit is calculated automatically based on the generated ID and appended as the last symbol. No extra setup is required for this.

Mobile device menu item configuration

In order for all of the above to work, we need to make sure that the license plate is generated automatically by selecting the "Generate LP" check-box on the corresponding mobile device menu item.

Here is how I have set up the menu item for executing sales picking work for this demonstration:

OK, that's pretty much it. Now every time that a new target license plate is generated as part of picking sales orders, it will be in the format of a serial shipping container code. All you need to do is actually configure the work template to print the license plates, as shown in the above-mentioned post about printing labels.

The same will apply not only to sales picking work, but to many other types of mobile device flows, which as part of the flow generate a new license plate, both inbound and outbound.

Actual demonstration

To start off, I have configured the work template for sales orders to include an additional step to print the label, as shown on the screenshot below:

Next, I created a new sales order for 75 ea of item 000148_202, where a unit conversion is set up so that 1 PL = 75 ea. The order line is to be dispatched from warehouse 42, as shown below:

I reserve the line (you need to ensure there is sufficient on-hand inventory available for item 000148_202, and it is in a location, which is part of your location directives setup for Sales order picking), and release the order to warehouse, which, in turn, based on my wave template, creates a new wave and processes it, resulting in the creation of picking work that is shown on the image below:

As you can see, the Print steps is there, and the work lines are for 1 PL, which means that when printing the label, PL will be used to determine the value of the Extension digit.

Since the actual printing is already described in my previous post, I will use a different approach this time and will not setup the document routing at all. This will generate the label for me, but won't actually print it.

OK, so now let's proceed and actually execute the work. At the Pick screen, you will see the generated license plate ID, and can confirm that the format is right.


The field is currently editable, so the work user can accidentally overwrite the generated value. This might improve in future AX releases to prevent human error.


I am afraid the contents of the generated ID are a bit off at the moment. If you type in the below SSCC code into a check digit calculator (e.g., here), you will see that the calculator produces a different check digit as compared to Dynamics AX. This is a product issue Microsoft is aware of, and it has been hot-fixed since RTM. The KB article number is 3001157 (should be available on LCS soon).

Once the Pick line is executed, the printing itself will happen, and will create a record in the License plate labels table. Go ahead and complete the Put, and let's review the label information that was persisted by navigating to Warehouse management \ Inquiries \ License plate labels. I took the liberty of hiding the uninteresting fields from the view.

As you can see, all the vital information about the license plate label, as well as the context in which this label was generated are stored, and can be used in the future.
You can, for example, reprint the label, if necessary, using a mobile device menu item with an Activity Code = Reprint label

That's it for today! Stay tuned for more.

Thursday, September 11, 2014

Printing labels with the new Warehouse management solution

Hi all,

This blog post is based on a document I got from Boštjan Golob, a solution architect working with Dynamics AX. You can connect with Boštjan through LinkedIn.

I really enjoyed the information he provided and therefore wanted to share it publicly so all the AX community can learn how to configure and print labels with the new warehouse management solution. So here it is, enjoy:

Step 1: Understanding

How does AX actually print the labels? It is important to know that most label printers currently in use (such as Zebra brand printers) include some sort of a programming language interpreter and that the print job sent to a label printer is actually a small program. This is no different than with larger printers that use Postscript (there are web servers written in Postscript). In label printing, the feature set of a command language is usually quite rich: you can control the cutting of labels, the printer itself knows how to draw barcodes, you can select fonts that it has loaded in its memory and so on. This is an example of a ZPL (Zebra Programming Language) program:


AX can print a very sophisticated label by sending such a »program« to the label printer, while at the same time knowing absolutely nothing about label layouting. The labels stored in AX are command snippets like above. These are stored in Document routing layouts (Warehouse management – Setup – Document routing – Document routing layouts).
Knowing when to print a label is the job of configuration of menu items and work templates. AX can initiate printing of labels at work creation (for example in receiving scenarios), or during work execution. Which label to print is the job of document routing setup, where we tell the system, based on what we are currently doing, which label to pick and which label to send it to. We well get to configuration later.

Step 2: Getting the label in a text format

In order for this walk-through to be as comprehensive as possible (and as easy to click through without any annoying »this is left as an exercise to the reader« parts), the process of creating a small demo label will be demonstrated. I will use the NiceLabel labeling software (Made in Slovenia).
First, get the NiceLabel Designer Pro from the web site (www.nicelabel.com) and install the 30-day trial. Also download the NiceLabel Label Printer Drivers, as we will need them to create a dummy printer for NiceLabel to adapt the label to. This is important – label designs can be printer dependent and if you use multiple types of printers, it's best to export the labels with NiceLabel set to every different printer you will use the label with!
Before creating the label, follow these steps to create a dummy printer:
  1. Open the »Devices and Printers« in Control Panel, click on any printer and from the toolbar, select Print Server Properties.
  2. In the next form, select the Ports tab.
  3. Click Add Port…
  4. Select Local port and click New Port…
  5. For the port name, enter a file name (I use C:\_TEMP for misc. crap, so I put in C:\_TEMP\ZEBRAPRINT.TXT)
  6. OK out of everything.
  7. Run the installation program for the NiceLabel Printer Drivers and select a printer you would like to use (I have chosen a pretty basic »ZEBRA GC420d ZPL« printer).
  8. Select the port you have just created.
  9. Finish the installation.
  10. Rejoice!
After the printer is ready, open NiceLabel Designer and create a new label, selecting the printer you have just installed. You will get a blank canvas and you can start drawing. I have created the following layout using the Text and Bar code tools:

Label designer

The second text field is a variable field with the variable name LicensePlateId and the same variable is used for the bar code as well. You can design the label with fixed values, but you will then need to change the text in AX. NiceLabel also comes with plenty of out of the box sample labels, including GS1 SSCC label and so on, which can also be used as a starting point.
To get the text version of the label, you can use several options. NiceLabel Designer Pro supports export of templates for use in external systems. First, let's configure the AX specifics for export. Select File – Export – Printer Template Export Configuration and Add a new system. Give it a name (Dynamics AX WHS) and an extension (txt) and in the Variables tab page, enter $[Name]$ in Variables field like so:

NiceLabel Printer Template Export Configuration

This will cause variables used in the label to be exported in the generated file as $VariableName$, which is the format expected by AX when it does its own substitution of variable contents.
After you are done with this definition, click File – Export – Dynamics AX WHS and NiceLabel will create a nice text file which you then copy and paste into AX:

Document routing layouts

Step 3: Configuring document routing

We will use this label as part of the receiving put-away process 24 PO Direct, so we need to configure the document routing record. In the Document routing form, create a record similar to this one:

Document routing

I have used my dummy printer that I have installed on the AOS. Feel free to experiment with other filter values, which you will probably use in production, at least to differentiate to which printer you want to print the label (note to Microsoft: some web browsers can print to locally attached printers that people carry around with them, so printing could also be done via the web interface). Again – to use the printers, AOS will need to be able to print to them. I would strongly suggest using networked printers, not printers connected locally to computers in the warehouse and then shared, at least from experience. It is best to log on locally to the AOS as the AOS service account and check if you can print to the printers.
Lastly, we need to configure the work templates to print the label as part of the process. To do this, insert a Print step in the Work Template. In our example, 24 PO Direct gets another work step:

Work templates
The same approach can be used in the Sales order scenario as well, to create shipping labels for the picked license plates.
In case you would like to print your own labels as a part of receiving goods, you can use the "Print label" check-box on Mobile device menu items for several Work creation processes (PO receiving, Report as finished, Load receiving, TO receiving, Kanban). There is also an indirect activity "Reprint label" for later printing of LP labels.

Step 4: Demo

Create a purchase order for some goods and receive it using the mobile device (web or AX form). There will be no visible change from the user perspective, but, if all goes well, the file you set up for the dummy printer should appear and under Inquires – License plate labels, you should be able to see the newly created label. If you open the file using Notepad, it should contain ZPL with LicensePlateId substituted for the actual license plate number:


To see how the label would be printed out, you can use for example the Labelary service. The above example can be rendered using this URL.

Giving a nice result like this:
Printed label

That's it, you are all set to explore this on your own further, and thanks to Boštjan again for providing this comprehensive description of the process.

Monday, July 14, 2014

Announcement: Warehouse management system implementation guide for Microsoft Dynamics AX 2012 R3 is now available for download

If you have been following my latest posts on the new Warehouse management module in Microsoft Dynamics AX 2012 R3, and are curious to find out more, you should check out the new implementation guide that has been released today.

You can download it through the following link:

If you have any feedback on the guide itself, or on the information missing from it, feel free to reach out through comments to this post, and I will convey the message appropriately.

Enjoy the read!

Saturday, July 12, 2014

Walkthrough: Cancelling put-away work in Microsoft Dynamics AX 2012 R3

In the new Warehouse management solution shipped with Microsoft Dynamics AX 2012 R3, any movement of inventory in the warehouse would normally have a corresponding piece of work registered together with work lines detailing where the warehouse workers should pick the goods from and where they should put them.

Therefore, it is no surprise, that when you receive a purchase order (or any other inbound order, like a transfer or a return) through the new mobile device portal, work will be created to put away the goods into a storage location (or QA or whatever you set up in your location directives). The closest analogy for those who know the existing WMS II solution that I have is the pallet transports used in conjunction with arrival journals, where goods get physically registered at the inbound dock, and a pallet transport is created to move the pallet to the location found based on the put-away rules selected on the arrival journal line (Check picking/bulk locations). The new solution allows a much better level of control over all the warehouse operations.

What I want to talk about today is the cases where the created work is not satisfactory and needs to be modified / canceled.

There are three scenarios I would like to mention:

  1. The put-away location needs to be changed, because the suggested location is unavailable or another location is simply preferable.
  2. The put-away work needs to be canceled, where a decision about the put-away location will be taken later
  3. The put-away work needs to be canceled, because the receipt was incorrect to start with

1. If the warehouse worker doing the put-away is an experienced user who is allowed to make on the spot decisions about modifying the suggested flow of inventory, he can override the put location, storing the goods away into a different location at the warehouse.

This is controlled by a policy on the setup of warehouse workers, accessible through Warehouse management \ Setup \ Work users \ Worker, as shown in the below screenshot:

Work user policies
Allow work user to override put location when executing work

2. Another way to achieve this would be to cancel the pending put-away work, ensuring that workers do not see it on their mobile devices as something they should execute now, and creating a manual movement to a location of choice when the decision where to move the goods is made. This would be a decision done by a receiving clerk / warehouse manager. 
It could also be due to some extra paperwork or inspection being done on the items, where it's yet unclear if the system-selected put-away location is OK. (If it is, the warehouse manager could simply block the work until a decision is made, which would prevent workers from executing on it)

In order to cancel the work, simply press the "Cancel work" button on the Work details form (or corresponding list page). See a step-by-step walk-through below.

3. Now, sometimes, due to input errors or other factors, you would want to not only cancel work, but also make sure the goods are not physically at the warehouse either, reverting the entire receipt as if it never happened (you'll still have a trace of it happening). This could, for example, be useful if the receiving clerk was logged in to a different warehouse and accidentally received a purchase order to that warehouse instead of the one the user was actually at (Note: Not possible in RTM, need a corresponding hotfix installed).

This additional step of unregistering the items is controlled by a policy on the Warehouse management parameters, called "Unregister receipt when canceling work".

Warehouse management parameters
Warehouse policy - Unregister receipt when canceling work

Here is a step-by-step description of the cancel workflow:
  • Create a new purchase order for a WHS-enabled item to a WHS-enabled warehouse
Purchase order details
Purchase order with one line for a WHS-enabled item to a WHS-enabled warehouse
  • Using the mobile device portal, register the receipt of the above purchase order (Hint: use a mobile device menu item with Mode = Work and Work creation process = Purchase order item receiving)
PO receipt
Purchase order receipt on Mobile Device Portal

  • View the inventory transactions for the above purchase order, and confirm that they are registered at the default receiving location at the selected warehouse (Note: It is the warehouse the user was logged in to when doing the PO receipt from the mobile device)
Inventory transactions
Purchase order inventory transaction with Receipt status = Registered

  • Open the created put-away work (Hint: You can navigate directly to the new piece of work from the purchase order details form, by clicking on Work details button in the Lines section), and click on Cancel work.
Work details
Canceling put-away work

  • Confirm that Work status of the work header and lines has changed to Canceled, and (depending on the above warehouse management policy) the purchase order line inventory transaction is back in Ordered receipt status. 

Note: This policy is currently implemented only for Purchase orders and Transfer order receipts. It will not come into play when registering the receipt of a return order or any other inbound order types.

I would also be interested in hearing your scenarios, which require canceling put-away work, and the reasons behind them. So if you use this functionality for reasons other than described above, please leave a comment below.


Friday, June 27, 2014

Tool: Update: Automated way of setting up the Application Integration Framework

In November 2009 I have posted a blog post that presented a tool I wrote for quickly setting up AIF for testing purposes. You can find the original post here.

I have since received requests to upload a new version of that tool, that would work with AX 2012 R2.
Well, now, only 5 years later :), here is the updated tool, that works with AX 2012 R3 (Note: should also work with R2, but I have only tried it on R3).

You can download the xpo from my OneDrive.

To briefly describe the changes, as compared to the version from AX 2009:

  • There is no longer a concept of endpoints in AX 2012. Instead, there is a concept of inbound and outbound ports, so I have replaced the corresponding creation so that 1 inbound and 1 outbound ports are created, both using the File System Adapter, and dropping the files in a location on drive D. Note, that I have not done anything in terms of ensuring AOS has access to that folder, so if that is not working, ensure the right access is granted.
  • Channels are now created implicitly for each port, depending on the Adapter class you select.
  • I am not explicitly creating data policies now, which seems to mean all XML fields are enabled. If you want to restrict the schema to only certain fields, you will need to deactivate the port, and modify the data policies accordingly manually.

Note: Only services for Invent*, EcoRes* and WHS* prefixes are registered, and only their service actions are added to the ports. If you need additional actions in your tests, modify the code and add the extra prefix.

I have tested that the WHS ASN service works after executing the tool, both for inbound and outbound, and will describe the use of this service in a blog post on the SCM msdn blog shortly. If you however find stuff I have missed, let me know.