← Back to all apps

Salesforce

by OpenAI

Interact with Salesforce CRM data.

14ChatGPT Tools
OpenAIDeveloper

Available Tools

Describe Account

describe_account
Full Description

Retrieve the Salesforce Account object metadata using the sObject Describe resource. Returns: DescribeSObjectResult: The parsed Salesforce API response describing the Account object.

Describe Contact

describe_contact
Full Description

Retrieve the Salesforce Contact object metadata using the sObject Describe resource. See: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_sobject_describe.htm Returns: DescribeSObjectResult: The parsed Salesforce API response describing the Contact object.

Describe Lead

describe_lead
Full Description

Retrieve the Salesforce Lead object metadata using the sObject Describe resource. Returns: DescribeSObjectResult: The parsed Salesforce API response describing the Lead object.

Describe Opportunity

describe_opportunity
Full Description

Retrieve the Salesforce Opportunity object metadata using the sObject Describe resource. Returns: DescribeSObjectResult: The parsed Salesforce API response describing the Opportunity object.

Describe Sobject

describe_sobject
Full Description

Retrieve Salesforce metadata for the provided sObject using the Describe API. Args: sobject: The Salesforce sObject name (e.g., 'Contact', 'Account', 'CustomObject__c'). Returns: DescribeSObjectResponse: The parsed Salesforce API describe response.

Parameters (1 required)
Required
sobjectstring

Get Account

get_account
Full Description

Retrieve a Salesforce account by ID. Args: account_id: The Salesforce Account ID (e.g., '001...'). Returns: Account: A minimal Account Pydantic model with core fields and the unmapped fields in 'other_fields'.

Parameters (1 required)
Required
account_idstring

Get Contact

get_contact
Full Description

Retrieve a Salesforce contact by ID. Args: contact_id: The Salesforce Contact ID (e.g., '003...'). Returns: Contact: A minimal Contact Pydantic model with core fields and the unmapped fields in 'other_fields'.

Parameters (1 required)
Required
contact_idstring

Get Lead

get_lead
Full Description

Retrieve a Salesforce lead by ID. Args: lead_id: The Salesforce Lead ID (e.g., '00Q...'). Returns: Lead: A minimal Lead Pydantic model with core fields and the unmapped fields in 'other_fields'.

Parameters (1 required)
Required
lead_idstring

Get Opportunity

get_opportunity
Full Description

Retrieve a Salesforce opportunity by ID. Args: opportunity_id: The Salesforce Opportunity ID (e.g., '006...'). Returns: Opportunity: A minimal Opportunity Pydantic model with core fields and the unmapped fields in 'other_fields'.

Parameters (1 required)
Required
opportunity_idstring

Get Profile

get_profile
Full Description

Return the authenticated user's Salesforce profile.

Get Sobject

get_sobject
Full Description

Retrieve a Salesforce sObject record by ID. Args: sobject: The Salesforce sObject name (e.g., 'Contact', 'Account', 'CustomObject__c'). record_id: The Salesforce record ID. Returns: dict: The full API response for the record.

Parameters (2 required)
Required
record_idstring
sobjectstring

List Sobjects

list_sobjects
Full Description

Retrieve the Salesforce sObjects available to the authenticated user. Returns: ListSObjectsResponse: The list of accessible objects and their metadata.

Query Soql

query_soql
Full Description

Run a SOQL (Salesforce Object Query Language) query against Salesforce and return the raw JSON response.

This method allows you to execute arbitrary SOQL queries using the Salesforce REST API. It returns the raw API response, which typically includes the following fields:

  • 'records': List of result records (dicts)
  • 'done': Boolean indicating if all results are returned
  • 'nextRecordsUrl': (Optional) URL to fetch the next batch if results are paginated

Args: soql: The SOQL query string (e.g., 'SELECT Name FROM Account').

Returns: dict: The Salesforce API response, including 'records', 'done', and possibly 'nextRecordsUrl'.

Usage Example: >>> soql = "SELECT Id, Name FROM Account WHERE Industry = 'Technology'" >>> result = await connector.query_soql(soql) >>> print(result['records'])

Pagination: If the result set is large, Salesforce may return a 'nextRecordsUrl'. You can use this URL with the HTTP client to fetch additional records. See: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm

SOQL Reference:

  • SOQL Syntax: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm
  • Simple Salesforce query docs: https://simple-salesforce.readthedocs.io/en/latest/user_guide/queries.html

See Also:

  • For retrieving all results in one call, consider using the 'query_all' endpoint (not implemented here).
  • For more advanced query formatting, see 'format_soql' in simple-salesforce: https://simple-salesforce.readthedocs.io/en/latest/user_guide/queries.html#formatting-soql-queries
Parameters (1 required)
Required
soqlstring

Search Sosl

search_sosl
Full Description

Run a SOSL (Salesforce Object Search Language) search against Salesforce and return the raw JSON response.

This method allows you to execute arbitrary SOSL searches using the Salesforce REST API. It returns the raw API response, which typically includes the following fields:

  • 'searchRecords': List of result records (dicts)

Args: sosl: The SOSL search string (e.g., 'FIND {Acme} RETURNING Account(Id, Name), Contact(Id, Name)').

Returns: dict: The Salesforce API response, including 'searchRecords' and other metadata.

Usage Example: >>> sosl = "FIND {Acme} RETURNING Account(Id, Name), Contact(Id, Name)" >>> result = await connector.search_sosl(sosl) >>> print(result['searchRecords'])

Reference:

  • Salesforce REST API Search: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_search.htm
  • SOSL Syntax: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_find.htm
Parameters (1 required)
Required
soslstring