You may want to provide a gift to customers who purchase a certain number of specific products on Shopify. To do this, you need to know the number of purchases of a specific product for each customer. However, you can also store the number of purchases in a customer meta field in Shopify Flow and refer to it from elsewhere, without tallying up the number of purchases.
Example of setting up a metafield to hold the purchase history of a specific product for each customer using Shopify Flow

[Settings Step 1] Create a metafield to count the number of purchases of a specific product

[Settings Step 2] Add a flow that counts up the metafield value according to the number of items purchased in the order information

