hcb
hcb copied to clipboard
[Spending Limit] Add warning email when balance is getting low
Send an email to the user when their spending limit is getting low. Something along the lines of:
hi, your Hack Club HQ spending controls balance is getting low. Your current balance is $23.
To top up your balance, please ask your manager to create an allowance here (link to their spending control page).
I'm not exactly sure what the threshold should be.
10% of maximum balance?
"max balance" as in calculate the running balance and then get the maximum of those values?
yeah, that can work. I'd suggest
historic_max_balance_cents = # as described above
threshold = [historic_max_balance_cents, 25_00].max
"max balance" as in calculate the running balance and then get the maximum of those values?
yep
Cool!!
historic_max_balance_cents = # as described above threshold = [historic_max_balance_cents, 25_00].max
Let's go with this!