Salesforce
This page contains the setup guide and reference information for the Salesforce source connector.
Prerequisites
- Salesforce Account with Enterprise access or API quota purchased
- (Optional, Recommended) Dedicated Salesforce user
- (For Airbyte Open Source) Salesforce OAuth credentials
To use this connector, you'll need at least the Enterprise edition of Salesforce or the Professional Edition with API access purchased as an add-on. Reference the Salesforce docs about API access for more information.
Setup guide
Step 1: (Optional, Recommended) Create a read-only Salesforce user
While you can set up the Salesforce connector using any Salesforce user with read permission, we recommend creating a dedicated read-only user for Airbyte. This allows you to granularly control the data Airbyte can read.
To create a dedicated read only Salesforce user:
- Log in to Salesforce with an admin account.
- On the top right of the screen, click the gear icon and then click Setup.
- In the left navigation bar, under Administration, click Users > Profiles. The Profiles page is displayed. Click New profile.
- For Existing Profile, select Read only. For Profile Name, enter Airbyte Read Only User.
- Click Save. The Profiles page is displayed. Click Edit.
- Scroll down to the Standard Object Permissions and Custom Object Permissions and enable the Read checkbox for objects that you want to replicate via Airbyte.
- Scroll to the top and click Save.
- On the left side, under Administration, click Users > Users. The All Users page is displayed. Click New User.
- Fill out the required fields:
- For License, select Salesforce.
- For Profile, select Airbyte Read Only User.
- For Email, make sure to use an email address that you can access.
- Click Save.
- Copy the Username and keep it accessible.
- Log into the email you used above and verify your new Salesforce account user. You'll need to set a password as part of this process. Keep this password accessible.
For Airbyte Open Source: Obtain Salesforce OAuth credentials
If you are using Airbyte Open Source, you will need to obtain the following OAuth credentials to authenticate:
- Client ID
- Client Secret
- Refresh Token
To obtain these credentials, follow this walkthrough with the following modifications:
- If your Salesforce URL is not in the
X.salesforce.com
format, use your Salesforce domain name. For example, if your Salesforce URL isawesomecompany.force.com
then use that instead ofawesomecompany.salesforce.com
. - When running a curl command, run it with the
-L
option to follow any redirects. - If you created a read-only user, use the user credentials when logging in to generate OAuth tokens.
Step 2: Set up the Salesforce connector in Airbyte
For Airbyte Cloud:
- Log in to your Airbyte Cloud account.
- In the left navigation bar, click Sources. In the top-right corner, click + New source.
- Find and select Salesforce from the list of available sources.
- Enter a Source name of your choosing to help you identify this source.
- To authenticate: For Airbyte Cloud: Click Authenticate your account to authorize your Salesforce account. Airbyte will authenticate the Salesforce account you are already logged in to. Please make sure you are logged into the right account.
- Toggle whether your Salesforce account is a Sandbox account or a production account.
- (Optional) For Start Date, use the provided datepicker or enter the date programmatically in either
YYYY-MM-DD
orYYYY-MM-DDTHH:MM:SSZ
format. The data added on and after this date will be replicated. If this field is left blank, Airbyte will replicate the data for the last two years by default. Please note that timestamps are in UTC. - (Optional) In the Filter Salesforce Object section, you may choose to target specific data for replication. To do so, click Add, then select the relevant criteria from the Search criteria dropdown. For Search value, add the search terms relevant to you. You may add multiple filters. If no filters are specified, Airbyte will replicate all data.
- Click Set up source and wait for the tests to complete.
For Airbyte Open Source:
- Navigate to your Airbyte Open Source dashboard.
- In the left navigation bar, click Sources. In the top-right corner, click + New source.
- Find and select Salesforce from the list of available sources.
- Enter a Source name of your choosing to help you identify this source.
- To authenticate: For Airbyte Open Source: Enter your Client ID, Client Secret, and Refresh Token.
- Toggle whether your Salesforce account is a Sandbox account or a production account.
- (Optional) For Start Date, use the provided datepicker or enter the date programmatically in either
YYYY-MM-DD
orYYYY-MM-DDTHH:MM:SSZ
format. The data added on and after this date will be replicated. If this field is left blank, Airbyte will replicate the data for the last two years by default. Please note that timestamps are in UTC. - (Optional) In the Filter Salesforce Object section, you may choose to target specific data for replication. To do so, click Add, then select the relevant criteria from the Search criteria dropdown. For Search value, add the search terms relevant to you. You may add multiple filters. If no filters are specified, Airbyte will replicate all data.
- Click Set up source and wait for the tests to complete.
Supported sync modes
The Salesforce source connector supports the following sync modes:
- (Recommended) Incremental Sync - Append + Deduped
- Full Refresh - Overwrite
- Full Refresh - Append
- Incremental Sync - Append
- (Recommended) Incremental Sync - Append + Deduped
Supported Objects
The Salesforce connector supports reading both Standard Objects and Custom Objects from Salesforce. Each object is read as a separate stream. See a list of all Salesforce Standard Objects here.
Airbyte allows exporting all available Salesforce objects dynamically based on:
- If the authenticated Salesforce user has the Role and Permissions to read and fetch objects
- If the salesforce object has the queryable property set to true. Airbyte can only fetch objects which are queryable. If you don’t see an object available via Airbyte, and it is queryable, check if it is API-accessible to the Salesforce user you authenticated with.
Limitations & Troubleshooting
Expand to see details about Salesforce connector limitations and troubleshooting.
Connector limitations
Rate limiting
The Salesforce connector is restricted by Salesforce’s Daily Rate Limits. The connector syncs data until it hits the daily rate limit, then ends the sync early with success status, and starts the next sync from where it left off. Note that picking up from where it ends will work only for incremental sync, which is why we recommend using the Incremental Sync - Append + Deduped sync mode.
A note on the BULK API vs REST API and their limitations
Syncing Formula Fields
The Salesforce connector syncs formula field outputs from Salesforce. If the formula of a field changes in Salesforce and no other field on the record is updated, you will need to reset the stream and sync a historical backfill to pull in all the updated values of the field.
Syncing Deletes
The Salesforce connector supports retrieving deleted records from the Salesforce recycle bin. For the streams which support it, a deleted record will be marked with isDeleted=true
. To find out more about how Salesforce manages records in the recycle bin, please visit their docs.
Usage of the BULK API vs REST API
Salesforce allows extracting data using either the BULK API or REST API. To achieve fast performance, Salesforce recommends using the BULK API for extracting larger amounts of data (more than 2,000 records). For this reason, the Salesforce connector uses the BULK API by default to extract any Salesforce objects, unless any of the following conditions are met:
- The Salesforce object has columns which are unsupported by the BULK API, like columns with a
base64
orcomplexvalue
type - The Salesforce object is not supported by BULK API. In this case we sync the objects via the REST API which will occasionally cost more of your API quota. This includes the following objects:
- AcceptedEventRelation
- Attachment
- CaseStatus
- ContractStatus
- DeclinedEventRelation
- FieldSecurityClassification
- KnowledgeArticle
- KnowledgeArticleVersion
- KnowledgeArticleVersionHistory
- KnowledgeArticleViewStat
- KnowledgeArticleVoteStat
- OrderStatus
- PartnerRole
- RecentlyViewed
- ServiceAppointmentStatus
- ShiftStatus
- SolutionStatus
- TaskPriority
- TaskStatus
- UndecidedEventRelation
More information on the differences between various Salesforce APIs can be found here.
If you set the Force Use Bulk API
option to true
, the connector will ignore unsupported properties and sync Stream using BULK API.
Troubleshooting
Tutorials
Now that you have set up the Salesforce source connector, check out the following Salesforce tutorials:
- Replicate Salesforce data to BigQuery
- Replicate Salesforce and Zendesk data to Keen for unified analytics
- Check out common troubleshooting issues for the Salesforce source connector on our Airbyte Forum.