Salesforce AI Agent Knowledge Guide
Salesforce Integration Overview
The Salesforce integration gives your Velaro AI agent direct access to 36 AI tools covering Salesforce Sales Cloud and Service Cloud. The AI agent can search contacts and accounts, create leads, update opportunities, open cases, log tasks, and attach notes — all without a human agent.
No managed package or AppExchange install required. The integration connects via Salesforce Connected App OAuth (REST API v60.0), so it works with any Salesforce edition.
This guide covers: what each tool does, step-by-step setup, sample prompts for every use case, and troubleshooting.
Quick Setup (4 Steps)
Step 1 — Create a Connected App in Salesforce
Go to Setup → Apps → App Manager → New Connected App. Enable OAuth Settings, add the api and refresh_token offline_access scopes. Copy the Consumer Key (Client ID) and Consumer Secret.
Step 2 — Get a Refresh Token
Use the Salesforce CLI: sf org display --target-org <alias> to retrieve a refresh token after authorizing, or run the OAuth web server flow once to get the initial token pair.
Step 3 — Connect in Velaro
Go to Integrations → Salesforce and enter your Instance URL (e.g. https://mycompany.my.salesforce.com), Client ID, Client Secret, and Refresh Token. Click Save & Test to verify connectivity.
Step 4 — Enable AI Skills
Go to Bots → AI Training → Skills and turn on the Salesforce AI skill group. All tools activate at once. Use Launch Starter Wizard for a pre-built workflow.
All 36 AI Tools
Contacts (5 tools)
salesforce_search_contact — Search for a Salesforce Contact by name, email, or phone. Returns the contact's Id, name, title, account, and email. Call this first when a visitor identifies themselves.
salesforce_get_contact — Retrieve the full Contact record by Salesforce Id. Returns all standard and custom fields. Call after salesforce_search_contact when you need complete details.
salesforce_create_contact — Create a new Contact record. Required fields: firstName, lastName. Optional: email, phone, title, accountId. Use when a new prospect provides their information.
salesforce_update_contact — Update Contact fields such as title, phone, or email. Requires the contact's Salesforce Id. Always confirm changes before updating.
salesforce_get_contact_cases — List all Cases linked to a Contact. Returns CaseNumber, Subject, Status, and Priority. Use to check whether a support issue already exists before creating a new one.
Accounts (3 tools)
salesforce_search_accounts — Search Accounts by name or website domain. Returns the account Id and name. Use to identify the company behind a B2B visitor.
salesforce_get_account — Retrieve the full Account record — industry, annual revenue, employee count, billing address. Use to give agents rich account context.
salesforce_get_account_contacts — List all Contacts at a given Account. Returns name, email, and title. Use to find the right person when a visitor mentions their company.
Leads (4 tools)
salesforce_create_lead — Create a new Lead record. Required: lastName, company. Optional: firstName, email, phone, leadSource, description. Set leadSource to "Chat" to track lead origins.
salesforce_get_lead — Retrieve a Lead by Salesforce Id — returns name, email, company, status, lead source, and owner.
salesforce_search_leads — Search Leads by name or email. Use to check for an existing lead before creating a duplicate.
salesforce_update_lead — Update Lead fields such as status, description, or owner. Use when a lead progresses during the conversation (e.g. status from "New" to "Working").
Opportunities (5 tools)
salesforce_create_opportunity — Create an Opportunity. Required: name, stage, closeDate (YYYY-MM-DD). Optional: accountId, amount, description. Stage examples: "Prospecting", "Qualification", "Proposal/Price Quote", "Closed Won".
salesforce_get_opportunity — Retrieve an Opportunity by Id — returns name, stage, amount, close date, probability, and owner.
salesforce_get_contact_opportunities — List all Opportunities linked to a Contact via OpportunityContactRole. Use to surface the contact's purchase history and active deals.
salesforce_search_opportunities — Search Opportunities by name or stage. Use to find existing deals without a specific Id.
salesforce_update_opportunity — Update an Opportunity's stage, amount, or close date. Always confirm with the customer before updating.
Cases (5 tools)
salesforce_create_case — Open a new support Case. Required: subject. Optional: description, contactId, accountId, priority (Low/Medium/High), origin. Set origin to "Chat" for all Velaro-created cases.
salesforce_get_case — Retrieve a Case by Id — returns CaseNumber, Subject, Status, Priority, and Description. Use when the visitor references a case number.
salesforce_search_cases — Search Cases by subject keyword. Use to check for an existing case before creating a new one.
salesforce_update_case — Update a Case's Status or Priority. Use when resolving an issue mid-conversation (e.g. Status → "Closed").
salesforce_add_case_comment — Add a public comment to an existing Case. Use to log conversation notes or customer responses directly in Salesforce.
Tasks, Notes & Email History (5 tools)
salesforce_create_task — Create a follow-up Task. Required: subject. Optional: whoId (Contact/Lead), whatId (Account/Opportunity), dueDate, priority (Low/Normal/High). Set ActivityDate to the next business day for prompt follow-up.
salesforce_get_tasks — List open Tasks for a given Contact or record. Use to check what follow-up is already scheduled before creating duplicates.
salesforce_add_note — Attach a ContentNote to any Salesforce record (Contact, Account, Opportunity, or Case). Required: title, content, linkedEntityId. Use to log a conversation summary after every chat.
salesforce_get_notes : Read the notes attached to a Contact, Lead, Account, Opportunity, or Case, both classic Notes and Lightning Notes. Required: the Salesforce record Id. Use to catch up on what your team already recorded before answering.
salesforce_get_email_history : Read the emails logged in Salesforce against a Contact, Lead, Case, Opportunity, or Account. Returns subject, direction, status, and date. Use to avoid repeating what was already sent.
Conversation Sidebar Panel
When an agent opens a conversation, Velaro automatically looks up the visitor by email or phone in Salesforce and shows a live panel in the right sidebar.
What the panel shows:
- Contact card — name, title, account, phone, and email pulled directly from the matching Salesforce Contact record
- Cases tab — all open Cases linked to the contact, with CaseNumber, Subject, Status, and Priority. Requires Salesforce Service Cloud. The tab auto-hides if the site doesn't have a Service Cloud license — no errors, no empty tab.
- Sidebar Fields — admins can configure which custom Salesforce fields appear on every contact card. Go to Integrations → Salesforce → Sidebar Fields to map any standard or custom field from the Contact object. Agents see those fields without leaving the conversation.
- Sync button — agents can push visitor data into Salesforce as a Contact or Lead directly from the conversation panel. Updates or creates the record without opening a new tab.
- Manual search — agents can search for any contact by name or email if the auto-lookup doesn't find a match.
Writing Instructions for Your AI Agent
Your AI agent works best with short, plain instructions. You do not need a long script. Cover these points and let the connected Salesforce skills do the rest:
- Role — say who the AI agent is and what it helps with, such as qualifying leads, answering account questions, or logging support requests.
- What it can look up — name the Salesforce areas it should use, such as contacts, accounts, deals, or cases.
- When to hand off — decide when a person should take over, such as a pricing negotiation, a complaint, or two attempts without a resolution.
- What it should never do — for example, sharing private account details or promising discounts or delivery dates.
- Tone and channel — keep replies short and friendly, and shorter still for text messages or phone calls.
Start simple, test it in the simulator, and add detail only where you see a gap.
Subscription & Permissions
The Salesforce integration requires EnableSalesforce to be enabled by your account administrator under Admin → Subscription.
Required Connected App Scopes:
api— read/write access to Salesforce objectsrefresh_token offline_access— allows token renewal without re-authorization
Object-level permissions needed (at minimum):
- Contact: Read, Create, Edit
- Account: Read
- Lead: Read, Create, Edit
- Opportunity: Read, Create, Edit
- Case: Read, Create, Edit
- Task: Read, Create
- ContentNote: Read, Create
- ContentDocumentLink: Create
Troubleshooting
"Salesforce not enabled" — Contact your administrator to enable the EnableSalesforce subscription flag.
"Could not connect" on the test connection — Check that your Instance URL ends without a slash (e.g. https://mycompany.my.salesforce.com) and that your Connected App has the api scope enabled.
"Insufficient access rights" errors — The user profile tied to the Connected App's OAuth credentials needs the object-level permissions listed above. Check under Setup → Profiles.
Token expired — The integration automatically refreshes the access token using the stored refresh token. If the refresh token expires (default: no expiry in Salesforce, but can be limited by org policy), reconnect under Integrations → Salesforce → Reconnect.
Duplicate leads/contacts — Always call salesforce_search_contact or salesforce_search_leads before creating. The AI agent should check for existing records first and only create if none is found.
Was this article helpful?