Skip to main content

Salesforce agent connector

Salesforce is a cloud-based CRM platform that helps businesses manage customer relationships, sales pipelines, and business operations. This connector provides access to accounts, contacts, leads, opportunities, tasks, events, campaigns, cases, notes, and attachments for sales analytics and customer relationship management.

Example questions

The Salesforce connector is optimized to handle prompts like these.

  • Show me my top 5 opportunities this month
  • List all contacts from {company} in the last quarter
  • Search for leads in the technology sector with revenue over $10M
  • What trends can you identify in my recent sales pipeline?
  • Summarize the open cases for my key accounts
  • Find upcoming events related to my most important opportunities
  • Analyze the performance of my recent marketing campaigns
  • Identify the highest value opportunities I'm currently tracking
  • Show me the notes and attachments for {customer}'s account

Unsupported questions

The Salesforce connector isn't currently able to handle prompts like these.

  • Create a new lead for {person}
  • Update the status of my sales opportunity
  • Schedule a follow-up meeting with {customer}
  • Delete this old contact record
  • Send an email to all contacts in this campaign

Installation

uv pip install airbyte-agent-salesforce

Usage

Connectors can run in open source or hosted mode.

Open source

In open source mode, you provide API credentials directly to the connector.

from airbyte_agent_salesforce import SalesforceConnector
from airbyte_agent_salesforce.models import SalesforceAuthConfig

connector = SalesforceConnector(
auth_config=SalesforceAuthConfig(
refresh_token="<OAuth refresh token for automatic token renewal>",
client_id="<Connected App Consumer Key>",
client_secret="<Connected App Consumer Secret>"
)
)

@agent.tool_plain # assumes you're using Pydantic AI
@SalesforceConnector.tool_utils
async def salesforce_execute(entity: str, action: str, params: dict | None = None):
return await connector.execute(entity, action, params or {})

Hosted

In hosted mode, API credentials are stored securely in Airbyte Cloud. You provide your Airbyte credentials instead.

This example assumes you've already authenticated your connector with Airbyte. See Authentication to learn more about authenticating. If you need a step-by-step guide, see the hosted execution tutorial.

from airbyte_agent_salesforce import SalesforceConnector

connector = SalesforceConnector(
external_user_id="<your_external_user_id>",
airbyte_client_id="<your-client-id>",
airbyte_client_secret="<your-client-secret>"
)

@agent.tool_plain # assumes you're using Pydantic AI
@SalesforceConnector.tool_utils
async def salesforce_execute(entity: str, action: str, params: dict | None = None):
return await connector.execute(entity, action, params or {})

Full documentation

Entities and actions

This connector supports the following entities and actions. For more details, see this connector's full reference documentation.

EntityActions
AccountsList, Get, API Search
ContactsList, Get, API Search
LeadsList, Get, API Search
OpportunitiesList, Get, API Search
TasksList, Get, API Search
EventsList, Get, API Search
CampaignsList, Get, API Search
CasesList, Get, API Search
NotesList, Get, API Search
Content VersionsList, Get, Download
AttachmentsList, Get, Download
QueryList

Authentication and configuration

For all authentication and configuration options, see the connector's authentication documentation.

Salesforce API docs

See the official Salesforce API reference.

Version information

  • Package version: 0.1.62
  • Connector version: 1.0.7
  • Generated with Connector SDK commit SHA: 43200eed5845ee089ef5b9afc0199a8af3966169