StudioCLIMCPDocsGuidesPricing
Sign inGet Started

Automate the judgment calls.

Product

  • Workflow Studio
  • kovca CLI
  • MCP server
  • AI Nodes
  • Pricing

Developers

  • Getting started
  • Workflows API
  • Guides
  • Errors and limits

Company

  • About
  • Security
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
© Kovca. kovca.io
GuidesOperations

Qualify new Salesforce leads

Build a Kovca workflow that starts when a Salesforce lead is created, classifies it, and creates a follow-up task only when the recommended action is a follow-up.

Lead Intelligence14 min readcURL
InputLead textLead Intellig…Follow up?Task subjectTask noteCreate taskOutput
TemplateSalesforce lead qualificationStart from a new Salesforce lead, classify it, and create a follow-up task when the recommended action is a follow-up.
8 nodesUp to 1 evaluation per run
Use this template

New Salesforce leads mix ready buyers, researchers, support questions, and vendor noise. Someone sorts them by hand before a follow-up task is created. Good leads wait, and junk still gets a call.

This guide builds a workflow that starts when a lead is created, classifies the text the event actually carries, and creates a Salesforce task on that lead only when the recommended action is a follow-up. A researcher, a support question, or a message that is not a sales inquiry does not get that task. You'll start from a template, test it, and activate it on the Salesforce account.

The template already uses the Salesforce New lead trigger and Create task. It does not store a Salesforce account. You choose the account when you activate. Until then the draft saves, and Studio tests simulate Create task.

The New lead sample carries lead_id, name, and lead. Inside lead, the sample has id, name, and created_date. Company, email, phone, and an inquiry are not in that sample, so this template does not map them. Lead Intelligence reads a message built from the name, the lead id, and that lead object. A name is not a buying message. A test of the sample often comes back request_information or manual_review, and no task is created. That is the limit of this event.

If the inquiry, the company, and the timeline arrive on a form, and you want a territory and an owner written to your own system, use Qualify inbound leads and route them to the right sales team. This guide is the one that starts from a lead that already exists in Salesforce.

If a person can work a short lead queue, Salesforce assignment rules and a queue are less machinery than this. The workflow is for the org where new leads sit until someone has time to decide who gets a call.

What you'll build

The finished Salesforce lead workflow on the Studio canvasSalesforce New lead, Lead text, Lead Intelligence, then a switch into Task subject, Task note, and Create task.

StepNodeWhat it does
InputSalesforce: New lead (salesforce/new_lead)Starts the workflow. The event fields are lead_id, name, and lead.
Lead textTextBuilds the message from the name, the lead id, and the lead object.
Lead IntelligenceDecision AIClassifies that message. Returns qualification, recommended_action, and missing_information.
Follow up?Switchfollowup when recommended_action is prioritize_followup or standard_followup. Everything else is default.
Task subjectTextOn the follow-up branch. The task subject, from the name.
Task noteTextThe task description, from the lead id and the classification.
Create taskSalesforce Create task (action:salesforce/create_task@1)Creates the task on the lead. Sent once.
OutputOutputReturns the classification, the route, and whether the task was created.

The default branch goes straight to Output. A lead that is not a follow-up does not get a task. Salesforce also has New or updated opportunity. This workflow does not use it, and it does not update an opportunity.

Create contact is a separate Salesforce action. This template does not use it. The lead already exists, and Create contact needs a last name. The event's name is one string. The sample lead object does not include a last name, an email, or an account id.

Build it in the Studio

1Start from the template

Click Use this template above, or open Salesforce lead qualification in Workflows.

The draft opens on the canvas. The components library is on the left. Triggers, AI, Action in an app, Data transformation, Flow, Core, and Human review are the groups. Salesforce is under Triggers and under Action in an app.

The Studio component library, with Triggers, AI, and Action in an appThe library home. Salesforce is inside Triggers and Action in an app.

