Config
You must enter the following settings when configuring this source:
If using
OAuth based authentication:
If using
Password based authentication:
Optional settings:
How to get your client_id, client_secret, and refresh_token
Find your client_id and client_secret
- Sign into your Salesforce account.
- Create a Connected App and Enable OAuth Settings for API Integration
by following this Salesforce documentation.
- Use the following URL as the callback URL: https://login.salesforce.com/services/oauth2/success
- When you are at the step to choose which OAuth Scopes to authorize, you must give your
Connected App at least these 2 scopes:
- Manage (
api) - Perform requests at any time (
refresh_token)
- Manage (
- After you created a Connected App, go to your Setup and click on the Home tab.
- On the left sidebar under the Platform tools > Apps > App Manager, click on App Manager.
- Find the row that contains the app you just created. On the furthest right column, click the dropdown caret icon and click View.
- Under the API (Enable OAuth Settings) section, find the subsection labeled Consumer Key and Secret and click the button Manage Consumer Details.
- A new page will open, displaying your Consumer Key (which is your
client_id) and Consumer Secret (which is yourclient_secret).
Authorize your Connected App
- Construct a URL with the following format:
https://[your_salesforce_domain].my.salesforce.com/services/oauth2/authorize?client_id=[client_id]&redirect_uri=https://login.salesforce.com/services/oauth2/success&response_type=code
- Open that URL in a browser.
- Authorize your Connected App to have API access to your Salesforce account.
- Once you authorize, you’ll be redirect to a URL like this:
https://login.salesforce.com/services/oauth2/success?code=[code]. - Note the value of the
codeURL parameter, it’ll be used to get arefresh_token.
Get a refresh_token
Open a terminal and make the following POST request:
Once you execute the above CURL command successfully,
you’ll receive a response that could look like this:
refresh_token, it’ll be used when you configure this source.
Additional resources in case you get lost
- https://stackoverflow.com/questions/12794302/salesforce-authentication-failing/29112224#29112224
- https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_oauth_and_connected_apps.htm
- https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_web_server_flow.htm&type=5
Schema
The available schema depends on the objects in your Salesforce account. Some example schema can include the following (depending on your account):- AIApplication
- AIApplicationConfig
- AIInsightAction
- AIInsightFeedback
- AIInsightReason
- AIInsightValue
- AIPredictionEvent
- AIRecordInsight
- AcceptedEventRelation
- Account
- …
- WorkTypeFeed
- WorkTypeGroup
- WorkTypeGroupFeed
- WorkTypeGroupHistory
- WorkTypeGroupMember
- WorkTypeGroupMemberFeed
- WorkTypeGroupMemberHistory
- WorkTypeGroupShare
- WorkTypeHistory
- WorkTypeShare
- and more…