Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Treasure Data can publish user segments into Salesforce Marketing Cloud (ExactTarget), and enable you to send personalized emails to your customers. You can run data-driven email campaigns, by using your first-party data from Web, Mobile, CRM, and other data sources.


This data connector is in Beta. For more information, contact support@treasuredata.com.


Table of Contents

Prerequisites

  • Basic knowledge of Treasure Data

  • Basic knowledge of Salesforce Marketing Cloud

  • TD account

Supported

...

Open SSH 7.8 Private Key is supported. The format of the key is detected and the correct library to use is chosen.

Set Up a Secure, Automated Account in Salesforce

Access your Salesforce account to begin set up.

...

Select the template, define the email properties, including name and location, and select Next to provide content. Continue creating the email and save it when you are finished.


Define

...

Specification for

...

Import into Salesforce

Create an Import Interaction in Salesforce

While still in From the Email view, from the Interactions drop-down menu, select select Interactions.

Select Import.


Select Create to make a new import interaction definition.

...

Specify the Import Trigger

While still in From the Email view, select the SFDC blue cloud icon to view menu options.

...

Select Active to enable the import trigger.


Select Save and Close.

Run a Treasure Data Job to Complete an Initial Import to Salesforce

Create a job that selects data from within Treasure Data. The specified column name for the mapping must match the column name in the SFMC Exact Target mail. “Email Address” and “Subscriber Key” columns are required. If needed, you can change the mapped column name that is in TD database. You can change the column name from within the TD Console.

Image Removed

Before running the job, you choose an existing data connection or create your data connector for export.

Select Export Results in the upper right corner of the query editor and in the pane, either search for an existing data connector or select New Integration to create a data connector.

Image Removed

Create a Connection

When you select a new integration you see the following dialog that enables an authenticated connection:

Image Removed

...

Use the TD Console to Create Your Connection

Create a New Connection

In Treasure Data, you must create and configure the data connection prior to running your query. As part of the data connection, you provide authentication to access the integration.

Enter the required credentials for your remote SFTP instance. Name the connection. If you would like to share this connection with other users in your organization, check the Share with others checkbox. If this box is unchecked this connection is visible only to you. Set the following parameters:

...

Authentication mode: The way you choose to authenticate with your SFTP server.

...

  

Numbered Headings
start-numbering-with1
start-numbering-ath5
Open TD Console.
Navigate to Integrations Hub Catalog.
Search for and select Salesforce Marketing Cloud via SFTP.

Image Added

Select Create Credentials.
Type the credentials to authenticate.

Image Added

Type or select values for the parameters:
ParameterDescription
Host The host information of the remote SFTP instance, for example, an IP address.
Port

...

The connection port on the remote FTP instance, the default is 22.
User

...

The user name used to connect to the remote FTP instance.
Authentication mode

The way you choose to authenticate with your SFTP server.

  • public/private key pair
  • password

Open SSH 7.8 Private Key is supported. The format of the key is detected and the correct library to use is chosen.

Secret key file

...

Required if 'public / private key pair' is selected from `Authentication Mode`. (The key type ed25519 is not supported but the ecdsa key type is supported.)
Passphrase for secret key file

...

(Optional) If required, provide a passphrase for the provided secret file.
Retry limit

...

Number of times to retry a failed connection (default 10).
Timeout

...

Connection timeout in seconds

...

Use proxy

...

?

If selected, enter the details for the proxy server. 

  • Type
  • Host
  • Port
  • User
  • Password
  • Command
Sequence format

Format for sequence part of output files (string, default: ".%03d.%02d")

...

Select Continue.
Type a name for your connection.
Select Done.


Define your Query

Create a job that selects data from within Treasure Data. The specified column name for the mapping must match the column name in the SFMC Exact Target mail. “Email Address” and “Subscriber Key” columns are required. If needed, you can change the mapped column name that is in TD database. You can change the column name from within the TD Console.

Excerpt Include
PD:Exporting Your Query Data to Your Destination
PD:Exporting Your Query Data to Your Destination
nopaneltrue

Integration Parameters

You could specify more parameters for the target export file:

  • Path prefix: the path for the plugin to save your output files in the target server

  • Rename file after upload finish: select to try to upload the file with .tmp extension first, then rename the file without .tmp when the file is uploaded successfully

  • Format: format Format of the file (would be csv CSV or tsvTSV)

  • Compression: choose it whenever you would like to compress the file. We support gzip and bzip2 compression

  • Header line: choose it if you would like to write the first line as the columns' name

  • Delimiter: delimiter between values in the target file, would be | or tab or comma

  • Quote policy: quote between each columnscolumn, could be MINIMUM, ALL, or NONE

  • Null string: the value for the null field in the query

  • End-of-line character: the character to specify for end of the line. Would be Carriage Return Line Feed (CRLF - used in Windows OS file systems) or Line Feed (LF - used in Unix, MacOSmacOS) or Carriage Return (CR - used in classic MacOSmacOS)

  • Encryption column names: list of encryption columns, separated by a comma

  • Encryption key: specify key needed to perform the encryption algorithm

  • Encryption iv: specify a number to prevent repetition in data encryption

...

Example Query

After configuring the output connector, and running a query, the query results are written to the target file server of SFMC.

Image Removed

...


Image Added


Optionally Schedule the Query Export Jobs

You can use Scheduled Jobs with Result Output, Export to periodically write the output result to a target destination that you specify.

...


Excerpt Include
PD:Scheduling Jobs Using TD Console
PD:Scheduling Jobs Using TD Console
nopaneltrue

Optionally Configure Export Results in Workflow

Within Treasure Workflow, you can specify the use of this SFTP data connector to output export data. 

Learn more at Using Workflows to Export Data with the TD Toolbelt.

Example Workflow 

Code Block
linenumberstrue
timezone: UTC

_export:
  td:
    database: sample_datasets

+td-result-into-target:
  td>: queries/sample.sql
  result_connection: your_connections_name
  result_settings:
    secret_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    advertiser_id: xxxxxx
    data_activation_duration: 43200
    ....

Select here for more information on using data connectors in workflow to export data.

In the connection configuration, specify the SFTP account that you configured in SFMC.

Image Removed

Run the Job

...


Verifying the Query Export Job

After the job finishes, you can check the output file on the SFTP server by using the general SFTP command, as shown in the following example:

...