Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.prisme.ai/llms.txt

Use this file to discover all available pages before exploring further.

Salesforce The Salesforce app provides read/write access to a Salesforce org through the Salesforce REST API v62.0. It can be used either as a Builder app (automations call Salesforce operations directly) or as a remote MCP server consumed by an AI agent — covering single-record CRUD on Accounts, Contacts, Leads and Opportunities, SOQL/SOSL queries, the Composite endpoints, Bulk API 2.0 ingest/query, the Tooling API (Apex + metadata records), Process rules and Approval submissions, Quick Actions, Reports & Dashboards and Metadata package deploys. Authentication is per-user via OAuth2 authorization-code (PKCE), with a service-to-service JWT Bearer fallback when configured.

CRM Records

Create, read, update and delete sObjects (Accounts, Contacts, Leads, Opportunities, custom objects) and run SOQL / SOSL searches across them

Bulk & Composite

Bulk API 2.0 ingest/query jobs and Composite endpoints for high-volume, multi-record and atomic operations

Reports & Process

Reports, dashboards, approval processes, quick actions, Tooling API and Metadata deploys

Prerequisites

  • A Salesforce org with administrator access (Production, Developer Edition or Sandbox).
  • A Connected App created in Setup > App Manager > New Connected App. Enable OAuth Settings, paste the value of the auto-computed OAuth Redirect URI (visible in the app instance configuration after install) into the Connected App’s Callback URL field, and select the OAuth scopes api refresh_token offline_access. See the Salesforce Connected App docs.
  • The Connected App’s Consumer Key and Consumer Secret to fill oauthClientId / oauthClientSecret.
  • The Login Host matching the org type: https://login.salesforce.com for production / Developer Edition, https://test.salesforce.com for sandbox, or a custom My Domain host like https://<mydomain>.my.salesforce.com.
  • (Optional) For service-to-service auth without a user session, configure JWT Bearer: enable Use digital signatures on the Connected App, upload the matching public certificate, pre-authorize the runtime user for the Connected App, and fill jwtUsername + jwtPrivateKey on the app instance.

Installation

  1. Go to Apps in your workspace
  2. Search for Salesforce and install it
  3. Open the app instance configuration and fill in the required fields

Configuration

