Auto-post inbound delivery notes in a batch

Auto-post inbound delivery notes in a batch

In order to register a manual or an OCR purchase invoice, the accountant should match the quantity against the delivery notes (en-us: packing slip) captured at the warehouse. But what if the inbound area is only equipped with mobile scanners? What if we do not have the carbon copy on hand, or just don’t care about the printed document at all? The shipment may be damaged or incomplete! Indeed, we should only pay for what we’ve physically received:
Register the actual quantity → Post the ‘Product receipt’ with that quantity → Match the invoice against the same → Claim the difference from the supplier, if any.

However, when registering the said delivery note against the purchase order with the Generate / Product receipt button or the respective periodic task, the user must provide the delivery note number as written by the supplier of the goods. This makes an automation with a batch job at the first glance impossible, because it requires human interaction.

Update product receipts

The automatic job Warehouse management / Periodic tasks / Update product receipts is the remedy. For every inbound load within the given constraints, it creates and posts a delivery note aka packing slip with the total registered quantity.
The inbound load does not necessary require any active management. The load may be…

  • Created manually out of the purchase order lines in the Load planning workbench
  • Imported from an ASN, but also
  • Added by the system automatically if the parameter Automatically create at purchase order entry is turned on


If the load is not confirmed, the Update product receipts will confirm it automatically first, then promote to the final status Received. The bogus delivery note number is like LOADID_N, where N is a running number. The quantity is the registered quantity versus the respective load line(s). It does not matter how the registration came about:

  • Mobile scanner PO line/item receiving or PO line/item receiving and put away
  • Mobile scanner License plate receiving or License plate receiving and put away [against an ASN]
  • Mobile scanner Load item receiving or Load item receiving and put away
  • Mobile scanner Mixed license plate receiving or Mixed license plate receiving and put away
  • the new simplified License plate receiving: license-plate-receiving-enhancements
  • the classic inventory Arrival journal
  • and last but not least, the classic Registration at the purchase order line level.

In essence, you just scan the last pallet of the PO and forget. At the end of the working day (or faster, depending on the batch job schedule) the system will process every In process load (i.e. where the receipt of at least one pallet has started) and make as many delivery notes as needed to update the purchase orders.

More on inbound loads

The only limitation is the use of the advanced Warehouse management processes at the warehouse, i.e. the inbound load may only be created at a WHS-enabled warehouse. More on inbound load handing here: https://docs.microsoft.com/en-us/dynamics365/supply-chain/warehousing/inbound-load-handling.

The recent features “Associate purchase order inventory transactions with load” and “Multiple product receipt postings per load” may be beneficial.

Subcontracting with Warehouse management – Part 2

Subcontracting with Warehouse management – Part 2

Following up the 1st part of this blog series, let’s elaborate on the standard model of subcontracting promoted by Microsoft
https://docs.microsoft.com/en-us/dynamics365/unified-operations/supply-chain/production-control/manage-subcontract-work-production

Option 2: Subcontracting via Production order

The semi-finished product (here: M0070) has a BOM of its own. It includes all materials but also a service item (M0070_SC) for the value added by the subcontractor.

The service item drives the purchasing process with the subcontractor, is carries the purchase price of the service. We open a purchase order for a service, and provide components to the subcontractor which are either sent to the supplier from the main warehouse or procured directly to the supplier’s site. On the PO delivery note posting, the semi-finished product is received as an output of a sub-production order, it is then brought (“put away”) to the main warehouse, where it is picked for the master production order as a regular component.

The product structure transforms to a 2-level BOM:

Note that this time the service and the free issue material items belong to the same operation 5 which resides on an own route.

The standard process includes the following steps:

  1. The main order and the subcontracting order are either converted (firmed) from planned production orders, or the main order for D0003 is entered manually, then the estimation spawns the sub-production order automatically due to the type Vendor of the M0070 BOM line. The MRP explosion shows the following picture:
  2. With the firming/estimation of the sub-production order a purchase order for the service item M0070_SC is automatically generated by the system
  3. The purchase order is confirmed by the procurement department.
  4. The sub-production order is started from the screen Production / Subcontracted work. No materials or time may be consumed before this point.
  5. The transfer order for the free issue materials is released to the warehouse (it may be the same person who created and started the production order).
  6. The warehouse workers execute the picking work, confirm the TO shipment.
  7. The transfer order is getting shipped and received.

