Skip to content

On a schedule

Fill in next steps on open opportunities

Open opportunities with an empty Next Step get a suggested one written in, and you get the list.

Runs
On a schedule
Apps
Salesforce
AI
Yes, uses the built-in AI allowance
Access
api (read+write)

Send this to your assistant

Create a ClickRuntime automation: every weekday at 10am, find open Salesforce opportunities with no Next Step, suggest one based on each opportunity's details, write it into the Next Step field and email me what was filled in.

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

Open the opportunity list in most Salesforce orgs and a quarter of the records have an empty Next Step field. Reps update the stage and move on, so the one field that says what happens next is blank. Managers ask 'what is the plan here?' in every pipeline review, and the answer is reconstructed from memory. Deals with no defined next step are the ones that drift for weeks, because nobody has committed to a specific action or date.

On its schedule the automation finds open opportunities where NextStep is null, gives ClickRuntime's built-in AI the stage, amount, account and recent context, and has it propose a concrete next step. The suggestion is written to the NextStep field and a summary email lists what was filled in. It is meant as a starting point for the rep to confirm. Sales managers use it to make sure every deal carries a stated action.

What you get out of it

  • No open deal without a stated action

    Every opportunity gets a Next Step value, which makes pipeline reviews faster. The conversation moves from 'what is happening here?' to 'is this the right step?', saving minutes on every deal discussed.

  • Reps get a prompt, not a blank box

    Blank fields stay blank because writing a good next step takes thought. A draft suggestion lowers the effort to a quick edit, so more records end up with accurate, specific text.

  • Stalled deals become visible

    The summary email lists which opportunities lacked a next step, which is often the same set that has stalled. A manager gets a ready-made list of deals needing attention without building a report.

  • Suggestions follow the deal's stage

    A Proposal-stage deal gets a follow-up on pricing, while a Discovery-stage one gets a scoping call. Stage-appropriate suggestions keep the text relevant rather than generic, so reps trust it enough to keep it.

  • Forecast calls rely on real information

    When Next Step is populated, forecast conversations can test whether a commit is backed by a plan. That reduces optimistic calls that have nothing behind them except hope. A commit of $200,000 with a blank Next Step is easy to question in the room.

How it works

What happens, step by step

  1. Every weekday at 10 am, the automation finds open Salesforce opportunities with an empty Next Step.

  2. AI reads each opportunity's details and suggests one practical next step.

  3. The suggestion is written into the Next Step field.

  4. You get an email listing the opportunities and the next step added to each.

Before it runs live

  • Connect Salesforce

What you get

RunsOn a schedule
Fill in next steps on open opportunitiestoday, 9:00Succeeded
Email · Next steps filled on 4 opportunities• Northwind – Renewal: Book pricing review with their finance lead this week

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 Slack
  • Combine it with other Salesforce 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.
suggest_next_steps_for_stalled_opportunities.pyexample
from clickruntime import on_trigger, credentials, http, ai, notify

API = "https://yourcompany.my.salesforce.com/services/data/v61.0"

@on_trigger
def run(event):
    headers = {"Authorization": f"Bearer {credentials.connection('salesforce', 'work')}"}
    opps = http.get(f"{API}/query", headers=headers, params={"q":
        "SELECT Id, Name, StageName, Amount, CloseDate, Description, Account.Name FROM Opportunity "
        "WHERE IsClosed = false AND NextStep = null LIMIT 25"}).json()["records"]
    filled = []
    for o in opps:
        step = ai.generate(f"{o['Name']} ({o['Account']['Name'] if o.get('Account') else ''}), stage {o['StageName']}, "
                           f"amount {o['Amount']}, close {o['CloseDate']}.\n{(o.get('Description') or '')[:1500]}",
                           system="Suggest one concrete next step for this sales opportunity, under 15 words.",
                           max_output_tokens=40).text.strip()[:255]
        http.patch(f"{API}/sobjects/Opportunity/{o['Id']}", headers=headers, json={"NextStep": step}).raise_for_status()
        filled.append(f"• {o['Name']}: {step}")
    if filled:
        notify.email_me(f"Next steps filled on {len(filled)} opportunities", "\n".join(filled))
    return {"filled": len(filled)}

FAQ

Common questions

Will it replace Next Step text a rep already wrote?
No. It targets opportunities where NextStep is empty, so anything a rep has written is left alone. Only blank fields receive a suggestion, and the summary email shows each one that was added. If a rep types something later, the next run sees a filled field and skips it.
What information does the AI use to write the suggestion?
It uses the fields the query retrieves, typically stage, amount, account name, close date and last activity. The more of these you include, the more specific the suggested next step. It does not see anything outside what the automation fetches.
Does it only look at opportunities that have stalled?
The condition is an empty NextStep on open opportunities, which is a good proxy. You can add a condition such as no activity in 14 days or a minimum amount if you want to focus on genuinely stuck deals.
What permissions does it need?
api (read+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 (on a schedule). 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 “Fill in next steps on open opportunities” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.