I have a data extension setup with the following columns:
CouponCode | EmailAddress | IsClaimed | CustomerID
This code then claims the vouchers by writing CustomerID/Email Address next to the Coupon Code, and changing IsClaimed to True.
set @couponCode = ClaimRowValue("welcomeVoucher","CouponCode","IsClaimed","None Available","CustomerID",@CustomerID)
My question is if i can somehow (automation studio?) get an email notification when the amount of "free" vouchers (IsClaimed = False) is less than a certain threshold, say 2000?
One of the ideas that i had was to have an email fire every day, but raiseError() if the amount of rows with isClaimed is less than x - I'm not too sure this would work, though.