FieldDescription
Salesforce Login HostOAuth host for this org (https://login.salesforce.com, https://test.salesforce.com or a custom *.my.salesforce.com). Used as the base for the OAuth authorize/token/revoke endpoints AND as the default fallback API base before the OAuth token returns the real instance_url.
REST API VersionSalesforce REST API version (path segment after /services/data/). Defaults to v62.0. Override per tenant if you need an older version.
OAuth Client ID (Consumer Key)Connected App “Consumer Key”. Stored as a workspace secret.
OAuth Client Secret (Consumer Secret)Connected App “Consumer Secret”. Stored as a workspace secret.
OAuth Redirect URIAuto-populated on install. Copy this exact value into the Connected App’s Callback URL field.
OAuth ScopesSpace-separated OAuth scopes requested at authorize time. Defaults to api refresh_token offline_access.
JWT Bearer UsernameSalesforce username for the JWT Bearer flow (optional, service-to-service). Leave blank to disable.
JWT Bearer Private Key (PEM)RSA private key (PEM) matching the public certificate uploaded to the Connected App. Stored as a workspace secret.
MCP EndpointAuto-populated on install — URL of the MCP endpoint for this instance
MCP API KeyAuto-populated on install — signed key used in the mcp-api-key header. Do not modify
MCP Endpoint and MCP API Key are generated automatically by the onInstall flow and are only needed to expose this instance as an MCP server (see the next tab).

Connecting a user (OAuth)

The app supports two authentication modes that are tried in order on every call:
  1. Per-user OAuth session — each end-user clicks through the Salesforce authorize page once, the tokens are stored in their personal user.salesforce.oauth.* namespace and auto-refreshed. To initiate the flow, call Salesforce.connect from a tenant automation — it returns a connect_url to surface to the user.
  2. Per-tenant JWT Bearer (fallback) — used when no per-user session exists. The Connected App exchanges jwtUsername + jwtPrivateKey against {loginHost}/services/oauth2/token and caches the access token for ~30 minutes.
If neither is available the call returns error: "Salesforce not authenticated".

Available Instructions

Every instruction resolves credentials from the workspace configuration through the buildAppAuth helper. Arguments correspond directly to the Salesforce REST API parameters — path params, query params and JSON body fields. Most write operations accept a free-form body object whose keys are Salesforce field API names (case-sensitive).

Discovery

InstructionArguments
listVersions
listResources
getLimits
getRecentItemslimit

sObject Metadata

InstructionArguments
describeGlobal
describeSObjectsObjectName*
describeSObjectBasicsObjectName*

Records (CRUD)

InstructionArguments
createRecordsObjectName, body (Salesforce field API names)
getRecordsObjectName, recordId, fields
getRecordFieldsObjectName, recordId, fieldName*
updateRecordsObjectName, recordId, body*
upsertRecordsObjectName, externalIdField, externalIdValue, body
deleteRecordsObjectName, recordId
getDeletedRecordssObjectName, start, end*
getUpdatedRecordssObjectName, start, end*

SOQL & SOSL Queries

InstructionArguments
runQueryq* (SOQL)
runQueryAllq* (SOQL, includes deleted/archived)
runSearchq* (SOSL)
runParameterizedSearchbody* (structured search request)
getQueryNextqueryLocator*

Composite & Multi-Record

InstructionArguments
runCompositebody* (allOrNone, collateSubrequests, compositeRequest)
runCompositeBatchbody* (haltOnError, batchRequests)
runCompositeGraphbody* (graphs)
createSObjectTreesObjectName, body (records)
createRecordsbody* (allOrNone, records)
createRecordsForTypesObjectName, body (allOrNone, records)
updateRecordsbody* (allOrNone, records)
deleteRecordsids*, allOrNone
getRecordsCollectionsObjectName, ids, fields
upsertRecordsForTypesObjectName, externalIdField, body* (allOrNone, records)

Bulk API 2.0 — Ingest

InstructionArguments
createIngestJobbody* (object, operation, externalIdFieldName, contentType, lineEnding, columnDelimiter, assignmentRuleId)
uploadIngestDatajobId, rawBody (CSV)
updateIngestJobjobId, body (stateUploadComplete / Aborted)
getIngestJobjobId*
listIngestJobsisPkChunkingEnabled, jobType, queryLocator
getIngestSuccessfuljobId*
getIngestFailedjobId*
getIngestUnprocessedjobId*
deleteIngestJobjobId*

Bulk API 2.0 — Query

InstructionArguments
createQueryJobbody* (operation, query, contentType, lineEnding, columnDelimiter)
getQueryJobjobId*
listQueryJobsisPkChunkingEnabled, jobType, concurrencyMode
getQueryJobResultsjobId*, locator, maxRecords
updateQueryJobjobId, body (stateAborted)
deleteQueryJobjobId*

Tooling API

InstructionArguments
runToolingQueryq* (SOQL on Tooling sObjects: CustomField, ApexClass, FlexiPage, …)
describeToolingGlobal
describeToolingSObjectsObjectName*
createToolingRecordsObjectName, body
getToolingRecordsObjectName, recordId
updateToolingRecordsObjectName, recordId, body*
deleteToolingRecordsObjectName, recordId
executeAnonymousApexanonymousBody*
getApexCompletionstype (apex / visualforce)
runApexTestsSyncbody* (tests)
runApexTestsAsyncbody* (classNames, classids, suiteNames, suiteids, maxFailedTests, testLevel, tests)

Process & Approvals

InstructionArguments
listProcessRules
listProcessRulesForObjectsObjectName*
triggerProcessRulesObjectName, ruleId, body* (contextIds)
listApprovals
submitApprovalbody* (requests)

Quick Actions

InstructionArguments
listQuickActions
describeQuickActionactionName*
invokeQuickActionactionName*, body

Analytics — Reports & Dashboards

InstructionArguments
listReports
describeReportreportId*, includeDetails
runReportreportId*, includeDetails, body
getReportInstancereportId, instanceId
listReportInstancesreportId*
listDashboards
describeDashboarddashboardId*
runDashboarddashboardId*
getDashboardStatusdashboardId*

Metadata Deploy

InstructionArguments
deployMetadatabody* (deployOptions, file)
getMetadataDeployStatusrequestId*, includeDetails

OAuth Session

InstructionArguments
connect— (returns connect_url for the end-user to click)
disconnect— (revokes the current OAuth session)
Arguments flagged with * are required.

DSUL Examples

Search high-value Accounts (SOQL)

- Salesforce.runQuery:
    q: "SELECT Id, Name, AnnualRevenue, Industry FROM Account WHERE AnnualRevenue > 1000000 ORDER BY AnnualRevenue DESC LIMIT 50"
    output: accounts

Create a Lead

- Salesforce.createRecord:
    sObjectName: Lead
    body:
      FirstName: Georges
      LastName: Abitbol
      Company: La Classe Américaine
      Email: georges.abitbol@example.com
      LeadSource: Web
    output: lead

Update an Opportunity stage and amount

- Salesforce.updateRecord:
    sObjectName: Opportunity
    recordId: '{{opportunity_id}}'
    body:
      StageName: Closed Won
      Amount: 250000
    output: result

Bulk insert Contacts via Bulk API 2.0

- Salesforce.createIngestJob:
    body:
      object: Contact
      operation: insert
      contentType: CSV
      lineEnding: LF
    output: job
- Salesforce.uploadIngestData:
    jobId: '{{job.id}}'
    rawBody: |
      FirstName,LastName,Email
      Jean,Dupont,jean.dupont@example.com
      Marie,Martin,marie.martin@example.com
    output: upload
- Salesforce.updateIngestJob:
    jobId: '{{job.id}}'
    body:
      state: UploadComplete
    output: launched

Run a Report and download the results

- Salesforce.runReport:
    reportId: '{{report_id}}'
    includeDetails: true
    output: report

Error Handling

HTTP StatusErrorSolution
400Bad RequestMalformed SOQL, invalid field API name, missing required field. Check the fields array returned by Salesforce for formField errors
401UnauthorizedAccess token expired or revoked. Reconnect via the connect tool
403ForbiddenThe Salesforce profile lacks API access or object/field-level permissions
404Not FoundsObject name or record ID does not exist. Note that sObject API names are case-sensitive
422ValidationValidation rules, picklist constraints or required-field errors on the sObject
429Rate LimitedOrg API limit reached (DailyApiRequests). Inspect usage via versions action=getLimits and back off
500Server ErrorTransient Salesforce error. Retry with exponential backoff

Common Issues

“Not configured” — The app instance has no Connected App credentials. Create a Connected App in Salesforce Setup > App Manager, then fill oauthClientId / oauthClientSecret on the app instance. “Invalid API key” (MCP) — The mcp-api-key header does not match the central app secret. Reinstall the app instance to regenerate a signed key. “Credentials lookup failed” — The MCP endpoint could not reach the getConfig webhook of the installed app. Verify that the app instance is still installed in the expected workspace. “Salesforce not authenticated” — Neither a per-user OAuth session nor a JWT Bearer fallback is available. Call Salesforce.connect (App mode) or the connect MCP tool to start the OAuth flow, or fill jwtUsername + jwtPrivateKey on the app instance. redirect_uri_mismatch at callback time — The oauthCallbackUrl value displayed in the app instance config must be pasted verbatim into the Connected App’s Callback URL field, including the path. Sandbox vs production hosts also matter: use https://test.salesforce.com as loginHost for sandboxes. invalid_grant on JWT Bearer — The runtime user is not pre-authorized for the Connected App, the private key does not match the uploaded certificate, or Use digital signatures is not enabled on the Connected App.

External Resources

Salesforce REST API

Official Salesforce REST API documentation (v62.0)

Tool Agents

Plug MCP servers into AI Knowledge agents