You can connect Salesforce with Treasure Data for greater control over your Salesforce data and better integration with the other business applications in your marketing and sales operations stack.

Integrating Salesforce with Treasure Data makes it easy to:

For sample workflows on importing data from Salesforce, go to Treasure Boxes.

If you don’t have a Treasure Data account yet, contact us so that we can get you set up.

Continue to the following topics:



SFDC import supports these authentication types:

Using Session ID for authentication is not supported for import.

Session ID is supported for the Salesforce Export Integration only.

Connect to Salesforce Using TD Console

Connecting to Salesforce using the TD Console is quick and easy. Alternatively, you can create a Salesforce connection using the command line. The import integration supports credentials; you need a client ID and client secret to authenticate using credentials.

Allow TD to Access Salesforce using Salesforce

These instructions guide you to locate the client ID and client secret that is necessary to authenticate using credentials.

This is the guide for Lightning Experience UI.

  1. Go to Setup > Apps > App Manager.

  2. Select New Connected App.

  3. Set some values and check Enable OAuth Settings. Then, grant OAuth permission scope.
  4. Click Save. Activation can take up to 10 minutes.

  5. Go to Setup > Apps > App Manager.
  6. Locate the connected app, click , and then select View.
  7. Write down or copy your Consumer Key (client_id) and Consumer Secret (client_secret).

Create New Connection in TD Console

  1. Open TD Console.

  2. Navigate to Integrations Hub > Catalog and search for Salesforce.

    1. To authenticate with your credentials, enter your username (your email) and password, as well as your Client ID, Client Secret, and Security Token.

    2. In the dialog box, enter as the login URL. Remove unnecessary letters from Login URL parameter.

  3. Select Continue.
  4. Give your connection a descriptive name and select Create Connection.

Validate Your Salesforce Connection

To validate the user permission, make sure to use Salesforce to validate:

Without properly configured authority and access, you might encounter access restriction errors. For example:

Response not 2xx: 
400 Bad Request {"error":"invalid_grant","error_description":"authentication failure"}

Transfer Your Salesforce Account Data in Treasure Data

After creating the authenticated connection, you are automatically taken to Authentications.

  1. Search for the connection you created. 

  2. Select New Source.

  3. Type a name for your Source in the Data Transfer field.

  4. Click Next

  5. Edit the following parameters:




Name of the object you want to import

Include deleted records

Enables including deleted records

Use synchronous transfer only

Enables synchronous transfer using REST API


Imports only new data since the last import

Data Settings

  1. Select Next. The Data Settings page opens.

  2. You can edit the SOQL query, WHERE conditions and Schema settings here.

  3. Optionally, skip this page of the dialog.

Data Preview 

Data Placement