Rank cancelled Direct Debit mandates by revenue at risk
Every weekday, find the Direct Debits that died overnight, work out what each lost payer was worth, and post a ranked win-back list to Slack.
Every weekday at 8am, check GoCardless for Direct Debit mandates that stopped being collectable in the last 24 hours, work out how much recurring revenue each lost payer represents, and post one prioritized digest to my finance Slack channel.
To find the cancellations, use GoCardless List Events filtered to the mandates resource type with the cancelled and expired actions, and a created_at[gt] filter set to 24 hours before the run. Use the events rather than only listing mandates by status, because a mandate's own created_at is the date it was originally set up, not the date it died, so a date filter on List Mandates would miss a mandate that was signed three years ago and cancelled last night. The event carries the cancellation timestamp and the underlying reason or cause, which I want in the digest. For each mandate id that comes back, call Get Mandate to confirm it is genuinely still cancelled or expired right now and to read the linked customer id. If the events lookup returns nothing at all, cross-check with List Mandates filtered by status cancelled and status expired before concluding it was a quiet day.
For each dead mandate, pull the payer with Get Customer, and their payment history with List Payments filtered to that customer id. Look at the payments that actually succeeded, not the failed or pending ones, since I want to know what this person has really paid me rather than what was attempted.
All GoCardless amounts are integers in the smallest currency unit, so pence or cents. Divide by 100 before showing any money figure in the digest or writing it to the sheet, and keep the currency code alongside it. Do not mix currencies into a single total; if payers span more than one currency, rank within each currency and label the amounts clearly.
Estimate the annual value at risk for each payer from their historical collection amount and cadence. Work out the typical successful collection amount and how regularly the collections came in, for example roughly monthly, quarterly, or annually, then project that forward across a year. A payer on 200 a month is a far bigger loss than a payer on 200 a year, so the cadence matters as much as the amount. Where the history is too thin or too irregular to project honestly, say so instead of inventing a confident number, and fall back to the total they have paid to date as the context figure. Also note how long they had been paying, since a long-standing payer walking away is worth flagging differently from someone who cancelled after one collection.
Rank the cancellations by estimated annual value at risk, highest first. Split them into the high value payers who justify a personal call from someone on my team, and the smaller ones where the sensible next step is just sending a re-signup link. Use the size of the projected annual loss to make that split, and mention the boundary you applied so I can argue with it.
Post the result as a single message to my finance channel using the Slack Bot Send a Message action. One message, not one per payer. Open with the headline number, being how many payers were lost and the total annual value at risk, then list each lost payer in ranked order with their name, the cancellation reason, the estimated annual value at risk, how long they had been paying, and a specific recommended next step. Group the personal-call payers above the re-signup-link ones so the expensive problems are read first.
Then append one row per cancelled mandate to my churn tracker spreadsheet using the Google Sheets Append Values action, so the trend builds up over time. Each row should carry the cancellation date, customer name, customer email, mandate id, cancellation reason, total paid to date, estimated annual value at risk, currency, and the recommended next step. Match the column order already in the sheet.
Two hard rules. Never reinstate a mandate and never create a new one, even though the Reinstate Mandate and Create Mandate actions exist. A customer who cancelled at their bank has to authorise a fresh Direct Debit themselves, so anything I do from this side will not hold. This workflow reports and recommends only, and every action it takes on GoCardless must be read-only. Second, if there were no cancellations in the window, stay quiet: do not post an empty digest, do not post a nothing-to-report message, and do not write anything to the spreadsheet.
What does this prompt do?
- Checks every weekday morning for Direct Debit mandates that were cancelled or expired in the last 24 hours
- Looks up each lost payer and their full payment history to estimate the annual revenue you are about to lose
- Posts a single ranked digest to your finance channel, separating high value payers worth a personal call from small ones that only need a re-signup link
- Adds one row per cancellation to a churn tracker spreadsheet so you can watch the trend build over time
- Stays completely silent on days when nothing was cancelled
What do I need to use this?
- A GoCardless account collecting Direct Debit payments
- A Slack workspace and the channel where your finance updates go
- A Google Sheets spreadsheet to use as the churn tracker, with a header row ready
- A rough idea of what counts as a high value payer for your business, so the digest can split the list sensibly
How can I customize it?
- Change the timing, for example run it every morning including weekends, or twice a day if cancellations are costly to miss
- Move the threshold that separates a payer worth a personal call from one that only needs a re-signup link
- Point the digest at a different channel, or send it as a direct message instead
- Add your own columns to the churn tracker, such as sector, account owner, or whether the payer was won back
FAQs
Will this cancel or restart anyone's Direct Debit?
What happens on a day with no cancellations?
How does it work out what a lost payer was worth?
Why does a mandate expire rather than get cancelled?
Can I use this if my team is on Microsoft Teams instead of Slack?
Related templates
Stop buying stale lists. Reps run a saved search, work the results like an inbox, and only the accounts they approve ever reach your CRM.
See how your brand's news coverage and sentiment stack up against four competitors, then let an assistant write the weekly report for you.
One screen showing every social post waiting on approval, sorted by deadline, so reviewers can approve or reject without leaving the page.
Every Monday, find the past champions and closed-won contacts who changed jobs, update Attio, and get the moves worth chasing in Slack.
Staff submit what happened, your social manager edits the copy, picks the accounts and puts it on the calendar without a single spreadsheet.
Drag creators through Sourced to Wrapped on a board grouped by campaign, with audience stats on every card and a one-click brief for each creator.
Know what a cancelled Direct Debit is really costing you.
Get a ranked list of the payers you just lost, and who is worth picking up the phone for, before the missing revenue shows up in next month's numbers.