Getting that decision wrong has a real cost. A missed alert lets a customer consume well beyond what they are entitled to. A premature alert interrupts someone who should still have access. And if the signals aren't reliable, customers and the teams running the product quickly lose confidence in the system.
That makes usage alerts a very different engineering problem from conventional alerts or notifications. The tricky part is making sure the number being compared is the right one, at the right moment, for the right customer, as usage, subscriptions, entitlements, pricing, and balances are all changing underneath it. Usage can arrive late or out of order. A subscription can renew while events from the previous term are still arriving. A credit balance can fall with usage and rise again with a top-up. And for spend alerts, the same amount of usage can mean different things depending on the pricing model.
So the system isn't just comparing a number to a cutoff. It's working with live billing state: the same aggregates, entitlements, and pricing logic that the invoice will use. The alert has to factor these and get it right, and it has to fire the webhook within seconds of the event.
That left us with a choice: build usage alerting as a separate system with its own representation of the billing state, or evaluate alerts against the billing state we already had. We chose the latter.



