Send query results to Mailchimp¶
Mailchimp is a cloud-based marketing automation platform and an email marketing service with an API that integrates third-party systems and a web UI that manages email contacts, templates, and lists.
Note
This destination uses the Mailchimp REST API .
This topic describes the steps that are required to send audience lists to Mailchimp from Amperity.
Caution
This destination is available for sending query results to Mailchimp after it is configured by a Datagrid Operator or your Amperity representative.
If this destintion cannot be selected from the campaigns editor or activations canvas ask your Datagrid Operator or Amperity representative to configure a destination for sending sending query results to Mailchimp.
Build query¶
You will need to build a query that outputs fields that can be mapped to audience fields tags in Mailchimp. For example, a Mailchimp audience may have the following fields and field tags:
Mailchimp Fields |
Field Tags |
Description |
---|---|---|
email_address |
Required. |
|
first_name |
FNAME |
Optional. |
last_name |
LNAME |
Optional. |
address |
ADDRESS |
Optional. |
phone_number |
PHONE |
Optional. |
birthday |
BIRTHDAY |
Optional. |
status |
status_if_new |
Required. Must have a value of “subscribed” or “unsubscribed” because data template mappings do not provide type conversions. |
Example
The customer 360 database can provide email, first name, last name, and birthdate data. Use another table in the customer 360 database to keep a list of known email addresses with their subscription status available from a status column that can provide “subscribed” and “unsubscribed” values.
Build a query named “Mailchimp - Upcoming Birthdays” to collect email address, first name, last name, and birthdate data from the customer 360 database, but with a window for birthdays that spans “within the next 10 days from the current date”, and then find only those individuals who are also subscribed to the mailing list:
1SELECT
2 c360.email
3 ,c360.given_name
4 ,c360.surname
5 ,c360.birthdate
6 ,el.status
7 ,DATE_FORMAT(birthdate, '%m-%d')
8 ,current_date
9FROM Customer360 c360
10LEFT JOIN Email_List el ON c360.email = el.email
11WHERE DATE_FORMAT(birthdate, '%m-%d') = DATE_FORMAT((CURRENT_TIMESTAMP AT TIME ZONE 'America/Los_Angeles'+ interval '10' day), '%m-%d')
12AND status = 'subscribed'
which outputs results similar to:
------------------------ ------------ ---------- ----------- ------------
email given_name surname birthdate status
------------------------ ------------ ---------- ----------- ------------
triley@perezinc.com Tyler Riley 02-19 subscribed
act_austin@rushllc.org Austin Williams 02-20 subscribed
swelch@kellyllc.com Sandra Welch 02-20 subscribed
justincurrie@mmail.com Justin Currie 02-21 subscribed
...
------------------------ ------------ ---------- ----------- ------------
Add orchestration¶
An orchestration defines the relationship between query results and a destination, including the destination and the frequency at which an orchestration runs.
To add an orchestration
Open the Activations page, select the Orchestrations tab, and then click the Add orchestration button. This opens the Add orchestration dialog box.
From the Object type dropdown, select Query.
From the Object dropdown, select the query for which results will be sent to Mailchimp.
From the Destination dropdown, select a destination that is configured for sending data to Mailchimp.
Verify all settings.
Set the workflow to Manual. (You can change this to automatic later, after verifying the end-to-end workflow.)
Click Save.
Run orchestration¶
Run the orchestration manually to validate that it works.
To run the orchestration
Open the Activations page, select the Orchestrations tab, and then open the menu for the Mailchimp orchestration. Select Run.
The Status column for the orchestration will update to say “Waiting to start…”, after which the notifications pane will update to include a notification that shows the current status.
When the orchestration has run successfully, the status is updated to “Completed”.