Salesforce triggers in the Studio, including New leadNew lead is one Salesforce trigger, next to New or updated opportunity.

Actions in the Studio, including Salesforce Create taskSalesforce's actions include Create lead, Create contact, Create task, and Update opportunity.

The Studio with the Salesforce lead draft openThe draft is not callable until you publish and activate it. The Salesforce account is still to choose.

2The workflow starts from a new lead

Select the input step. It is Salesforce: New lead, not an API request. The account line asks you to connect Salesforce. Leave it empty while you test.

The Salesforce New lead trigger with no account chosenNo Salesforce account is selected. Check every (minutes) is unset.

The only setting is Check every (minutes) (interval). It is the gap, in minutes, between checks for a new lead. The template leaves it unset. Kovca still starts the workflow from the New lead event when that event arrives.

Event fields later steps read:

FieldUsed for
input.nameLead text, and the task subject
input.lead_idLead text, the task note, and Create task's Contact or lead ID
input.leadLead text, inserted as JSON

The sample lead object is:

KeySample
id00Q5e00000AbCdEFGH
namePriya Raman
created_date2026-11-02T14:03:00.000Z

Those are the keys in the sample. This template does not name any other key inside lead. If a live event's lead object has more keys, they are included only because Lead text inserts the whole object. A manual run or an API call can omit fields. Lead text then leaves that part blank.

The same lead does not start two runs: the event id is lead_id. A different lead is a new event and runs again.

The sample is a name, an id, and a created date. Lead Intelligence does not see a company, an email, or what the person wrote, unless those keys are actually on lead. Do not map a key that is not in the event you received.

3Write the message the node reads

Select Lead text. It builds Lead Intelligence's message.

Lead text, built from the name, the lead id, and the lead objectThe template is the name, the lead id, and {{input.lead}}.

Name: {{input.name}}
Lead ID: {{input.lead_id}}
{{input.lead}}

message is required and accepts at most 4,000 characters. The template itself is short. A live lead object large enough to push the filled message over 4,000 characters fails this step.

4Put your criterion in

Select Lead Intelligence. message comes from Lead text. The criterion is a fixed value. Company, budget, timeline, and routing rules are left unset, because this event does not include them.

Lead Intelligence with the message and the criterionmessage comes from Lead text. qualification_criteria is a fixed value. Company and timeline are not mapped.

JSON
{
  "criteria": ["The message names a product or a project the sender wants to buy"]
}

Rewrite that sentence in your own words. criteria is a list of up to 10 items, each up to 300 characters. Each comes back as met, not_met, or unknown. A not_met result sets the fit to does_not_meet, and the action becomes nurture, so no task is created. An unknown result does not by itself stop a follow-up. With only a name, this criterion is usually unknown.

The node decides on fixed, published rules:

QualificationWhenrecommended_action
hotReady to buy, and a near-term timeline is statedprioritize_followup
warmReady to buy, or actively evaluatingstandard_followup
coldInterest, with no buying intent yetnurture
unqualifiedA criterion is not metnurture
unqualifiedNot a sales inquiry, or an existing customer or support requestmanual_review
insufficient_informationThe intent is unclearrequest_information

Near-term means the message or a mapped timeline says the purchase or project should start within about three months. This template does not map timeline. A created date is not a buying timeline. missing_information lists what was not supplied. For this template that is usually budget, timeline, and company.

Follow up? creates a task only for prioritize_followup and standard_followup. nurture, request_information, and manual_review take default.

5Decide what counts as a follow-up

Select Follow up?. The switch reads nodes.lead.output.recommended_action and continues on the first matching case.

The Follow up? switchprioritize_followup and standard_followup go to Task subject. Everything else goes to the result.

CaseMatchesGoes to
followupprioritize_followup, standard_followupTask subject
defaulteverything else, including nurture, request_information, and manual_reviewOutput

6Create the task on the lead

Task subject and Task note run only on followup.

Task subject:

Follow up with {{input.name}}

Task note:

