Only V5 has a feature for creating Inventory Products which consume Inventory Items, and very flexible mappings for Order Tags within the Recipes.
When an Inventory Product is used in a Recipe for a Menu Item Product, the “ingredients” for the Inventory Product are consumed when you sell that Menu Item.