How can I set a global quantity for a product with multiple variants?

I have a product with multiple variants. I can only sell 10 of this product. I have 4 different variants for the product. Instead of having a quantity of 10 for each variant, which would have a total of 40 in stock, how do I set it so that only 10 total products can be sold regardless of the variant?

Thanks

Hi @kbaxter88 ,

So you need to ensure that the combined sales of all variants do not exceed 10, however, Shopify does not have a built-in feature to manage this directly. You can do it using third-party apps or custom scripts. The later method is more complicated and requires technical knowledge.

Thank you for your response!