Weekly
Spot risky renewals 90 days out
Every Monday, customer success sees which accounts renewing in the next 90 days show warning signs, and why.
- Runs
- Weekly
- Apps
- Salesforce, Slack
- AI
- Yes, uses the built-in AI allowance
- Access
- api; chat:write
Send this to your assistant
Create a ClickRuntime automation: every Monday, list Salesforce accounts renewing in the next 90 days, flag the ones at risk based on open cases, activity and notes, and post them to #customer-success.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
For a subscription business, a lost renewal usually starts months earlier: a run of support cases, a champion who stopped replying, a note that the customer is reviewing vendors. The signs are all in Salesforce, but spread across cases, activities and account notes, and nobody reads them together until the renewal call.
This automation reviews every account renewing in the next 90 days each Monday and posts the ones that look at risk to #customer-success, with a one-line reason. The team has three months to act instead of three days.
What you get out of it
Time to save the account
Ninety days is enough to run a health check, bring in an executive sponsor or fix the open issues.
Signals read together
Open cases, last activity and account notes are weighed together rather than in separate reports.
A reason for every flag
Each account comes with why it was flagged, so the CSM knows what to raise first.
One weekly list
A single Monday post keeps renewals on the agenda without a dashboard someone has to remember to open.
How it works
What happens, step by step
Every Monday the automation finds accounts renewing in the next 90 days.
It gathers each account's open cases, last activity and notes.
AI reads them together and flags the accounts that show churn risk, with a reason for each.
The flagged accounts are posted to #customer-success with links to Salesforce.
Before it runs live
- Connect Salesforce
- Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Google Sheets
- Combine it with other Salesforce and Slack steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, credentials, http, ai, notify
INSTANCE = "https://yourcompany.my.salesforce.com"
API = f"{INSTANCE}/services/data/v61.0"
def soql(headers, q):
return http.get(f"{API}/query", headers=headers, params={"q": q}).json()["records"]
SCHEMA = {"type": "object", "properties": {"risky": {"type": "array", "items": {"type": "object", "properties": {
"n": {"type": "integer"}, "reason": {"type": "string"}}, "required": ["n", "reason"]}}}, "required": ["risky"]}
@on_trigger
def run(event):
headers = {"Authorization": f"Bearer {credentials.connection('salesforce', 'work')}"}
accounts = soql(headers, "SELECT Id, Name, Renewal_Date__c, LastActivityDate, Description, "
"(SELECT Subject, Priority FROM Cases WHERE IsClosed = false LIMIT 5) FROM Account "
"WHERE Renewal_Date__c = NEXT_N_DAYS:90 ORDER BY Renewal_Date__c LIMIT 80")
if not accounts:
return {"renewals": 0}
lines = [f"{i + 1}. {a['Name']} renews {a['Renewal_Date__c']}, last activity {a['LastActivityDate'] or 'never'}, "
f"open cases: {[c['Subject'] + ' (' + c['Priority'] + ')' for c in (a.get('Cases') or {}).get('records', [])]}, "
f"notes: {(a['Description'] or '')[:200]}" for i, a in enumerate(accounts)]
risky = ai.generate("Which of these renewing accounts show churn risk? Give the number and a one-line reason.\n"
+ "\n".join(lines), json_schema=SCHEMA, max_output_tokens=1200).json["risky"]
if risky:
text = "\n".join(f"- <{INSTANCE}/{accounts[r['n'] - 1]['Id']}|{accounts[r['n'] - 1]['Name']}> "
f"(renews {accounts[r['n'] - 1]['Renewal_Date__c']}): {r['reason']}" for r in risky)
notify.slack(f"Renewals in the next 90 days that look at risk ({len(risky)} of {len(accounts)}):\n{text}",
channel="#customer-success")
return {"renewals": len(accounts), "risky": len(risky)}FAQ
Common questions
Which field holds the renewal date?
What does the AI look at?
Does it post healthy accounts too?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Hear when a big deal starts looking risky
Each day your large Salesforce deals get a risk score, and the owner gets a Slack message when one jumps, with the reason.
See how it worksGet a morning list of deals that have gone quiet
Each weekday, every rep sees which of their Salesforce deals haven't moved in two weeks, with a suggested next step for each.
See how it worksGet a Friday list of deals that break your sales rules
Every Friday, each rep sees which of their open deals have missing fields, an out-of-date close date or a discount over your limit.
See how it worksKeep exploring
Set up “Spot risky renewals 90 days out” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.