Skip to content

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.

Paste it into your assistant. It tells you what it will send or change before it runs live.

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

  1. Every Monday the automation finds accounts renewing in the next 90 days.

  2. It gathers each account's open cases, last activity and notes.

  3. AI reads them together and flags the accounts that show churn risk, with a reason for each.

  4. 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

RunsWeekly
Spot risky renewals 90 days outtoday, 9:00Succeeded
Slack · #customer-successRenewals in the next 90 days that look at risk (2 of 14): - Contoso Retail (renews 2027-01-09): two high-priority cases open and no contact in 7 weeks

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
renewal_risk_alerts.pyexample
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?
A date field on the Account, called Renewal_Date__c in the example. If your renewal date is on contracts or opportunities, ask your AI assistant to read it from there.
What does the AI look at?
The renewal date, last activity date, up to five open cases with their priority, and the account description. You can add fields such as usage or NPS if you keep them in Salesforce.
Does it post healthy accounts too?
No, only the ones it flags, with a count of how many were checked.
What permissions does it need?
api; chat:write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it runs (weekly). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

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.