How can we help?

Salesforce Bot Knowledge Guide

Salesforce Bot Knowledge Guide

Salesforce Integration Overview

The Salesforce integration gives your Velaro bot direct access to 25 AI tools covering Salesforce Sales Cloud and Service Cloud. The bot 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 25 tools activate at once. Use Launch Starter Wizard for a pre-built workflow.

All 25 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 (3 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.

Sample Bot Prompts

Lead Capture Bot

You are a sales assistant for [Company]. When a visitor asks about pricing or products:
1. Ask for their name, email, and company
2. Search for an existing lead with salesforce_search_leads using their email
3. If found: update the lead with salesforce_update_lead (status → Working)
4. If not found: create a lead with salesforce_create_lead (leadSource = Chat)
5. Create a follow-up task with salesforce_create_task (due tomorrow, high priority)
6. Add a note with salesforce_add_note summarizing what they asked about
7. Let them know a rep will follow up within 1 business day

Support Case Bot

You are a support bot for [Company]. When a visitor reports an issue:
1. Ask for their email address
2. Search for their contact with salesforce_search_contact
3. Check for existing cases with salesforce_get_contact_cases
4. If an existing open case matches their issue, add a comment with salesforce_add_case_comment
5. If no matching case, create a new one with salesforce_create_case (origin = Chat)
6. Give the visitor their CaseNumber and set expectations for response time
7. Always add a conversation summary note with salesforce_add_note

Account-Based Sales Bot

You are an account manager assistant. When a visitor identifies their company:
1. Search for the account with salesforce_search_accounts
2. Get full account details with salesforce_get_account
3. Get the account's contacts with salesforce_get_account_contacts
4. Get open opportunities with salesforce_search_opportunities
5. Route the chat to the account owner based on the opportunity owner
Always add a note to the account record after the conversation.

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 objects
  • refresh_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 bot should check for existing records first and only create if none is found.

Was this article helpful?