In relation to the setting to record the purchase quantity of a specific product in a tag using Shopify Flow , if the order in question is canceled, we would like the purchase quantity in the tag to be decremented as well, so this is the Flow setting for that purpose.
An example of using Shopify Flow to record the number of purchases of a specific product in a customer tag, and to subtract the number of purchases from the customer tag if the product is canceled.

[Setup method 1] Set up a Flow that adds a tag when the target product is included in the order cancellation trigger (Step 1: Determine whether the target product is included in the order data to be canceled)

[Setup Method 2] Set up a Flow to add a tag when the target product is included in the trigger for order cancellation (Part 2: Add the number after cancellation as a tag & wait 10 seconds)

[Setup Method 3] Set up a Flow that adds a tag when the target product is included in the trigger for order cancellation (Step 3: Delete the previous purchase tag if there is one)