After a while the semi-finished product arrives at our doorstep. It is time to ‘receive’ the service. In standard Dynamics 365, this is not performed at a mobile scanner. Instead, a delivery note is posted against the purchase order. Thanks to the configuration described in first blog, this leads to an automatic consumption of the BOM and the route of the sub-production order. The system automatically:

– consumes both the materials delivered for free (M0071) and the service item M0070_SC itself,

– reports the route good quantity = purchase order quantity my means of a Route card journal, the same journal…

– …derives and posts a Report as finished journal which writes the semi-finished product in the stock ledger.

Normally, the last step – posting a RaF journal – is going to fail, because the license plate (SSCC pallet ID) is missing. To circumvent this, the special output location of the resource RECV-SUB can be given a “non-LP-controlled” location profile and assigned a “No putaway” work policy. This technique is described in detail in another blog of mine.

As a result, the received quantity of M0070 appears at the location 51/RECV-SUB with no license plate known and no production put-away work generated. A ‘fake’ put-away work may be triggered by the user with a special Movement by template menu item on the mobile device. The ‘from’ location in this menu item is pre-selected to RECV-SUB via the Default data setting of the menu item:

This menu item should be given a specific Directive code; a set of Location directives of the Inventory movement kind would react to this directive code and simulate the ‘put’ logic of a purchase order. The license plate number is scanned by the user during the movement. As a result of this movement, the pallet will land where it was supposed to be if we received the M0070 item from a purchase order (Option 1).

Now, the problem is that the step “Post purchase order delivery note” is not automated. Somebody needs to recognize the subcontracted PO as such, put aside the mobile device, open the rich Dynamics 365 interface and capture the quantity. In essence, this is an annoying deviation from the standard PO receipt process, a source of human error.

The suggested disruptive solution is a…

Warehouse-enabled service item

Astonishingly, it works: a service may be received on a license plate (pallet) in D365.

The stocked service item (Item model group -> Stocked product = Yes) should be given a WHS-enabled Storage dimension group with Use warehouse management process = Yes. Such an item participates in the master planning as long as it is assigned a Vendor-type BOM line, it does not have any on-hand stock at any given point in time, but it does record inventory transactions with all 5 mandatory WHS dimensions: Site, Warehouse, Location, Inventory status, License plate.

Provide the service item with the same unit, unit conversion factors, Unit sequence group, Reservation hierarchy as the subcontracted product it represents (here: M0070). Do not try to set the external supplier ID to the item number of M0070: the user would need to scan the real item ID (M0070_SC) at the baydoor.
Set the Output location of the subcontractor resource SUB_US-104 to the regular, LP-controlled location RECV. Here is what is going to happen on a timeline:

In practice, the consumption of M0070_SC in the below example will happen at the location 005 (the default WH production input location):
51/RECV +10 ea M0070_SC
51/005 -10 ea M0070_SC
This works even without the negative stock option set, because there is no such a thing as a service stock level: it is neither maintained nor controlled by the system. The location stock imbalance is not a problem for the inventory settlement and closing, because the location dimension is never a ‘financial’ one: the overall stock level at the warehouse level is zero, the (+) and (-) transactions will be settled and will mutually annihilate.

Subsequently, at the start of the sub-production order to the warehouse the system is going to say “The total quantity for production BOM XXXXXX could not be fulfilled. No work was created for wave USMF-YYYYYYYYY. See the work creation history log for details.”, because the item M0070_SC cannot be really picked, and this warning message can be safely ignored.

The scenario then continues as follows:

  1. The service from the purchase order is “received”, the license plate number is scanned or generated. Interestingly, the system does not build any put-away work for the item, probably because a service item cannot be reserved in any location.
  2. The delivery note (en-us: packing slip) posting should better be automated. In standard D365, this doesn’t work, because the batch mode posting requires a unique delivery note number. With a little customization this obstacle may be overcome by feeding the system with a fake delivery note number “DUMMY”. With the posting running in the batch mode and automatically updating every 2 minutes any purchase order with some quantity in the status Registered, this step may be fully automated:
  3. In standard D365 FO, the automatic posting of the picking list journal is going to fail because of the missing location (the Location dimension in the BOM of any WHS-enabled item is always empty, because it awaits a production order release to reserve at the location level according to the location directives, but a service cannot be reserved by definition), and the automatic posting of the Report as finished journals is going to ask for a license plate ID due to the LP-controlled location RECV. 2 little customizations outlined in the next chapter help: the service Licence plate ID propagates the production order and generates the RaF put-away work.
  4. The RaF put away location directives should be configured in exactly the same manner as the purchase order put-away locations. They can react to the M0070 item number or sense any other attribute of the sub-production order, such as a specific pool or a presence of a Vendor operation on the joined production route.The put-away work should be processed at the mobile device. A Print work line may be added to the Work template to print or re-print the pallet label which now has the proper Item ID: M0070 instead of the M0070_SC (beware that the Zebra ZPL printing language cannot carve a substring out of the printing stream or perform any other string manipulations).
  5. The semi-finished product is now placed in the main warehouse and the main production order may be reserved and released to the warehouse. A picking work for the subcontracted SFG is created.
  6. The picking work is performed at the mobile scanner:
  7. The main production order may be stated and the materials may be consumed with a Picking list in any eligible way.

