Tracking Inventory as Variants of a Separate SKU

We have a working solution for a purchasing a fabric kit in our Shopify sandbox, but we have not been able to figure out a way to track inventory, because of its unique properties:

We have two SKUs, one for the fabric kit themselves, one for the fabric. We build out a customer’s request with a form that gives us the kit SKU, which we then dynamically populate with the actual fabric in a second SKU via a dropdown. Fabric SKUs have two variants for inventory tracking: full rolls of fabric (e.g. 50 feet long), and By the Foot.

The price is calculated by the feet needed for the kit: if a kit requires, e.g., 105 feet of fabric, we dynamically update the price with a hidden “feet” value based on the kit requirement (the dynamic piece is why we don’t do bundles, since those can’t calculate the dynamic price for us for every scenario). That order goes through with other hidden values we need to build the kit. What we haven’t figured out is how to deduct that the amount of fabric needed for that order from those two variants that track inventory of the fabric SKU.

It’s more complex still: we calculate how much fabric is needed based on full roll length and By the Foot. In our scenario above, assuming a full roll at 50 feet, we would need to deduct from the inventory variants:

2 full rolls;
5 By the foot

to correctly track inventory.

The kits need no inventory, we’re trying to track the amount of fabric they require, and we have the math ready to go. We can use Flow to notice an order, but we are told we need a third-party “listener” like Cloudflare Workers, etc. to actually trigger the calculation to deduct inventory. This seems like an extra step we’d like to avoid – I want to believe we aren’t the first people to need to track variant calculations in this manner.

I welcome any recommendations for how to proceed here. Many thanks in advance for your help.

Hey @James_Keepnews I don’t have a solution but thought I’d share this in case you haven’t seen it. Note the limitations of Plus plan requirements (at the time of article published)
Shopify Academy -Selling fractional quantities

RE inspo - This app has an interesting approach and generate variants.
IzyUnit: Price Per Unit | Shopify App Store

Meanwhile I now spot 2 apps that cater to fractional inventory management
Ecommerce Plugins for Online Stores – Shopify App Store

:eyes:Keen to get others input too so following this thread

Turns out, Shopify Flow and Cloudflare Workers work very well together and my use case is a pretty standard implementation of both, so that’s the solution. I get triggered whenever I see the word “Cloudflare”: the service interrupts more web experiences than it probably should, but my use is well behind the scenes.

That’s great to hear. Have you had the chance to test on a simulated or paid plan - or no known blockers as you’ll be leveraging Plus? Would be good to know

I have it running in a dev sandbox. No known blockers – uncomfortable as I was to introduce Cloudflare Workers as part of my solution, Shopify Flow and CW play very well together and, as it turns out, the way I’m using them is a pretty standard implementation of both.