Connecting to Salesforce
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
.
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.
We now need to enter in the required settings such as connected app name, email address, callback urls and OAuth scopes.
You can find more details on each of the settings needed in the table below:
Setting | Description | Value/Example |
---|---|---|
Connected App Name | Enter in a display name for the App inside Salesforce | E.g. Data Synchronisation Studio |
Email Address | Enter in a contact email for the App, this can be yours or a shared email | E.g. user@company.com |
Enable OAuth Settings | This allows you to enter the Callback URLs and OAuth Scopes, make sure this is checked | Check the checkbox so that it is true |
Callback URL | This is the localhost url listed in the Data Sync connection window | E.g. http://localhost:50563 |
OAuth Scopes | This 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.
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.
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.
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.
Make sure to click Allow access for Data Sync, when prompted in your browser, otherwise the connection will fail.
You can now select the object you want to connect to, and then click Connect & Create Library Connection to connect and save the connection.
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.
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.
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.
Connection Properties
Once you are connected you can edit the connection properties as you need to.
Property | Description |
---|---|
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. |
How to Guides
You can find the Salesforce how to guides here.