Skip to product information
1 of 1
Published:2023.12.22Last updated:2025.03.30

Example of setting up a metafield to hold the purchase history of a specific product for each customer using Shopify Flow

Example of setting up a metafield to hold the purchase history of a specific product for each customer using Shopify Flow

Applications

  • Member information management and editing

How to implement

  • Shopify Flow
View full details

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


After making a purchase (all items are ¥0), you will be able to view the sample code.

If you have already made a purchase, please login here.

Sample Codes

Test Theme :Dawn/Rise 15.2.0

Added a flow that counts up the metafield value according to the number of items purchased in the order information.

Related Post