Guides
Data Activation
- Models
- Syncs
Data Integration
- Sources
- Destinations
- Salesforce
- HubSpot
- Zoho
- Braze
- CleverTap
- Klaviyo
- Iterable
- Mailchimp
- Facebook Custom Audiences
- Google Ads
- Google Analytics
- Mixpanel
- Amplitude
- Databricks
- Zendesk
- Intercom
- Slack
- Microsoft teams
- Shopify
- Facebook product catalog
- Stripe
- Salesforce Consumer Goods Cloud
- Airtable
- Google Sheets - Service Account
- Microsoft Excel
- SFTP
- PostgreSQL
- MariaDB
- Oracle
- HTTP
- MicrosoftSQL
Workspace Management
Security & Compliance
Salesforce
Salesforce Connector Configuration and Credential Retrieval Guide
Prerequisite Requirements
Before initiating the Salesforce connector setup, ensure you have an appropriate Salesforce edition. This setup requires either the Enterprise edition of Salesforce, the Professional Edition with an API access add-on, or the Developer edition. For further information on API access within Salesforce, please consult the Salesforce documentation.
If you need a Developer edition of Salesforce, you can register at Salesforce Developer Signup.
Destination Setup
For AI Squared Open Source, certain OAuth credentials are necessary for authentication. These credentials include:
- Access Token
- Refresh Token
- Instance URL
- Client ID
- Client Secret
Login
Start by logging into your Salesforce account with admin rights. Look for a Setup option in the menu at the top-right corner of the screen and click on it.
App Manager
On the left side of the screen, you’ll see a menu. Click on Apps, then App Manager.
New Connected App
Find a button that says New Connected App at the top right and click it.
Fill the details
You’ll be taken to a page to set up your new app. Here, you need to fill in some basic info: the name you want for your app, its API name (a technical identifier), and your email address.
Enable OAuth Settings
Now, look for a section named API (Enable OAuth Settings) and check the box for Enable OAuth Settings. There’s a box for a Callback URL; type in https://login.salesforce.com/ there. You also need to pick some permissions from a list called Selected OAuth Scopes. Choose these: Access and manage your data (api), Perform requests on your behalf at any time (refresh_token, offline_access), Provide access to your data via the Web (web), and then add them to your app settings.
Save
Click Save to keep your new app’s settings.
Apps > App Manager
Go back to where all your apps are listed (under Apps > App Manager), find the app you just created, and click Manage next to it.
OAuth policies
On the next screen, click Edit. There’s an option for OAuth policies; under Permitted Users, choose All users may self-authorize. Save your changes.
View App
Head back to your app list, find your new app again, and this time click View.
Save Permissions
Once more, go to the API (Enable OAuth Settings) section. Click on Manage Consumer Details. You need to write down two things: the Consumer Key and Consumer Secret. These are important because you’ll use them to connect Salesforce.
Getting the Code
First, open Salesforce in your preferred web browser. To get the code, open a new tab and type in a special web address (URL). You’ll need to change CONSUMER_KEY to the Consumer Key you noted earlier. Also, replace INSTANCE_URL with your specific Salesforce instance name (for example, ours is multiwoven-dev in https://multiwoven-dev.develop.lightning.force.com/).
https://INSTANCE_URL.salesforce.com/services/oauth2/authorize?response_type=code&client_id=CONSUMER_KEY&redirect_uri=https://login.salesforce.com/
If you see any alerts asking for permission, go ahead and allow them. After that, the browser will take you to a new webpage. Pay attention to this new web address because it contains the code you need. Save the code available in the new URL as shown in the below example.
https://login.salesforce.com/services/oauth2/success?code=aPrx0jWjRo8KRXs42SX1Q7A5ckVpD9lSAvxdKnJUApCpikQQZf.YFm4bHNDUlgiG_PHwWQ%3D%3Dclient_id = "3MVG9pRzvMkjMb6kugcl2xWhaCVwiZPwg17wZSM42kf6HqY4jmw6ocKKoYYLz4ztHqM1vWxMbZB6sxQQU"
Getting the Access Token and Refresh Token
Now, you’ll use a tool called curl to ask for more keys, known as tokens. You’ll type a command into your computer that includes the special code you just got. Remember to replace CODE with your code, and also replace CONSUMER_KEY and CONSUMER_SECRET with the details you saved from when you set up the app in Salesforce.
curl -X POST https://INSTANCE_URL.salesforce.com/services/oauth2/token?code=CODE&grant_type=authorization_code&client_id=CONSUMER_KEY&client_secret=CONSUMER_SECRET&redirect_uri=https://login.salesforce.com/
After you send this command, you’ll get back a response that includes your access_token and refresh_token. These tokens are what you’ll use to securely access Salesforce data.
{
"access_token": "access_token",
"refresh_token": "refresh_token",
"signature": "signature",
"scope": "scopes",
"id_token": "id_token",
"instance_url": "https://multiwoven-dev.develop.my.salesforce.com",
"id": "id",
"token_type": "Bearer",
"issued_at": "1707415379555",
"api_instance_url": "https://api.salesforce.com"
}
This way, you’re essentially getting the necessary permissions and access to work with Salesforce data in more detail.
Mode | Supported (Yes/No/Coming soon) |
---|---|
Incremental sync | Yes |
Full refresh | Coming soon |
Stream | Supported (Yes/No/Coming soon) |
---|---|
Account | Yes |
Was this page helpful?