I like use tags for that, you can use the webhook yo subscribe to order topic and tag the user, other alternative is a CRON job that process our orders and tagging the users, in any case, you need write some code or external apps for that.
@fbd that is perfect! You are posting inside the Shopify APIs and SDKs, thats is not a liquid based solution, is a app based solution, you can check the guide to build it.
Lets me explain, in Shopify you cat get subscribed to some event is dispatched in the Shopify backend with Webhooks (check the order/paid event topic for your case) in that moment that receipt a notification, you can check the line_orders of the order details with data that are in the same notification, with your rules to determine if you need to update the customer data with the Admin API.
Other option that i commented, for do the same, is collect all orders data periodically (with a CRON) to check the line_items to determine if you need to update the customer data.
Note: every buyer is a customer in Shopify, if purchase as guest, is a non-registered customer identified by the email at moment of the purchase, and you can add notes, tags, metafields..etc
Ok. In my store i want to do something like this: when customer buys 5 articles, he gets +50 points. If he buys 10 articles, he gets +100 points again.