Skip to main content

Connecting to Salesforce

info

Please note that from Version 6.0.3341 the Salesforce connector supports PKCE.

To get started open the connection window by clicking on Connect Data Source in either the source or target. Expand the Salesforce folder and then select the Salesforce Object connector.

You need to make a note of the OAuth redirect URL shown in the window as you will need this when configuring the app in Salesforce. For example this might be http://localhost:50563.

Salesforce Connector

Configure the App in Salesforce

To be able to connect in Data Syn you need to create an app in Salesforce to allow the connection and set the permission level. This will create a consumer key and consumer secret needed to authorise the connection and connect in Data Sync.

To create an app, log into salesforce and go to Setup > Apps > App Manager and choose New Connected App.

Create App

We now need to enter in the required settings such as connected app name, email address, callback urls and OAuth scopes.

New App Details

You can find more details on each of the settings needed in the table below:

SettingDescriptionValue/Example
Connected App NameEnter in a display name for the App inside SalesforceE.g. Data Synchronisation Studio
Email AddressEnter in a contact email for the App, this can be yours or a shared emailE.g. user@company.com
Enable OAuth SettingsThis allows you to enter the Callback URLs and OAuth Scopes, make sure this is checkedCheck the checkbox so that it is true
Callback URLThis is the localhost url listed in the Data Sync connection windowE.g. http://localhost:50563
OAuth ScopesThis defines the permissions to enable the connection.Make sure to add Access and manage your data (api) & Perform requests on your behalf at any time (refresh_token, offline_access) at a minimum

Then click Save to create the App.

caution

Please note that it will take 10 minutes for you app to be applied. If you try to connect during this time your connection to Salesforce may error.

Your App settings will now be displayed in the browser.

Copy the Consumer Key and Consumer Secret which can be found under API(Enable OAuth Settings) to enter into the connection window in Data Sync.

Consumer Key and Secret

Connect in Data Sync

Go back to Data Sync and enter in your Consumer Key and Secret into the connection window and then click Authorise Connection.

Authorise Connection

This will open a popup stating Waiting for OAuth Authorization Code and your browser will redirect to Salesforce for you to login and enable the connection.

Waiting Popup

Make sure to click Allow access for Data Sync, when prompted in your browser, otherwise the connection will fail.

Allow Access

You can now select the object you want to connect to, and then click Connect & Create Library Connection to connect and save the connection.

Add to Connection Library

Enter in a name for the connection and press OK. This will now appear in the connection tree under the Salesforce section.

Connection Library

Once you have saved the connection you can make use of the connection tree, where you can drag and drop the object you wish to connect to into either the source or the target or you can right click and choose either Connect to Source or Connect to Target.

You can also preview the data by expanding the Objects folder, right clicking on the object and selecting preview.

Connection Library

Edit Connection

If your password has changed or the connection has not been used for sometime you may need to re-authorise the connection. To do this right click onto the main Salesforce connection and select Properties.

Edit Connection

This will open a new window

SOQL Query

If you want to Query Salesforce you can use the SOQL Query function available below the Objects folder. This will use the default query SELECT Id, Name FROM Account but you can edit this to be the query you need.

SOQL Query

Connection Properties

Once you are connected you can edit the connection properties as you need to.

Connection Properties

PropertyDescription
IsSandboxUserConnect to the Sandbox Login URL.
ObjectNameThe Salesforce object to connect to.
ReadBatchSizeNumber of records to return per Salesforce request in Incremental Mode.
QueryWhereCommandThe SOQL WHERE condition to append the SELECT Query.

How to Guides

You can find the Salesforce how to guides here.