Weekly
Get 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.
- Runs
- Weekly
- Apps
- Salesforce, Slack
- AI
- Optional
- Access
- api read; chat:write
Send this to your assistant
Create a ClickRuntime automation: every Friday, check open Salesforce opportunities for a discount over 20%, no next step, no amount, or a missing or past close date, and post the problems in #sales grouped by owner.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A sales manager's forecast is only as good as the data behind it. Close dates from last month, deals with no amount, a 35% discount nobody approved: each is small, but together they make the pipeline report unreliable, and the manager ends up checking deals one by one before every forecast call.
This automation does that check every Friday against a short list of rules and posts what it finds to Slack, grouped by owner, so reps can tidy their deals before Monday's forecast.
What you get out of it
A forecast you can trust
Missing amounts and stale close dates are fixed weekly, not discovered on the call.
Discount policy is visible
Deals above your discount limit are flagged every week, so approvals happen before the quote goes out.
Reps fix their own deals
Each owner sees their own list with links, so the manager isn't chasing individual records.
Rules are plain and consistent
Every deal is checked the same way, every week, with no judgement calls.
How it works
What happens, step by step
Every Friday the automation reads your open opportunities in Salesforce.
It checks each deal against your rules: discount limit, next step, amount and close date.
Deals with problems are grouped by owner.
Each owner's list is posted to #sales, with what's wrong and a link to each deal.
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 collections import defaultdict
from datetime import date
from clickruntime import on_trigger, credentials, http, 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"]
MAX_DISCOUNT = 20 # percent
@on_trigger
def run(event):
headers = {"Authorization": f"Bearer {credentials.connection('salesforce', 'work')}"}
opps = soql(headers, "SELECT Id, Name, Owner.Name, CloseDate, NextStep, Amount, Discount__c FROM Opportunity "
"WHERE IsClosed = false LIMIT 500")
by_owner = defaultdict(list)
for o in opps:
issues = []
if (o["Discount__c"] or 0) > MAX_DISCOUNT:
issues.append(f"discount {o['Discount__c']}%")
if not o["NextStep"]:
issues.append("no next step")
if not o["CloseDate"] or o["CloseDate"] < date.today().isoformat():
issues.append("close date missing or in the past")
if not o["Amount"]:
issues.append("no amount")
if issues:
by_owner[o["Owner"]["Name"]].append(f"- <{INSTANCE}/{o['Id']}|{o['Name']}>: {', '.join(issues)}")
for owner, lines in by_owner.items():
notify.slack(f"*{owner}*: {len(lines)} deals to tidy before Monday\n" + "\n".join(lines), channel="#sales")
return {"checked": len(opps), "flagged": sum(len(v) for v in by_owner.values())}FAQ
Common questions
Where does the discount come from?
Can I add my own rules?
Can it check free-text fields such as the next step?
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 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 worksSpot risky renewals 90 days out
Every Monday, customer success sees which accounts renewing in the next 90 days show warning signs, and why.
See how it worksHear 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 worksKeep exploring
Set up “Get a Friday list of deals that break your sales rules” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.