Description
For one of our recent Magento 1 customers we've integrated a solution for them to be able to enter Transfer Orders and allow customers to purchase those product and reserve items from that Transfer Order. We've successfully integrated this for small B2C orders and advanced Admin Panel functionality to be able to create huge B2B orders (1mil+ per order value) with very precise stock allocations.
This customer is currently moving to NetSuite as their ERP system, but NetSuite doesn't support this functionality, so they have to scale back in this regard and risking stale stock lying around in warehouses.
Earliest Transfer Order - Quote Assignment
The way this looks in the backend:
When a Quote is created and products are added to the quote the inventory management module tries to assign the current stock to the QuoteItem. If there is stock available everything goes the way it currently goes. If there isn't stock available it tries to find a TransferOrder and assigns it to the OrderItem.
Since each TransferOrder has a 'Shipping date to Customer' field it is able to retrieve that date per QuoteItem and thus for the whole Quote.
SKU | TransferOrder | Shipping Date |
---|---|---|
AAA | Available Stock | Tomorrow |
BBB | Transfer Order X | In two weeks |
CCC | Transfer Order Y | In three weeks |
---------- | ------------------ | ---------------- |
Finally: | In three weeks |
Please note that in the actual system it doesn't display 'In two weeks', it displays the actual date.
Manual Transfer Order - Quote Assignment
For the Admin Panel UI the B2B Sales representative is able to create orders and can manually assign a TransferOrder manually instead of the current stock.
SKU | TransferOrder | Shipping Date |
---|---|---|
AAA | Available Stock | Tomorrow |
BBB | Transfer Order Z | In two months |
CCC | Transfer Order Y | In three weeks |
---------- | ------------------ | ---------------- |
Finally: | In two months |
Order Placement and Transfer Order Assignment
Now when an order is placed in the system there is a general 'Earliest Fulfillment Date' calculated by getting the latest date of all the order items. Since it now has this date it is able to calculate the actual TransferOrders for each order line.
So for the latest Admin Order example the Quote has the Earliest Fulfillment Date of 'In two months (e.g. 14 dec)' it will recalculate the order in the following way:
SKU | TransferOrder | Shipping Date | Actual Transfer Order |
---|---|---|---|
AAA | Available Stock | Tomorrow | Transfer Order Z |
BBB | Transfer Order Z | In two months | Same |
CCC | Transfer Order Y | In three weeks | Same |
---------- | ------------------ | ---------------- | ---------------- |
Finally: | In two months |
The Earliest Fulfillment Date doesn't change because of this recalculation, but we do not need to reserve stock on the currently Available Stock. This means this stock never lies in the warehouse because it is reserved for a customer.
Multi Transfer Order assignment
For a given Product+Stock location we could have the following data available:
TransferOrder | Customer Fulfillment Date | Purchase Qty | Available Qty |
---|---|---|---|
Current Stock | 2 days | 120 | |
X | Two weeks | 12 | 12 |
Y | Three weeks | 213 | 105 |
Z | Two months | 122 | 122 |
When 130 items are placed in the Quote it will automatically select the Earliest Fulfillment Date from X as the earliest Customer Fulfillment Date available since it is able to reserve 120 from the current stock and 10 from TransferOrder X.
Now when this Quote is converted to an Order it will actually reserve it in the following way:
TO | Customer Shipping Date | Purchase Qty | Available Qty | qty:130 earliest | qty:130, three weeks | qty: 130, two months |
---|---|---|---|---|---|---|
CS | 2 days | 120 | -118 (2) | -13 (107) | (120) | |
X | Two weeks | 12 | 12 | -12 (0) | -12 (0) | (12) |
Y | Three weeks | 213 | 105 | (122) | -105 (0) | -8 (97) |
Z | Two months | 122 | 122 | (122) | (122) | -122 (0) |
So each order line can be assigned to multiple Transfer Orders and will reserve all inventory on the Transfer Orders.
So this means that when an order is placed the Earliest Fulfillment Date is calculated for the whole order. Then for each OrderItem it tries to work back from that date to find the latest Transfer Orders.