Arm Treasure Data can publish segments into Cheetah Digital MailPublisher, enabling you to send personalized emails. You can run data-driven email campaigns, using your first party data from Web, Mobile, CRM, and so on.
You can use this same connector to import Cheetah Digital MailPublisher data into Treasure Data. See Import from Cheetah Digital MailPublisher.
- Basic knowledge of Treasure Data, including the toolbelt.
- A MailPublisher Smart Account with API access enabled (done via MailPublisher Smart Console).
Create a new connection
Go to Treasure Data Connections. Locate and select MailPublisher Smart.
The dialog opens.
Complete the new connection information, providing your MailPublisher Smart credential. Refer to Appendix B for information on where to find your credential information.
- MailPublisher Smart Site ID (required): This is your MailPublisher Smart Site ID.
- MailPublisher Smart Login ID (required): This is service specific Login ID.
- MailPublisher Smart password (required): This is password for above Login ID.
- Retry limit (optional, default
7): Number of retries before the connector stops trying to connect and send data out
- Maximum intervals in milliseconds between retries (optional, default to
120000) : Maximum time in milliseconds between retrying attempts.
- Initial intervals in milliseconds between retries (optional, default
15000): Interval to retry if a recoverable error happens (in millisecond).
- Important note: MailPublisher Smart announces minimal retry interval time should be 15 sec (15000 ms).
- Timeout (optional, default to
100000) : Timeout for each HTTP request in milliseconds.
You can give a name to your newly created connection and save it for later use
Configure to output results to MailPublisher Smart connection
Output results at top of your query editor and select your MailPublisher Smart connection.
There are several parameter fields to complete:
- Action mode: Either of "list_upload" or "send_email"
- list_upload: Upload a distribution list
- send_email: Book an email delivery in addition to uploading the list
- Email delivery destination : Either of "Japan" or "Worldwide"
- Important note: The uploaded file will be encoded with Shift_JIS character encoding if destination is "Japan", otherwise, the file is encoded with UTF-8.
- File name prefix: (optional, default: "delivery_list_") : The uploaded file will have this prefix in its file name.
- Draft ID: (required with "send_email" mode) An ID of a draft to use email delivery, which can be checked on MailPublisher's console. See Appendix C to get draft ID.
- Use immediate email delivery: Check if you want to send email immediately
- Important note: Be careful when using this option, email delivery settings cannot be tested at this stage.
- Booking date time: (required unless "immediate delivery" mode) Send email at this time. It would be at least 10 minutes after the time to run the output job. Its format must be "YYYY-MM-DD HH:mm" such as "2018-09-18 12:00"
- Booking timezone: Timezone for booking date time
A sample configuration:
Write the Query to populate a delivery list
On Treasure Data console, run the following query with
Output results into a connection of MailPublisher Smart. The query does not match any real users and is for demonstration purposes only. (See Appendix A for more details of column naming and its data):
td_global_id as tdglobalid,
('firstname.lastname@example.org', 'b1b065f5-1222-4a14-b151-379d49ec39e3', 'John', 'Doe', 'MailPublisher Dummy Data - DO NOT USE'),
('email@example.com', 'x1b065f5-1222-4a14-b151-379d49ec39e3', 'Janes', 'Doe', 'MailPublisher Dummy Data - DO NOT USE'),
('firstname.lastname@example.org', 'p1b065f5-1222-4a14-b151-379d49ec39e3', 'Tony', 'Doe', 'MailPublisher Dummy Data - DO NOT USE'),
('email@example.com', 'o1b065f5-1222-4a14-b151-379d49ec39e3', 'Bill', 'Adam', 'MailPublisher Dummy Data - DO NOT USE'),
('firstname.lastname@example.org', 't1b065f5-1222-4a14-b151-379d49ec39e3', 'Dan', 'Steve', 'MailPublisher Dummy Data- DO NOT USE')
The demo query requires no source table (for the ease of testing this feature), but you still must choose your database, so pick “sample_datasets” or any other arbitrary table.
If you don’t want to specify the data headers in the configuration, you can use aliases in your query to rename columns of your query result, for example:
SELECT an_email_column AS email, another_phone_column AS phone FROM your_table;
to create new dataset with headers of email,phone
- Note: column name is case-insensitive, for example, you can use either of
The query should complete in a few seconds. After that, check the MailPublisher Smart Console for your new email delivery list:
Appendix A: MailPublisher Smart email delivery list data
MailPublisher Smart have some restrictions for column name in delivery list data.
- First column name must be an "email"
- Column name must not contain reserved words
- image_[number] e.g. image_001
- linkurl_[number] e.g. linkurl_001
- cvurl_[number] e.g. cvurl_001
- boundary[number] e.g. boundary00
- Column name must not contain below characters
- "-" (hyphen) and " " (space)
- Column value can't contain "," (comma), '"' (double quote) and new line (CR/LF/CRLF) for now.
- Column value must not contain special characters such as IBM extended (ja: IBM拡張), NEC extended kanji (ja: NEC拡張漢字), number enclosed within a circle (ja: 丸数字) like ①.
- Email string in column value must have valid format. Invalid formatted email address will be removed when you upload email delivery list.
Upload file will be encoded with Shift_JIS character encoding when you choose "Japan" for destination. Some character text might get garbled at that time.
Refer "MailPublisher Smart manual to cooperate with external system (ja: 外部システムとの連携利用マニュアル)" and "MailPublisher Smart function manual (ja: 機能説明マニュアル)". You can download both of them from MailPublisher Smart console.
Appendix B: MailPublisher Smart Account Information
Access to your API-enabled account is required before you can upload the email delivery list. The Site ID can be retrieved from the MailPublisher Smart console.
Steps to enable and create a new account for API access
- Select Account > Create (ja: アカウント > 新規作成) in left menu
- Create an external system cooperation type User (ja: 利用種別：外部システム連携).
Appendix C: Getting draft ID
To use "send_email" option, you need to get draft ID which is seen on here (メール配信・一覧 > 下書きメール)