Hi Fahad,
I think I may have thrown too many questions at you at once rather than just focus on the one that is of the most importance to our workflow. Per danielcoopers comment it appears that what we aim to do is possible.
Here is a bit of an in depth look at what our workflow would look like.
We are b2b selling to specific segment of manufacturing industry. Our top 20 products we expect to see inventory turn on a weekly basis. Our customers will order the product to either inventory on their end, order for several jobs flowing through their production, or by individual job. Many customers will order on next day air delivery as they may receive rush orders or may have missed ordering for a particular job.
This means that we have to manage our stock commitment/promised manually. We may have qty 100 in stock but have multiple orders for total qty 50 but expect another order shortly for another 100 but still have to maintain inventory for any rush orders coming in. So we will short ship qty in order to fulfill existing orders, backorders, and potential future orders till our next inventory replenishment arrives. This is why using the default backorder and stock level in woocommerce will not work for us. This in turn leads us to why we need to be able to split order by qty manually.
In addition we have a particular category that will always ship freight due to size and weight restrictions of most parcel shippers. This category of product we will initially have our supplier blind ship on our behalf. So we would automate this category to always split out as a child order. We can handle this by just scripting that if an order contains this category or product turn on “Auto Split” and apply split so that exclusive category or product is split in to child order. Then reset split_status custom field back to “0” in the event that any of the other product needs to be short shipped as per above. And finally turn off “Auto Split”. Then the shipping person can short ship remainder order if required.
Example:
Order 0001 (status processing)
Item A: qty 25
Item B: qty 10
Item C: qty 100
Script (pseudo):
function(checkNewOrderCategoryC) {
var newOrder = wc_new_order;
var autoSplit = auto_split;
var splitStatus = split_status;
autoSplit = 0;
//wc_category_c is always exclusive so will be split to new order
if (newOrder.includes(wc_category_c)) {
autoSplit = 1;
split();
if (splitStatus == 1 && autoSplit == 1) {
splitStatus = 0;
autoSplit = 0;
}
}
else {
autoSplit = 0;
splitStatus = 0; //redundant reset to “0”, just in case.
}
}
Result:
Order 0001-1 (status processing)
Item A: qty 25
Item B: qty 100
Order 0001-2 (status processing)
Item C: qty 12
The user now needs to review Order 0001-1 to determine if they need to short ship. Since split_status should have been set to “0” the user can manually split as needed.
We would also script that any time a manual qty split is performed the second child order_status is always set to “backordered”.
User performs the qty split manually and the final result may look something like this.
Order 0001-2 (status processing)
Item C: qty 12
Order 0001-3 (status processing)
Item A: qty 13
Item B: qty 10
Order 0001-4 (status backordered)
Item A: qty 12
Item B: qty 90
We would script in to the edit order page a “qty shipped” input field that only accepts numeric input and is initially set to the qty ordered. At bottom we would place a “update” button that when clicked would change order status to “complete”. Once order_status is “complete” we would push to our inventory system and reduce our inventory by this amount.
In the event that any line item has “qty shipped” value changed to other than the qty ordered we would apply the split action on “update” button click and then set order_status to “complete” on the first child order created and “backordered” on the second child order.
The second order which has order_status “backordered” could then be qty manual split again if user needs to fulfill another partial shipment of any qty. And so on.
Since we are only every qty manual split by 1 order we would populate the meta “qty shiped”:”qty ordered – qty shipped” in the event the “qty shipped” field has changed.
Hope this isn’t too much info but it is the workflow that we expect to implement. So any documentation that could be provided for us to quickly implement would be appreciated.
-
This reply was modified 3 years, 2 months ago by nmballa.
-
This reply was modified 3 years, 2 months ago by nmballa.
-
This reply was modified 3 years, 2 months ago by nmballa.
-
This reply was modified 3 years, 2 months ago by nmballa.
-
This reply was modified 3 years, 2 months ago by nmballa.