Accepting credit cards, warehouses, and shipping and fulfilling orders
According to Shopify docs a properly implemented fulfillment service integration should respond to the "fetch_stock.json" callback with the on-hand amount of the SKUs requested. Shopify then subtracts the "Committed" amount from this number to derive the "Available" amount. Therefore, we must return to Shopify the available amount plus an additional amount to represent the pending orders that have been submitted for fulfillment but not yet fulfilled. I'll call this the "pending" amount.
For example: Consider there are 100 physical units in hand. Submit 2 orders for 2 units each. Available should be 96 units (100 - 4 committed).
When our fulfillment service receives a fulfillment request we accept the fulfillment order and allocate those units to the purchase order so our available amount is reduced. However, when we report availability to Shopify we add this "pending" amount back knowing that Shopify will be subtracting it. Problem solved.
However... If a shop owner has duplicate SKUs in their store this breaks down. I don't know all of the reasons one would want to have duplicate SKUs, but it is quite common in my experience. Perhaps it has to do with multiple sales channels, brand propositions, etc..
When there are two or more SKUs in Shopify and "pending" orders are created for the various duplicates, Shopify stores a different "Committed" amount for each one. The problem is, my fulfillment service can only return one number, but Shopify is going to subtract different amounts from that number for each of the duplicate SKUs depending on how many of each were ordered. For example, if there are 100 physical units and 4 are reserved for duplicate SKU 1, 20 for duplicate SKU 2 and 3 for non-Shopify orders, there should be 73 available for sale in Shopify.
So as you can see, it is impossible to get both SKUs to be correct since I can only return one number and Shopify will subtract a different number from it for each of the duplicate products.
I propose that Shopify changes the behavior such that the code that processes the inventory should deduct the Committed amount for all duplicate SKUs together when the inventory levels are connected to the same locations. That is, if it is the same SKU and it is connected to the same Location then it is referencing the same physical product. A unit committed via one duplicate Shopify product is effectively committed to all other duplicate Shopify products as well, so it should be deducted from all. If it worked this way, then the fulfillment service could return the available amount plus the pending amount (97 in this example) and Shopify would subtract 24 (4 +20 committed) to arrive at the correct amount for both SKUs: 73.
Here is a document demonstrating proof that how I described it is how Shopify works: https://doc.clickup.com/2304761/d/h/26aqt-3094/9dac1fbe5d3a4a6
Thanks,
Colin
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024