Limit Shopify Discount To Once A Month Per Customer Using Flow

Howdy! Is there a way to limit a Shopify discount code to being used once a month per customer? Here is my current setup:

  • Customer signs up for a VIP membership.
  • Shopify Flow assigns the customer a tag.
  • Shopify customer segments assigns customers based on their tags (we have multiple VIP membership programs with different benefits).
  • Shopify discount codes work only with a specific segment
  • Customer drops from a VIP membership program, Flow removes the customer tag.

All is well and the codes work great, except that customers can use the same code repeatedly each month. We would like some of these discount codes to be limited to once a month, but that’s not something natively built into Shopify it seems.

Flow can check when an order is placed to see if a discount code was used and then add a customer tag which would work great, but Flow cannot remove that tag at the first of the month. It can only remove the tag after X number of minutes/hours/days from the order being placed. So that doesn’t work.

Flow can also run on its own at the first of the month, but the “For Each Loop” iterate does not have an option to go through customers. Meaning we can’t say “for each customer, remove tag XYZ if it exists”. Flow does have a “remove customer tag” option, but it doesn’t work with the “Scheduled to run” trigger, specifically stating the “remove customer tag” command has to stem from a customer being selected first.

I’m not quite smart enough to go and start custom coding my own things. I’m hoping someone here has an idea without me needing to dive into coding classes. I’m looking to avoid anything manual. I could of course just delete the discount code every first of the month and recreate it, with the limit of one use per customer toggled, but don’t want to do that if I can help it.

Thank you ahead of time for anyone that has an idea a dummy like me can implement easily!

Cheers!