Connectors

Connecting to Salesforce

If you have upgraded your Data Sync version and are updating your Salesforce connection then the details you need to add to your Salesforce App registration to make the connection work are:

  • The Callback URL to the URL shown in the Data Sync connection window. By default this is http://localhost:50563
  • The OAuth Scope, refresh_token offline_access, to the list of selected OAuth scopes.

You can then save these changes in Salesforce and then go back to Data Sync to authorise and update your connection.

The following documentation relates to Data Sync Version 3.0.2066 and above, if you are using an older version of Data Sync then please see the previous connection details.

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

Salesforce Connector

Make a note of the OAuth redirect URL http://localhost:50563 as you will need this when configuring the app in Salesforce.

Configure the App in Salesforce

We now need to create an app in Salesforce to enable Data Sync to connect. This will create a consumer key and consumer secret that you will need to authorise the connection.

To do this 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

Settings

Connected App Name
Type in a title for the App in the Connected App Name field. For this example we have used Data Synchronisation Studio

Email Address
Enter an email address, this can be your email or a shared email.

Enable OAuth Settings
Make sure the checkbox is checked. This will allow us to enter the Callback URLs and OAuth Scopes.

Callback URL
This needs to be the local port defined in the connection window of Data Sync http://localhost:50563

OAuthScopes You need to add the following scopes to enable the connection and get a refresh token. Access and manage your data (api) and Perform requests on your behalf at any time (refresh_token, offline_access).

Then click Save to create the App.

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

Authorise and Save the Connection

Now go back to Data Sync and enter in your Consumer Key and Secret, click Authorise to authorise the 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 Allow access for Data Sync when prompted otherwise the connection will fail.

Allow Access

You can now select the object you want to connect to and then click by clicking Connect & Update Library Connection.

Add to Connection Library

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

Save the Connection

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

Connection Library

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 what you need.

SOQL Query

Connection Properties

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

Connection Properties

IsSandboxUser
Connect to the Sandbox Login URL.

ObjectName
The Salesforce object to connect to.

ReadBatchSize
Number of records to return per Salesforce request in Incremental Mode.

QueryWhereCommand
The SOQL WHERE condition to append the SELECT Query.