Connect Salesforce to your agents for CRM data and Chatter.
Overview
A Salesforce credential lets agents query and update CRM records, access Chatter feeds, and react to webhook triggers for leads, opportunities, and cases.
Why "Bring Your Own Key" (BYOK)?
Salesforce connected apps live in your org. BYOK keeps OAuth credentials and API access under your control.
Benefits:
- Your org — production or sandbox, under your Salesforce admin policies
- Scoped access — request only the OAuth scopes your agents need
- Your rate limits — API usage counts against your org limits
Prerequisites
Before connecting, you'll need:
- A Salesforce account with permission to create connected apps
- Access to Setup → App Manager in your Salesforce org
Step 1: Create a connected app
- In Salesforce, go to Setup → App Manager
- Click New Connected App
- Fill in basic information (name, contact email)
- Enable Enable OAuth Settings
- Set the callback URL:
| Environment | Callback URL |
|---|---|
| Production | https://app.inference.sh/settings/secrets/oauth/salesforce |
| Staging | https://app.staging.inference.sh/settings/secrets/oauth/salesforce |
| Local dev | http://localhost:3000/settings/secrets/oauth/salesforce |
- Select OAuth scopes based on your needs (see Capabilities)
- Save and copy the Consumer Key (client ID) and Consumer Secret
Step 2: Connect in inference shell
Configure credentials
- Go to Vault → credentials
- Find Salesforce and click Configure
- Enter:
- Client ID (
SALESFORCE_CLIENT_ID) - Client Secret (
SALESFORCE_CLIENT_SECRET)
- Client ID (
- Optional: set Is sandbox (
SALESFORCE_IS_SANDBOX) totrueif connecting to a sandbox org (usestest.salesforce.comfor login) - Click Save credentials
Authorize the connection
- Click Connect
- Sign in to Salesforce and approve the requested permissions
- Done — the credential status shows Connected
Capabilities
| Capability | Description | Required Scopes |
|---|---|---|
salesforce.api | Access Salesforce REST and SOAP APIs | api |
salesforce.chatter | Access Chatter feeds and posts | chatter_api |
salesforce.full | Full access (includes API and Chatter) | full |
Triggers
| Trigger | Description | Required Scopes |
|---|---|---|
salesforce.lead.created | New lead created | api |
salesforce.opportunity.stage_changed | Opportunity stage changed | api |
salesforce.case.created | New support case created | api |
Using in apps
Declare Salesforce requirements in your app:
yaml
1# inf.yml2credentials:3 - key: salesforce.api4 description: Query and update CRM records56 - key: salesforce.chatter7 description: Post to Chatter feeds8 optional: trueAt runtime, your app receives:
bash
1SALESFORCE_ACCESS_TOKEN=oauth2-access-token2SALESFORCE_INSTANCE_URL=https://your-org.my.salesforce.comUse the instance URL and access token with the Salesforce REST API.