Build a full Agentforce inbound lead agent with Lusha

Example outputs in this workflow are illustrative — they reflect the structure, fields, and format of real Lusha API output, but were not pulled from a live session. Build this workflow with your own Lusha API key and Salesforce org to see live results.

Every workflow in this series has been building toward this one. Enrichment that runs the moment a lead arrives. ICP scoring that routes without human triage. Contact monitoring that catches departures before they affect deals. Buying signals that surface on open opportunities before the rep has to ask. Campaign verification that cleans every list before it sends.

This workflow combines all of it into a single Agentforce agent — an autonomous AI agent inside Salesforce that handles the full inbound lead motion from the moment a form is submitted to the moment the right rep receives a Slack notification with the lead enriched, scored, contextualized, and ready to call. No human touches the lead between arrival and rep notification. The agent does the work. The rep does the selling.

Requires: Lusha API key · Salesforce Agentforce license · Salesforce Flow Builder · Salesforce admin access · Slack (recommended)

How it works

This agent runs autonomously inside Salesforce Agentforce. It triggers on every new inbound lead, executes a complete intelligence pass via the Lusha API, makes routing decisions based on ICP fit, and delivers a fully contextualized lead to the right rep — all without human intervention.

1
Trigger — New Lead created in Salesforce
The Agentforce agent fires the moment a new Lead record is created — from a web form, an inbound integration, a CRM import, or a manual entry. The agent immediately begins its intelligence pass without waiting for a rep to open the record.
2
Action — Enrich contact via Lusha
The agent calls Lusha’s /v2/contacts/search endpoint with the lead’s email address. Lusha returns the verified contact profile — current title, seniority, department, verified email, direct dial, and mobile. If the contact has departed their listed company, the agent flags the lead for manual review rather than continuing the automated flow.
3
Action — Enrich company and check buying signals
In parallel, the agent calls Lusha’s /v2/companies/search endpoint to pull the full company profile — industry, employee count, revenue range, funding stage, tech stack — and Lusha’s signals endpoint to check for active buying signals at the account. Both calls run simultaneously to minimize latency.
4
Action — Score lead against ICP
Using the enriched firmographic data, the agent scores the lead against your ICP criteria — industry, size, funding stage, seniority, geography. Must-have failures assign a Low score immediately. Passing leads are scored High, Medium, or Low based on weighted criteria. The score is written to the Lead record along with the individual criterion results.
5
Action — Route lead to correct rep or queue
Based on ICP score, the agent assigns the Lead to the correct owner. High-fit leads go directly to a senior AE matched by territory or industry. Medium-fit leads go to the SDR queue for qualification. Low-fit leads go to nurture. The routing logic is fully configurable to match your team structure and territory model.
6
Action — Generate pre-call brief
Using the enriched contact profile, company data, ICP score, and buying signals, the agent generates a pre-call brief and writes it to the Lead record. The brief includes who the contact is, what their company does, why the lead scored the way it did, and the top signal firing at the account right now — ready for the rep before they make the first call.
7
Output — Rep notified via Slack with full context
The agent fires a Slack notification to the assigned rep with the lead name, company, ICP score, top signal, verified direct dial, and a link to the Salesforce record. The rep receives everything they need to make an informed first call — within 60 seconds of the lead submitting a form.

What you’ll get back

Within 60 seconds of a form submission, the rep receives this in Slack:

🟢 New high-fit inbound lead — assigned to you

Contact: R.M. — VP of Sales
Company: [Company A] — Revenue Intelligence / SaaS
Employees: 280–320  ·  Series B  ·  Austin, TX
ICP score: High — matches 5 of 5 criteria
Top signal: Series B closed $22M — 11 days ago
Direct dial: +1 512 555 ••••
Verified email: r.m@[company].com

Pre-call brief: R.M. is VP of Sales at [Company A], a Series B Revenue Intelligence company that just closed $22M. They have 8 SDR roles posted and an intent signal on prospecting data at score 74. Strong ICP fit — matches your best customers on industry, size, and funding stage. Call today — the timing window is open.

Open lead in Salesforce →

And the Lead record in Salesforce looks like this:

Salesforce fieldValue
TitleVP of Sales ✓ Lusha verified
SeniorityVP
Direct dial+1 512 555 ••••
IndustryRevenue Intelligence / SaaS
Employees280–320
Funding stageSeries B
Lusha ICP scoreHigh
Lusha top signalSeries B closed — $22M — 11 days ago
Lusha pre-call briefVP of Sales, Series B, 8 SDR roles posted, intent score 74 on prospecting data. Call today.
Lead owner[AE name] — auto-assigned
Agent run time47 seconds
Lusha enriched[date] ✓

