Creating and Updating MailChimp List with Treasure Data

This article explains how to create a MailChimp list based on the data stored in Treasure Data. Use cases include:

Personalization through Segmentation: For web and mobile products, user behaviors are best captured in the apps themselves. Collect user events into Treasure Data, write the personalization logic in SQL, and export the segmented mailing list to Mailchimp for targeted campaigns.

Customer Retention: For SaaS and subscription e-commerce businesses, customer retention is a key driver for growth. Using Treasure Data with Mailchimp, “at-risk” users can be identified with user events stored in Treasure Data and pushed to Mailchimp. Then, send targeted promotions to these at-risk users to re-engage them.

Usage

Choose saved connection

A dialog Choose Saved Connection will be displayed. You will need to select an existing mailchimp connection (see image below). If you do not have a Saved Connection already setup, please follow the next step on how to create a new connection within the Sources Catalog.

The above query requires no source table (for the ease of testing out this feature), but you still need to choose your database, so pick “sample_datasets” or any other arbitrary table. Also, make sure that Presto is chosen as the SQL dialect.

The query should complete in a few seconds. After that, check Mailchimp’s List:

MERGE field’s type is address

In case you have a MERGE field that is using the type address, you need to put the values into a JSON string. The following query with MailChimp will export data with the MERGE field’s type address: