Tag a customer after x no of subricptions are passed or customer purchased certain amount

Would love to start a campaign for all the customers who have an active subscription for more than X months or for all the customers who have purchased more than a certain dollar amount. How can I do that?