How do I connect Salesforce?
TL;DR: To let Ballet pull live Salesforce data (Opportunity, Contract, Line Items, Contact Roles, and more), create a Salesforce Connected App with OAuth 2.0 Client Credentials Flow, set a Run As integration user, and share your My Domain URL plus Consumer Key and Secret. Use a Flow HTTP callout instead when Salesforce only needs to push events into a Ballet webhook.
Back to: How do I connect CRM and support tools?
Which setup do you need?
This article focuses on outbound API. The inbound path is summarized at the end.
Outbound API: Connected App (Client Credentials)
What you will need
-
Salesforce System Administrator access (or equivalent)
-
Permission to create a Connected App (or External Client App)
-
A dedicated Salesforce integration user (recommended)
-
About 15–20 minutes
What you will share with Ballet
Share the Consumer Secret through a secure channel.
Step 1: Create an integration user
- In Salesforce, open Setup.
- Go to Users → Users → New User.
- Create a user such as
Ballet Integration. - Assign a profile or permission set that includes API Enabled and read access to the objects and fields Ballet needs.
- Make sure the user is Active.
Use least privilege where possible.
Step 2: Create the Connected App
-
In Setup, go to App Manager.
-
Click New Connected App. If your org shows New External Client App, use that instead.
-
Enter Connected App Name:
Ballet, leave the API Name default, and set your admin Contact Email. -
Under API (Enable OAuth Settings):
-
Select Enable OAuth Settings
-
Set Callback URL to
https://api.ballet.dev/auth/salesforce/callback(required by Salesforce; unused for Client Credentials) -
Select Enable Client Credentials Flow
-
Under Selected OAuth Scopes, add only Manage user data via APIs (
api)
-
-
Do not add
Perform requests at any time (refresh_token, offline_access)— that scope breaks Client Credentials. -
Click Save and wait a few minutes for activation.
Step 3: Set the Run As user
- In Setup, go to Manage Connected Apps.
- Open the
BalletConnected App and click Edit Policies. - Under Client Credentials Flow, set Run As to your integration user.
- If available, set Permitted Users to Admin approved users are pre-authorized.
- Assign the integration user's permission set to the Connected App if prompted, then Save.
If this step is skipped, authentication fails with: invalid_grant: no client credentials user enabled
Step 4: Copy the Consumer Key and Secret
- Open the Connected App → Manage Consumer Details.
- Complete identity verification if prompted.
- Copy Consumer Key (Client ID) and Consumer Secret (Client Secret).
Treat the Consumer Secret like a password. Store it in Ballet Secrets.
Step 5: Find your My Domain URL
- In Setup, search for My Domain.
- Copy your org URL (Production:
https://yourcompany.my.salesforce.com, Sandbox:https://yourcompany--partial.sandbox.my.salesforce.com).
Step 6: Optional connection test
curl -X POST "https://YOUR_MY_DOMAIN/services/oauth2/token" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CONSUMER_KEY" \
-d "client_secret=YOUR_CONSUMER_SECRET"
A successful response includes an access_token.
Outbound API: Pipedream Single Sign-On (SSO)
What you will need
- Salesforce System Administrator access to install packages for the initial sign in.
- About 5 minutes
Step 1: Connect using the built-in Salesforce connector
- In Ballet → Connectors, search for Salesforce.
- Select Sign in with Salesforce option.
Step 2: Install Pipedream package
-
When the pop up shows up, press Continue.
-
On the second page, click the link to install the package in your org.
-
You will be redirected to Salesforce. Select Install for All Users and install the package.
Step 3: Verify package installation
- In Salesforce, navigate to Setup → Search and look for Installed Packages and verify that Pipedream is installed.
- In Setup, search for External Client App Manager and verify that Pipedream is in the list.
<br />
Step 4: Continue sign in
- Once the package is installed, go back to Ballet and continue the sign in process.
- You will be redirected to a Salesforce pop up - enter your credentials.
- Once authorized, you will see this message:
Troubleshooting
Official Salesforce references
Inbound webhook: Flow HTTP callout (optional)
Use this when Salesforce should start a Ballet playbook.
- In Ballet, add a Webhook trigger and choose the Salesforce provider. Copy the trigger URL and store the bearer token in Secrets.
- In Salesforce, create a Named Credential / Flow HTTP Callout pointing at that URL with Authorization
Bearer <token>. - Send the record payload as JSON.