Build it

Step 1 — Complete Workflows 1 and 2 first

This agent builds on the foundations established in the first two workflows in the series. Before building the full agent, confirm that the custom fields from Workflow 1 and Workflow 2 are in place on your Lead and Contact objects. The agent uses those fields as its output targets.

Step 2 — Add pre-call brief field to the Lead object

In Salesforce Setup, go to Object Manager → Lead → Fields & Relationships. Add one additional custom field:

Field labelField typeAPI name
Lusha — Pre-call briefLong Text AreaLusha_Pre_Call_Brief__c
Lusha — Top signalTextLusha_Top_Signal__c
Lusha — Agent run timeNumber (seconds)Lusha_Agent_Run_Time__c

Step 3 — Create the Agentforce agent in Salesforce

In Salesforce Setup, go to Agentforce → Agents → New Agent. Configure as follows:

  • Agent name: Lusha Inbound Lead Agent
  • Agent type: Autonomous
  • Primary object: Lead
  • Trigger: Record created
  • Entry condition: LeadSource is not null (or remove condition to run on all new leads)

Step 4 — Add Agent Actions

In the Agent Builder, add the following actions in sequence:

StepAction typeConfiguration
1HTTP CalloutPOST /v2/contacts/search — input: Lead.Email — output: contact profile fields
2aHTTP Callout (parallel)POST /v2/companies/search — input: Lead.Company — output: firmographic fields
2bHTTP Callout (parallel)GET /v2/companies/signals — input: company domain — output: signal array
3DecisionContact status = Departed → flag for manual review and stop. Contact confirmed → continue
4Prompt TemplateICP scoring logic — evaluate enriched fields against ICP criteria, return score and reasons
5AssignmentMap ICP score to lead owner using territory and seniority routing table
6Prompt TemplatePre-call brief generation — combine contact profile, company data, score, and top signal into a brief
7Update RecordsWrite all enriched fields, ICP score, top signal, and pre-call brief to Lead record
8Slack NotificationSend formatted message to assigned rep with lead summary and Salesforce link

Step 5 — Configure the ICP scoring Prompt Template

In Salesforce Setup, go to Prompt Builder → New Prompt Template. Create a template that takes the enriched lead fields as inputs and returns an ICP score and reason. A starting template:

You are an ICP scoring agent. Score the following lead against
the ICP criteria below and return a JSON object with score
(High/Medium/Low), criteria_met (array), criteria_failed
(array), and reason (one sentence).

ICP criteria:
- Industry must be: {ICP_INDUSTRIES}
- Employee count must be between: {ICP_MIN_EMPLOYEES} and
  {ICP_MAX_EMPLOYEES}
- Funding stage must be: {ICP_FUNDING_STAGES}
- Seniority must be: {ICP_SENIORITY_LEVELS}
- Geography must be: {ICP_GEOGRAPHIES}

Lead data:
- Industry: {Lead.Industry}
- Employees: {Lead.Lusha_Employee_Count__c}
- Funding stage: {Lead.Lusha_Funding_Stage__c}
- Seniority: {Lead.Lusha_Seniority__c}
- Country: {Lead.Country}

Return only valid JSON. No preamble.

Step 6 — Configure the pre-call brief Prompt Template

Create a second Prompt Template that generates the pre-call brief:

Write a pre-call brief for a sales rep in under 60 words.
Use only the data provided. Be specific. No generic phrases.

Contact: {Lead.FirstName} {Lead.LastName},
  {Lead.Lusha_Seniority__c} at {Lead.Company}
Company: {Lead.Industry}, {Lead.Lusha_Employee_Count__c}
  employees, {Lead.Lusha_Funding_Stage__c}
ICP score: {Lead.Lusha_ICP_Score__c}
Top signal: {Lead.Lusha_Top_Signal__c}
Score reason: {Lead.Lusha_Score_Reason__c}

Return the brief as plain text only.

Step 7 — Configure the Slack notification

In the Agent Builder, add a Slack Notification action as the final step. Configure the message template to include the lead name, company, ICP score, top signal, direct dial, verified email, pre-call brief, and a deep link to the Salesforce Lead record. Send to the assigned rep’s Slack user ID, retrieved from the Lead.Owner field.

Step 8 — Test end to end

Create a test lead with a known email address. Monitor the agent run in Agentforce → Agent Runs to confirm each action completes successfully. Verify the Lead record is fully enriched, the ICP score is correct, the pre-call brief reads naturally, and the Slack notification arrives with all fields populated. Target run time under 60 seconds. Full troubleshooting guidance at docs.lusha.com/guides.

