On a schedule
Find open deals with a past close date
Each weekday you see the open opportunities whose close date has passed, grouped by owner.
- Runs
- On a schedule
- Apps
- Salesforce
- AI
- Not needed
- Access
- api (read)
Send this to your assistant
Create a ClickRuntime automation: every weekday at 8am, email me open Salesforce opportunities with a close date in the past, grouped by owner.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Open opportunities with a close date in the past are one of the most common data-quality problems in Salesforce. A rep forgets to move a date after the buyer pushes the decision, and the deal now claims it should have closed three weeks ago. Forecast reports count it in the wrong period, weighted pipeline is overstated, and the quarter's number looks healthier than it is. Managers usually find these records only when someone builds a custom report, long after the damage is done.
On its schedule, the automation queries Salesforce for open opportunities whose CloseDate is earlier than today, groups them by owner, and emails you the list. Each rep's overdue deals appear together with amount and stage so you know who to ask. It runs without anyone opening a report. Sales managers and RevOps teams use it to keep forecast dates honest before the weekly review.
What you get out of it
Forecast numbers stay believable
Deals with stale dates are surfaced before they distort period totals. Leadership then presents a forecast built on realistic close dates instead of one inflated by deals that quietly slipped.
Each rep sees only their own mess
Grouping by owner makes follow-up simple: forward the relevant section to each rep. Nobody has to filter a 200-row report to find which of the overdue deals belong to them.
Dead deals get closed out
Some overdue opportunities are really lost. A regular list prompts reps to mark them Closed Lost, which cleans the pipeline and makes win-rate figures accurate for the next planning cycle.
Slipping deals trigger a conversation
A date that has passed is often the first sign of trouble. Seeing it in an email lets a manager ask what changed with the buyer while there is still time to rescue the deal.
A habit of pipeline hygiene forms
Reps learn that stale dates are noticed every week. Over a few cycles the list gets shorter, and the team keeps CRM data current without a separate cleanup project. A rep with five overdue deals on Monday usually has one by the third week.
How it works
What happens, step by step
Every weekday at 8 am, ClickRuntime finds open Salesforce opportunities whose close date has already passed.
It groups them by owner.
You get an email listing each owner's opportunities with their stage, amount and original close date.
Before it runs live
- Connect Salesforce
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
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Salesforce steps into one automation
Under the hood
The code that runs this automation
from collections import defaultdict
from clickruntime import on_trigger, credentials, http, notify
API = "https://yourcompany.my.salesforce.com/services/data/v61.0"
@on_trigger
def run(event):
opps = http.get(f"{API}/query", headers={"Authorization": f"Bearer {credentials.connection('salesforce', 'work')}"},
params={"q": "SELECT Name, Amount, CloseDate, StageName, Owner.Name FROM Opportunity "
"WHERE IsClosed = false AND CloseDate < TODAY ORDER BY CloseDate"}).json()["records"]
if not opps:
return {"past_due": 0}
by_owner = defaultdict(list)
for o in opps:
by_owner[o["Owner"]["Name"]].append(f" - {o['Name']} · {o['StageName']} · ${o['Amount'] or 0:,.0f} · was due {o['CloseDate']}")
notify.email_me(f"{len(opps)} opportunities past their close date",
"\n\n".join(f"{owner}\n" + "\n".join(items) for owner, items in sorted(by_owner.items())))
return {"past_due": len(opps)}FAQ
Common questions
What counts as an open opportunity here?
Can I get the list only on Mondays?
Does it change any dates in Salesforce?
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
Get a weekly report of duplicate leads
Each week you get the groups of leads that share an email address, ready for you to merge.
See how it worksBack up your Salesforce records every week
A CSV copy of your accounts, contacts and opportunities is sent to you every week.
See how it worksFill in next steps on open opportunities
Open opportunities with an empty Next Step get a suggested one written in, and you get the list.
See how it worksKeep exploring
Set up “Find open deals with a past close date” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.