Follow up on Salesforce lead {{input.lead_id}}. Qualification: {{nodes.lead.output.qualification}}. Recommended action: {{nodes.lead.output.recommended_action}}.

Create task is Salesforce's Create task action. It is on the path from Task note to Output.

Create task, with the subject, the note, and the lead id mappedSubject comes from Task subject. Description comes from Task note. Contact or lead ID is input.lead_id. If it fails, the run stops.

Create task fieldValue
Subject (subject)nodes.subject.output.text
Description (description)nodes.note.output.text
Contact or lead ID (who_id)input.lead_id

Leave Priority, Status, Due date, and Related record ID unset. Priority and status are strings your Salesforce org has to accept. The template does not guess them. If it fails is Stop the run. If the task is not created, the run fails and you find out. Create task is not idempotent: it is attempted once, and Kovca does not retry it. A second run with a new idempotency key can create another task. Choose the Salesforce account on this step before you activate. Studio tests simulate it and do not create a task.

7Test it

Open the Test tab. The template's examples are listed above the input. Priya Raman is the trigger's sample event. Alex Kim is the same shape with another id and name. Leave Send real requests off. Create task returns its sample. Nothing is created in Salesforce.

What Lead Intelligence returns depends on the message. Both examples are a name, a lead id, and a lead object with id, name, and created_date. That text does not name a product or a timeline. A run of the sample often takes default, and Task subject, Task note, and Create task are skipped.

Before you activate, run a stack of leads you have actually seen, including ones that should get a call and ones that should not. When the routes look right, turn on Send real requests once, with the Salesforce account chosen, on a lead you can delete the task from.

Publish, call it, and activate it

The same workflow can be called over the API. The body uses the trigger's field names. Create an API key under API keys and keep it on your backend.

cURL
curl https://kovca.io/api/v1/workflows/wf_.../execute \
  -H "Authorization: Bearer $KOVCA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 00Q5e00000AbCdEFGH" \
  -d '{
    "input": {
      "lead_id": "00Q5e00000AbCdEFGH",
      "name": "Priya Raman",
      "lead": {
        "id": "00Q5e00000AbCdEFGH",
        "name": "Priya Raman",
        "created_date": "2026-11-02T14:03:00.000Z"
      }
    }
  }'

A run that classifies that lead as warm, with standard_followup, takes the task path. The fields below are that shape. Create task returns its sample, so tasked is true and task_id is the sample id. The subject is Task subject filled in from that name. missing_information lists budget, timeline, and company because this template does not send them, and the message does not state a budget or a near-term timeline. What the node returns for a given lead depends on the text. The sample does not state a product, so a test of it often takes default instead, with task_subject, task_id, and tasked all null.

JSON
{
  "request_id": "req_...",
  "run_id": "run_...",
  "workflow": { "id": "wf_...", "version": 1 },
  "status": "succeeded",
  "output": {
    "qualification": "warm",
    "recommended_action": "standard_followup",
    "missing_information": ["budget", "timeline", "company"],
    "route": "followup",
    "task_subject": "Follow up with Priya Raman",
    "task_id": "00T5e00000LmNoPQRS",
    "tasked": true
  },
  "steps": [
    { "id": "input", "status": "succeeded" },
    { "id": "inquiry", "status": "succeeded" },
    { "id": "lead", "status": "succeeded" },
    { "id": "route", "status": "succeeded" },
    { "id": "subject", "status": "succeeded" },
    { "id": "note", "status": "succeeded" },
    { "id": "task", "status": "succeeded" },
    { "id": "output", "status": "succeeded" }
  ],
  "evaluations": 1
}

Use the lead id as the Idempotency-Key. A retry returns the original run instead of creating a second task. Kovca does not store the lead or the output, so keep the response from the first call. Values from steps that didn't run come back as null.