What this agent replaces

Manual stepTime saved per leadAgent action
Rep manually enriches contact in Lusha3–5 minutesAutomatic on lead creation
Rep researches company in CRM and LinkedIn5–10 minutesAutomatic on lead creation
Manager triages and routes lead manually2–5 minutesAutomatic ICP scoring and routing
Rep checks for account signals before calling3–8 minutesAutomatic signal check and brief
Rep writes pre-call notes before first call5–10 minutesAutomatic brief generation
Total per lead18–38 minutesUnder 60 seconds

The full Lusha for Salesforce series

This agent is the seventh and final workflow in the series. Each workflow stands alone — build one or build all seven.

Together they give you a fully autonomous Lusha-powered Salesforce stack:

  1. Auto-enrich new leads with Lusha inside Salesforce Agentforce →
  2. Score and route leads by ICP fit →
  3. Alert reps when a key contact changes roles →
  4. Surface buying signals on open deals →
  5. Enrich and score accounts on a scheduled cadence →
  6. Enrich contacts before a Salesforce campaign goes out →

Example outputs in this workflow are illustrative — they reflect the structure, fields, and format of real Lusha API output, but were not pulled from a live session. Build this workflow with your own Lusha API key and Salesforce org to see live results.

Built by: Lusha
Time to build: 90 min
Difficulty: Advanced
Tools: Lusha, Salesforce
Type: Template

FAQ

  • Do I need a specific Salesforce license to use Agentforce?

    Yes — Agentforce requires a Salesforce license that includes Agentforce capabilities. As of 2026, Agentforce is available on Salesforce Enterprise and Unlimited editions with the Agentforce add-on, and natively included in some Salesforce industries clouds. If you’re unsure whether your org has Agentforce enabled, go to Salesforce Setup and search for “Agents” — if the menu item appears, your org is licensed. If not, contact your Salesforce account executive. The Lusha API integration works independently of the Agentforce license — Workflows 1 through 6 in this series run on standard Salesforce Flow Builder, which is available on all paid Salesforce editions.

  • How does the agent handle a lead where Lusha can't find a contact match?

    If Lusha returns no match on the contact search, the agent continues with company enrichment and signal detection only — it skips the contact-level fields and notes the no-match status in the pre-call brief. The lead is still scored based on firmographic data, still routed based on ICP fit, and the rep is still notified — but the brief flags that contact details couldn’t be verified and recommends a manual Lusha lookup before calling. No credits are consumed for a no-match result on the contact search.

  • What is a Prompt Template and do I need Salesforce Einstein to use one?

    Prompt Templates are Salesforce’s native way of running structured AI prompts inside Agentforce — they take field values from a record as inputs, send them to an AI model, and return a structured response. Prompt Builder requires Salesforce Einstein generative AI, which is included in the Agentforce license. If your org doesn’t have Einstein enabled, you can replicate the ICP scoring and brief generation logic using Salesforce Flow formula fields and Decision elements instead — the output is less natural-language but functionally equivalent. The Lusha enrichment and routing steps work identically with or without Einstein.

  • How do I handle the agent for leads that come in outside business hours?

    The agent runs 24/7 regardless of business hours — it processes every new lead the moment it’s created and writes the enriched data, score, and brief to the record immediately. The Slack notification fires to the assigned rep at the time of processing. If you want to suppress Slack notifications outside business hours and batch them for morning delivery, add a time condition to the notification step — check whether the current time is within business hours before firing the Slack action, and if not, create a follow-up task instead that surfaces when the rep starts their day. The Lead record is always fully enriched and ready regardless of when the notification fires.

  • How does this agent relate to the other workflows in the Lusha for Salesforce series?

    This agent consolidates the inbound lead motion from Workflows 1 and 2 — enrichment and ICP scoring — into a single autonomous agent that also adds signal detection and pre-call brief generation. Workflows 3 through 6 handle different motions that run alongside this agent rather than inside it: contact change monitoring runs on a daily schedule across all contacts, buying signal detection runs on open opportunities, scheduled enrichment refreshes the full account database weekly, and campaign verification runs before each campaign send. Build this agent for the inbound motion. Build the remaining workflows for the ongoing pipeline and data quality motions. Together they cover every point in the GTM lifecycle where Lusha data improves the output.

Ready to run this?

Connect once, run anywhere. Works in Claude, ChatGPT, n8n, Clay, or any agent connected to Lusha.