Following on from my last post, this is about using Shopify Flow to record the purchase history of a specific product. If a purchase is canceled, I want to decrement the purchase history of the metafield that was counted up, so this is the flow for that purpose.
Example of setting up a metafield to store the purchase quantity of a specific product for each customer using Shopify Flow ② "Restore the purchase quantity history if the order is canceled"

[Setup Procedure] Add a Flow that counts down the metafield value according to the number of items purchased when an order is canceled.

![[Dawn] Example of setting up a metafield to store the purchase quantity of a specific product for each customer using Shopify Flow ② "If an order is canceled, restore the purchase quantity history"](http://store-dojo.com/cdn/shop/files/2023-12-23.png?v=1743306995&width=1445)