To run it from Salesforce, open Activate. The checklist is what's left: connect Salesforce, and choose that account on the trigger and on Create task. Publish & activate publishes the draft and starts it. The checklist's activate row runs on every new lead. A live automation runs that pinned version. Later edits don't reach it until you choose Publish & update.

The Activate checklist before a Salesforce account is connectedConnect Salesforce is still to do. The panel shows up to 17 credits per event.

You sign in on Salesforce's page. The sign-in page names Composio, which holds the account access and uses it only for Salesforce. Kovca keeps an ID for the account. Don't connect an account until the routes look right in the Test tab.

A new lead starts a run. Follow runs in Executions. While an automation is paused, events that arrive are dropped. Kovca does not keep them to run later. A failed run is not retried on its own, because the task may already have been created.

If a person already works the lead queue

You don't need this if a person can read the new leads and the list is short. Salesforce assignment rules can send a lead to a user or a queue from fields you already store, such as lead source or country. A lead queue holds the list until someone takes it. Neither reads an inquiry that is not on the lead, and neither creates a task from this classification. That is a fair setup for a few leads a day.

What the workflow adds is the same classification on every new lead, and a task on that lead only when the recommended action is a follow-up. You still have to choose the Salesforce account, and read a sample of results before you activate it. If the event you receive is only a name, expect most runs to skip the task.

Make it yours

  • Write the criterion you actually use. Lead Intelligence's criterion is one sentence. Replace it. A criterion the message does not mention comes back unknown, and that does not by itself create or skip the task.
  • Leave researchers without a task. That is already what default does for nurture, request_information, and manual_review. Add another case only if you want a different Salesforce action for one of those.
  • Set a priority your org has. Create task's Priority is a string. The template leaves it unset. Put a value your Salesforce task picklist accepts, as a fixed value, once you know it.
  • Don't create a contact from this event. Create contact needs a last name. Split the name yourself only after you have decided the rule. The sample does not include a last name field.
  • Change it without surprising a live org. Edit the draft and use Publish & update. The running version stays pinned until you do.

What it costs

Credits, and only for steps that succeed. Studio tests are free, and simulated actions are free.

  • The run: 10 credits when a Salesforce event starts it, 1 credit when the API starts it.
  • Lead Intelligence: 5 credits.
  • Salesforce Create task: 2 credits when it runs for real, and only on the follow-up branch.

The switch and the text steps are free. A branch that doesn't run isn't charged. The Activate panel adds every step together, including steps on branches that can't run in the same event, so its number is an upper bound. With this template that upper bound is 17 credits per event. The response's credits field is the run's total. See billing, the workflows API, HTTP actions, and automations.

On this page

  • What you'll build
  • Build it in the Studio
  • Publish, call it, and activate it
  • If a person already works the lead queue
  • Make it yours
  • What it costs

Built on Lead Intelligence: Qualify inbound leads by stated intent and your criteria, and recommend follow-up priority.

Keep going

Workflows API
InputShipment Inte…Needs action?Ticket subjectOpen support …Output
Shipment Intelligence8 min read

Catch delivery exceptions from carrier tracking events

Build a Kovca workflow that reads every carrier tracking update, spots delays, failed deliveries, address problems, and disputes, and opens a support ticket when someone needs to act. Runs from the carrier's webhook. Step by step in the Studio, with a ready-made template.

Read guide
InputSupport TriageHigh priority?Create incide…Alert textPage on-callAdd reactionJoinOutput
Support Triage14 min read

Escalate urgent Slack channel messages into incidents

Build a Kovca workflow that starts from a new Slack message, classifies it, and on high priority opens an incident, posts to on-call, and reacts on the message.

Read guide
InputSupport TriageHigh priority?Create incide…Alert textNotify teamJoinOutput
Support Triage10 min read

Escalate urgent support tickets into incidents automatically

Build a Kovca workflow that triages every new help desk ticket, opens an incident and alerts your team's chat when it's urgent, and runs from your help desk's webhook. Step by step in the Studio, with a ready-made template.

Read guide
Sign inGet Started