Subscriptions
Email alerts for a spike in subscription cancellations
Count yesterday’s cancellations in BigQuery, pick a threshold from your own history, and email your customer success lead when it’s worth a look.
An unusual day of cancellations
Illustration · scheduled checks every 12 or 24 hours
A few cancellations a day can be normal. A sudden jump can point to a billing failure, a broken feature, or a price change that landed badly. This guide counts yesterday’s cancellations in BigQuery and emails your customer success lead when the number is high enough to look into.
1. Decide what counts as a cancellation
The example assumes a subscription_events table with one row per event, an event_type, a TIMESTAMP occurred_at, and a customer_id. Before you count, decide what you mean. Is a cancellation at the end of the billing period the same as an immediate one? Should failed-payment cancellations count, or do you track those separately?
SELECT COUNT(DISTINCT customer_id) AS cancellations
FROM `your-project.billing.subscription_events`
WHERE event_type = 'cancellation_requested'
AND DATE(occurred_at, 'UTC') = DATE_SUB(CURRENT_DATE('UTC'), INTERVAL 1 DAY)COUNT(DISTINCT customer_id) counts a customer who cancels two subscriptions once. Use COUNT(*) if each subscription matters more than each customer. The query covers the previous complete day in UTC; use the timezone your team reports in.
2. Pick a threshold from your own history
Look at the last eight weeks in the BigQuery console before you choose a number:
SELECT DATE(occurred_at, 'UTC') AS day,
COUNT(DISTINCT customer_id) AS cancellations
FROM `your-project.billing.subscription_events`
WHERE event_type = 'cancellation_requested'
AND occurred_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 56 DAY)
GROUP BY day
ORDER BY dayRun this one in BigQuery, not in Kisu. Kisu would add up all the rows into one number. If a normal day has 4 to 9 cancellations, a threshold of greater than 12 flags the unusual days without firing every week. This is a fixed count, not a share of active subscribers, so revisit it as you grow.
3. Send it to the right inbox
In Kisu, open Configuration → Notification destinations and add an Email destination. It starts with your account email. Keep it, or enter the address of the person who will contact customers. Each email destination has one recipient, not a list, CC, or BCC. If several people need the alert, use a group or shared inbox address.
Click Send test, then check the inbox, including spam. An alert that lands in spam is as good as no alert, so make sure the test arrives before you rely on it.
Create a BigQuery alert with the daily query, select cancellations, choose Sum, and set greater than 12. Pick Every 24 hours, set Starting at after your events land, and choose the email destination under Notify via. Name it “Cancellations above 12 yesterday”.
4. What to check when it fires
The email shows the count, the condition, and when the check ran. It doesn’t list customers or include your query. Start by grouping yesterday’s cancellations by plan, reason, and payment status. Look for failed payments, a recent release, or a pricing email that went out. If failed payments are the cause, a separate failed payment alert can catch them earlier.
Kisu checks every 12 or 24 hours, not in real time. Enter your preferred time under Starting at, using the timezone shown beside the input. Change it in Settings from your email menu. With a 12-hour schedule, you’ll get a second check 12 hours later. New alerts use Just when the issue starts, so one ongoing problem won’t keep sending messages. Want reminders? Choose As long as the issue persists for a notification on every successful matching check. When the condition no longer matches, the incident resolves without a recovery message.
After a check, open History and look at three things: the number, whether the condition matched, and whether the notification was delivered. A failed check or no-data result does not send a threshold notification or resolve an open incident. You can review completed checks and delivery history for 30 days.


3. Queue an email