ProdBOM table customization

The above scenario needs a little extension of the ProdBOM table:
– the location of the service may not remain empty. The method setInventDimId() has been extended to populate any WHS-enables service BOM line with the Default production input location of the warehouse. The location does not need to match the inbound location for the reasons described above.

– the license plate number of the service received with the purchase order should propagate the marked subcontracted production order. The method postVendorProdRoute() has been extended to write the service LP number right into the production order inventory dimensions. Obviously, this allows for the receipt of 1 pallet at a time, and updates the production order with the most recent license plate.

This does not contradict the current system logic though, as partial receipts can anyways only be enabled by an undocumented feature ProdJournalPostVendorProdBOMInOrderFeature:
This feature enables partial receipt of subcontracted items. Before, when reporting a partial quantity on a purchase order for a sub contracted service item, the full quantity was updated on the related picking list journal on the production order. Now, the correct partial received quantity is updated. This feature also fixes an issue with an incorrect updated scrap quantity when using BOM lines of type Vendor.

The source code can be downloaded here: ProdBOMLine_SubcontractingLicensePlate.axpp
Feel free to use, but I do not give any guarantees 😉

Conclusion, pros and contras

2 options have been presented:

Subcontracting via Purchase order

  • + A lightweight implementation can be easily adopted by the logistics department.
  • + It does not require any customizations.
  • – The raw material transfer to the subcontractor may be scheduled too late if we maintain the subcontracting lead time at the route operation level.
  • – The cost price of the semi-finished product only includes the cost of the subcontracting service, but not the materials. The standard price model will always show deviations.
  • – The free issue raw materials are only consumed at the next operation. On long-running orders this distorts the WIP value.

Subcontracting via Production order

  • – The solution contains too many moving parts: the sub-production order must be in the Started status, all raw material levels at the external warehouse must be exact.
  • – The segregation of duties between the procurement, logistics, warehouse and production departments is broken.
  • – Such a ‘deviant’ process is not easily adopted by the warehouse people: they must know when to use the normal purchase put-away menu items and when to leverage the production put-away menu.
  • – Comfortable work is not possible without the above production BOM and purchase delivery note auto-posting customizations
  • + The cost price of the semi-finished product is correct at all times.

Choose for yourself, but the CFO may let you reconsider 😉

There is a video recording in German explaining fine aspects of the 2 scenarios.

Subcontracting with Warehouse management – Part 1

Subcontracting with Warehouse management – Part 1

Introduction

A typical real-world scenario for subcontracting in discrete manufacturing looks like this: the local production needs a part at one of the steps which is procured from a 3rd party. This supplier aka subcontractor is provided with some materials for free (“free issue materials”) to perform the work. The free issue materials remain in our local balance. They come back as a semi-finished product with a value-added service on top.

In standard D365FO, a sub-contracted operation is designated with a certain type in the route, and the bill of materials entails a service item representing the value added by the subcontractor. As the production order is getting estimated or converted from a planned production order in the MRP, a purchase order is opened with the supplier for the service item. The receipt of the service item in procurement (with a Delivery note i.e. Packing list or with an Invoice) may report the operation on the route as finished, consume materials associated with this operation, and absorb the sub-contracting cost into the value of the finished product.

The simulation by Microsoft https://docs.microsoft.com/en-us/dynamics365/supply-chain/production-control/subcontracting resembles this story, but it misses one key element: the receipt of the semi-finished product at the inbound location with the mobile scanning device (Warehouse management). Let’s get one thing straight: this just doesn’t work in Dynamics 365 for SCM for the following reason:

