The Salesforce Platform Connector is a cornerstone of the Agentforce Context Protocol (ACP) within the Salesforce ecosystem. It empowers Agentforce agents to directly interact with the core functionalities of your Salesforce organization, including standard and custom objects, executing Apex code, invoking Flows, and accessing platform events.

Purpose and Capabilities

This Connector allows Agentforce agents to perform a wide range of actions and retrieve data from your Salesforce org. Key capabilities include:

Tool NameDescriptionExample Inputs
platform_execute_soql_queryExecutes a Salesforce Object Query Language (SOQL) query.query_string
platform_execute_sosl_searchPerforms a Salesforce Object Search Language (SOSL) search.search_string
platform_create_sobject_recordCreates a new record for a specified sObject.object_name, fields_map
platform_retrieve_sobject_recordRetrieves an existing sObject record by its ID.record_id, fields_to_retrieve
platform_update_sobject_recordUpdates an existing sObject record.record_id, fields_map
platform_delete_sobject_recordDeletes an sObject record.record_id
platform_describe_metadata_objectRetrieves metadata for a Salesforce object (fields, labels, types, etc.).object_name
platform_describe_metadata_fieldRetrieves metadata for a specific field on an sObject.object_name, field_name
platform_execute_apex_anonymousExecutes anonymous Apex code (use with caution, typically for admin/dev).apex_code
platform_execute_apex_restCalls a custom Apex REST endpoint.http_method, endpoint, request_body, headers
platform_start_flow_interviewLaunches a Salesforce Flow (screen flow or auto-launched).flow_api_name, input_variables_map
platform_execute_tooling_api_requestInteracts with the Salesforce Tooling API.http_method, endpoint_path, request_body
platform_execute_rest_api_requestMakes direct calls to the standard Salesforce REST API.http_method, endpoint_path, request_body, headers

Prerequisites

  • ACP Enabled in your Org: The Agentforce Context Protocol must be active and configured in your Salesforce organization.
  • User Permissions: The agent operates under the context of an authenticated Salesforce user. All actions performed by the agent via this Connector are subject to that user’s permissions, sharing rules, and field-level security.
  • Connected App (Potentially): Depending on the agent’s hosting environment and authentication method, a Salesforce Connected App might be required for secure OAuth 2.0 authentication.

Setup Instructions

The Salesforce Platform Connector is typically available by default in Salesforce environments where Agentforce and ACP are enabled. The primary “setup” involves ensuring:

  1. User Authentication: The AI agent or the system invoking the agent can securely authenticate to Salesforce as a specific user. This often involves OAuth 2.0 flows.
  2. Permissions: The authenticated user has the necessary permissions in Salesforce to perform the actions the agent will be asked to do (e.g., create/edit specific objects, execute Apex, run Flows, access specific API endpoints).
  3. Named Credentials (for Apex Callouts): If Tools within this connector (or custom Apex invoked by it) need to make callouts to external systems, those callouts should be configured via Named Credentials for security and manageability.

No separate installation package is usually required for the base Salesforce Platform Connector.

Common Use Cases

  • Automated Case Management: An agent creating, updating, or summarizing Cases based on customer interactions.
  • Data Entry and Enrichment: Agents populating or updating records (e.g., Leads, Contacts, Opportunities) from external data sources.
  • Complex Process Automation: Agents triggering Flows or custom Apex logic to orchestrate multi-step business processes.
  • Natural Language Data Interaction: Agents translating user questions into SOQL/SOSL queries to retrieve and present data, or updating records based on natural language commands.
  • Personalized User Assistance: Agents fetching user-specific data or preferences stored in custom objects.
  • Developer/Admin Assistance: Agents performing metadata checks or simple administrative tasks via Tooling API or Apex execution.

Troubleshooting Tips

  • Permission Errors: If an agent fails to perform an action, first verify the permissions of the Salesforce user it’s acting as. Check object permissions, field-level security, API access controls, and any relevant sharing rules.
  • SOQL/SOSL Query Errors: Ensure queries are syntactically correct and that the user has access to the queried objects and fields.
  • Flow Errors: Check the Flow’s run-time behavior and debug logs in Salesforce Setup if a Flow invoked by an agent fails.
  • Apex Errors: Review debug logs for any Apex exceptions. Ensure custom Apex code is robust and handles potential errors gracefully. Pay attention to CPU time limits and other governor limits.
  • API Call Errors: For direct REST or Tooling API calls, check the API response for specific error messages. Ensure the endpoint, method, and payload are correct.
  • Governor Limits: Be mindful of Salesforce governor limits, especially when agents perform bulk operations or complex queries. Design Tools and agent interactions to be efficient.

This Connector forms the bedrock for many AI-driven interactions within Salesforce, providing a powerful and flexible way to leverage your existing Salesforce investments.