Skip to navigation

Salesforce

Find and create Salesforce leads, read accounts, and update opportunities during a call.
View as Markdown

Connect Salesforce so your agent can recognise returning callers, capture new leads and keep opportunities current, without anyone updating the CRM after the call.

At a glance

AuthenticationOAuth 2.0 (sign in with Salesforce)
Asked at connectNothing. You’re sent straight to Salesforce
ObjectsLead (search, get, create, update) · Account (get) · Opportunity (get, update)
Works withSingle-prompt agents

Before you connect

  • An edition with API access. Enterprise, Performance, Unlimited and Developer editions include it. Professional Edition needs the API add-on.
  • A user with the API Enabled permission. The agent acts as whoever signs in, so use a dedicated integration user with access to only the objects your agent needs. Anything that user can edit, the agent can edit.
  • Admin approval, if you’re not an admin. Salesforce blocks users from authorizing a connected app that isn’t installed in the org unless they have the Approve Uninstalled Connected Apps permission. If sign-in is blocked, ask a Salesforce admin to install the app first.

Connect Salesforce

1

Open Salesforce on the Integrations page

Open the Integrations page in the dashboard and click Connect next to Salesforce.

2

Sign in and allow access

Click Connect in the dialog. You’re sent to login.salesforce.com to sign in and approve access, then returned to the dashboard.

The connection acts as the Salesforce user who approves it, so the agent can only see and change the records that user can.

3

Add the tools to your agent

When you see Salesforce connected successfully, click Go to Tools. Click Add tool → Integration tool, choose Salesforce, tick the tools this agent needs, and click Add tools. From inside an agent, use Add tool → New tool → Integration tool instead.

Tools

ToolFunction nameWhat it does
Search leadssalesforce_search_leadsFinds leads by phone number, email or name
Get leadsalesforce_get_leadReads a lead’s full record
Create leadsalesforce_create_leadCreates a new lead
Update leadsalesforce_update_leadChanges fields on an existing lead
Get accountsalesforce_get_accountReads an account by its record ID
Get opportunitysalesforce_get_opportunityReads an opportunity by its record ID
Update opportunitysalesforce_update_opportunityChanges stage, amount, close date and other fields

The function name is what the agent calls. Reference it in your prompt, for example “Call salesforce_search_leads with the caller’s phone number before asking for their name.”

Fields

FieldRequiredWhat the agent sends
queryYesA phone number, email or name to search for

Returns each matching lead’s Id, Name, Email and Phone. Use Get lead with the Id for the full record.

FieldRequiredWhat the agent sends
record_idYesThe Salesforce record ID, for example 00Q5f000006abcdEAA

The agent is told never to use a name as an ID. For leads, it should search first. Accounts and opportunities have no search tool, so the ID has to come from earlier in the call, such as a field on the lead.

Update lead also needs the lead’s record_id. Every other field is optional; the agent fills the ones it learns on the call.

FieldLabelPinnable
FirstNameFirst name
LastNameLast name
CompanyCompany
EmailEmail
PhonePhone
TitleJob title
IndustryIndustry
DescriptionNotes
LeadSourceLead sourceYes
StatusLead statusYes
OwnerIdOwner IDYes

By default, Salesforce requires Last name and Company on a new lead, and your org may require more fields. Tell the agent to collect them before it calls Create lead.

Needs the opportunity’s record_id, plus any of:

FieldLabelPinnable
NameOpportunity name
AmountAmount
CloseDateClose date (YYYY-MM-DD)
DescriptionDescription
StageNameStageYes
OwnerIdOwner IDYes

Pin the values that never change

Open the tool on your agent and set these fields to Fixed (or Variable, to set them per campaign). The agent stops asking about them and can’t change them.

FieldTypical pinWhy
LeadSourceVoice AgentEvery lead this agent creates is attributed correctly
StatusOpen - Not ContactedNew leads land in your team’s queue
OwnerIdYour SDR’s user IDLeads are assigned to the right person
StageNameQualificationAn opportunity only moves to the stage you allow

Use values from your org’s picklists. Voice Agent isn’t a default Lead Source value, so add it to the picklist in Salesforce Setup first, or pin one you already use.

How it works on a call

1

Identify the caller

The agent calls Search leads with the caller’s number or email. A match returns the lead’s ID.

2

Personalise the conversation

Get lead reads the full record, such as status, company and notes, so the agent doesn’t ask for what you already know.

3

Capture or update

For a new caller, the agent collects name and company and calls Create lead. For a known one, it calls Update lead with what changed.

Example condition prompts:

ToolCondition prompt
Search leadsAt the start of every call, search with the caller’s phone number.
Create leadOnly when the search found nothing and you have the caller’s last name and company.
Update leadWhen a known caller gives new contact details or a new job title.

Limits

  • Production orgs only. Sign-in always goes through login.salesforce.com; sandboxes aren’t supported.
  • Leads are the only searchable object. Accounts and opportunities are read by ID.
  • One Salesforce org per organization. To switch to a different one, click Disconnect, then Connect again.

Troubleshooting

Access can no longer be renewed. Usually an admin revoked the app, or your org’s refresh-token policy expired it. Click Reconnect and sign in again. Your tools and pins are kept.

Salesforce refused the record. The text after the colon is Salesforce’s reason, such as the missing field. The usual causes are a missing required field, such as Last name or Company on a new lead, a validation rule, or a pinned value that a restricted picklist doesn’t allow. Pinned values are sent exactly as typed, so copy them from the field’s picklist in Salesforce Setup.