Assume, we need a perforated plate for the proverbial Contoso speaker from the Dynamics 365 demo database. We inform the supplier about the need for the perforation with a purchase order, send them the steel plate with a transfer order, receive the perforated plate back, put it on stock and use it in one or many production orders of our own.

Physically we treat the semi-finished product “Perforated plate” as a normal purchase order inbound delivery, but the purchase order is raised only for the service ‘inside’: “Perforation”. In theory, one may even capture a stocked service on a mobile scanner, but it cannot pass the license plate (pallet) number to the subcontracting production order, which is open for a different product number.

Two possible solutions– non-standard and standard – are presented below. None of them is fully satisfactory, though. As Germans figuratively put it, it is “die Wahl zwischen Pest und Cholera”, a choice between the devil and the deep blue sea.

above *) „Knight at the Crossroads“, 1882, by a Russian romantic and early art nouveau painter Viktor Vasnetsov

Prerequisites setup

For this study, we need a new route operation (“Perforation”), and a new Route group (Production control > Setup > Routes > Route groups). The route group Sub will be somewhat special:

The added value is absorbed with the service item, therefore the estimation and costing of the subcontractor’s time it turned off; you will probably create a separate hour cost category with the price of zero.
The Automatic route consumption Quantity is set to Yes to trigger the automatic reporting as finished (RaF) of the semi-finished production upon the PO receipt. Typically, you do not plan the subcontractor’s capacity and consider them a “black box” with a quantity-independent lead time, but for the automatic route consumption and MRP you MUST activate the Process job. The lead time may be entered either in the default order properties of the SFG released product, or in the subcontracting route as a constant Transport time.

Another part of the puzzle for the automatic RaF is the Automatic report as finished flag in the Production control > Setup > Production control parameters:

If you capture production time and yield at Job card terminals with Manufacturing execution, then the ME route/job journals will neglect this flag, and the automatic RaF will only be triggered on manual route journals and subcontracting purchase order posting.
This was about the automatic reporting as finished; the automatic consumption of materials and routes (i.e. quantity reporting + RaF) is triggered by the 2 parameters on the Automatic update tab:

The supplier (en-us: vendor) needs an external warehouse of the Vendor type and a resource of the Vendor type. The subcontractor’s warehouse (here: EUS-104) must belong to the same site as the main warehouse (here: 5). This is because the materials in the semi-finished product BOM are tagged with the subcontractor warehouse in order to trigger a replenishment (“refill”) by an outbound transfer order. Yet the sub-production order may be pointing to our own warehouse (here: 51) to directly post the receipt of the SFG at the local site, if the inbound fransfer EUS-104 -> 51 is organized by the supplier. Such a ‘mix’ of warehouses in one BOM is only possible within the same site in D365FO.

In 99% of the cases, the external warehouse does not Use warehouse management processes, i.e. it is not an ‘advanced’ one, because there is no one from our organization to capture the inbound license plates. Instead, it requires a default receipt and issue location (here: IN_OUT).

The production resource uses this unique Input warehouse, therefore it requires an own dedicated resource group: resource <=> resource group <=> input warehouse.

Should the inbound transfer order from the supplier to our premises be managed by us, then the Output warehouse = Input warehouse = EUS-104.
The Output location is an interesting topic of its own. In reality, the output warehouse comes from the MRP planning, from the MRP demand. The MRP demand comes from the production BOM line which is deemed to consume the subcontracted SFG. Whatever the consumption warehouse is set there, it propagates the planned production order for the SFG, unless the inbound transport is managed by us (then it requires a separate replenishment setting EUS-104 -> 51).

If the same subcontractor delivers products to different warehouses of our own, then the sub-production order does not always comply with the above Warehouse setting at the resource level.
Fortunately, the developer of the method \Data Dictionary\Tables\ProdTable\Methods\defaultOutputLocation() was not sophisticated enough to check if the warehouse in the production order matches the warehouse of the last resource on the production route: the Output location is overwritten unconditionally on reporting the product as finished. It suffices if all warehouses have an output location with the same code RECV-SUB.

Finally, we need a set of released products:

Item numberNameProduct typeStor dim groupItem model groupUoMUnit seq. groupReserv. hier
D0003StandardSpeaker (FG)Item     
M0070Perforated plate (SFG)ItemWare (=WHS-managed)e.g. FIFO (stocked)EaEa PLDefault
M0070_SC*Perforation (service)ServiceWare (WHS) or SiteWH (non-WHS)e.g. FIFO (stocked)EaEa PL or noneDefault or None
M0071Steel plate (RMServiceWaree.g. FIFO (stocked)EaEa PLDefault

*Option 2 only

In standard D365 SCM (hereafter ‘Option 2’), there will be a ‘twin’ service item (here: M0070_SC) defined for every semi-finished product (M0070). As they put it, “…the service product is used to identify the arrival of the semi-finished product”.

Option 1: Subcontracting via Purchase order

1-level BOM: in this case subcontracting is managed through a ‘trading’ flow. The subcontracted semi-finished product is procured via a purchase order and received in stock as a regular inbound shipment. In other words, the subcontracted product does not originate in a production order as otherwise prescribed by the D365 best practices. The component(s) of the product are either provided for free or directly sold to the subcontractor and remain in the master product’s BOM.

In fact, the subcontracting operation “5” in the route on the diagram is not even required, everything is managed through the BOM:

According to the documentation https://docs.microsoft.com/en-us/dynamics365/unified-operations/supply-chain/production-control/manage-subcontract-work-production,
to use subcontracting of route operations for production or batch orders, the product that is used for the procurement of the service must be defined as a product of the Service type. However, an undocumented feature of D365FO allows for stocked products of the type Product (not Service!) in the Vendor-type line.

An analysis of the source code in
\Data Dictionary\Tables\ProdBOM\Methods\postVendorProdBOM
\Data Dictionary\Tables\ProdBOM\Methods\postVendorProdRoute

has shown, that an automatic consumption of the BOM or the route is not supported for Products, unless you extend the ProdBOM.verifyItemType() method. However, it is not such a bad thing: the automatic BOM consumption of a service PO receipt would have consumed the service itself, then any other material at the same route operation (Op 10). But we don’t want to consume the SFG M0070 immediately! The product has to be received, put away to the main warehouse, picked from the warehouse, brought to the step “Assembly” and then consumed.

To backflush the material M0071, it has been attached to the same operation 10 Assembly (note the external warehouse for consumption):

This is not ideal, because the material is needed at the moment of the Op 5 scheduled start. The operation 10 is scheduled later. To mitigate shortages, one should choose the transfer lead times of the free issue materials carefully.
Resource consumption = Yes means the material is picked from the location of the respective machine 5110 (here: 51/002)

Let’s create a production order for D0003 at the site “5”, estimate it and check the MRP explosion:

The estimation of the production order resulted in a purchase order for M0070. In addition, a planned transfer order has been created for the raw material from our site to their site. After the confirmation of the PO by the supplier, this transfer order must be dealt with soon, to ensure the smooth execution of their work. Potentially – depending on the MRP settings – this can be also a purchase order delivered directly to the subcontractor.

To proceed, firm the transfer order, locate the transfer order in the list Inventory management > Inbound orders > Transfer order list by looking at the target warehouse, contact the shipping carrier and organize a pick-up of the goods, then use Ship / Release to warehouse to initiate warehouse work for the reserved (!) material. Process the work at the mobile device: Outbound / Transfer pick. Check out my earlier blog how to call the mobile device emulator:

Once picked and ready to be loaded into the truck, the shipment appears in the list Warehouse management > Shipments > Shipments ready to ship. Print a packing list, confirm the shipment. The transfer order is now officially Shipped. Receive the transfer order for the whole quantity immediately, as this external warehouse is unmanaged. The plates for perforation are now at the warehouse EUS-104.

Someday, the plates come back, full of holes. They need to be received at the mobile scanner (Inbound / Purchase receive). The SSCC number typically exists and can be scanned, there can be an option to print an own label with the product ID and name. Next, the pallet is Put away to the main stock:

With a little customization, the purchase order may be updated with a delivery note by an automated batch for the whole registered quantity, yet this delivery note does not kick off any automatic action in production due to the wrong product type of M0070.
The production may be released now! Make sure the newly received subcontracted product has been reserved, then go for a Release. It creates warehouse work to pick the perforated plate and bring it to the assembly resource. At this moment, M0070 becomes reserved at the location level. Process the work at the mobile device: Production / Production pick

The perforated plate has been brought to the location 002 of the machine. From now on, the production order may be started, and a picking list for the ultimate material consumption may be posted in a vast number of ways. The material M0071 previously brought to the supplier is backflushed too:

Success!
Check out the 2nd part: Subcontracting via Production order.