Manage Mailing Lists with MailChimp

This article applies to Classic Commerce. (Looking for Contextual Commerce documentation?)

Overview

This article will teach you how to integrate MailChimp, an email marketing and email list manager, with FastSpring.

If you have not already, go to http://www.mailchimp.com and get an account with MailChimp. Once you have an account, you can either complete the FastSpring setup yourself, following our five easy-to-follow steps below, or you can open a support ticket with specific information from MailChimp.

Option 1: Complete the FastSpring Setup yourself

You should first decide whether you want all buyers signed up automatically or you want them to have a checkbox option when ordering. For the former, start at the beginning of this process and follow along through the end of Step 2, when you hit Save. For the latter, you will also start at the beginning of this process, but there are a couple of additional steps required after the intial save.

Step 1: Identify your MailChimp API Key

You will need the API Key for your MailChimp account.  You can find this by logging on to MailChimp, clicking your user icon at the top right-hand corner of the page, and then selecting Profile -> Extras -> API Keys.

api_key.png


Step 2: Create a Notification Rule for the Mailing List

Go to SpringBoard Store Home » Notifications. Click Add next to Custom Notifications.

notify.png403.png

Important:  Be sure to click +Add and create a new custom notification; do not edit an existing notification.

Select Order Completed as the Event Type because you will want to notify MailChimp when an order occurs. Select HTTP URL as the Destination. For the Live Server URL, enter https://####.api.mailchimp.com/2.0/lists/subscribe.xml, but replace #### with the string found at the end of your MailChimp API Key following the hyphen. For example, if your API Key ends in -us20, then your Live Server URL would be https://us20.api.mailchimp.com/2.0/lists/subscribe.xml. Select JSON (application/json) for the Content Type. Click Next.

config1.png

 

Select POST as the Method. Then click the POST Content tab.

config1a.png

Paste the following script into the text area of the POST Content tab:

{
 "apikey": "<APIKey>",
 "id": "<ListID>",
 "email": { "email": "#{order.customer.email}" },
 "merge_vars": {
"FNAME": "#{order.customer.firstName}",
"LNAME": "#{order.customer.lastName}"
 },
 "double_optin": "false",
 "update_existing": "true",
 "send_welcome": "false"
}

Replace the <APIKey> value with your MailChimp API Key.

Replace the <ListID> value with the list ID of the MailChimp list to which you want customers added. You can obtain the list ID by logging on to MailChimp and selecting Lists -> (The name of the list you want to use) -> Settings -> List name and defaults.  The list ID should be included in the block of text under List ID, in red, as pictured here:

find_list_ID.png

Optionally, enter a Name for your notification rule. Then, switch the rule to Active and click Save.

active_and_save.png

If you want to present a checkbox option to customers, please continue.

Click the Conditions tab of the notification rule, and then in the Condition Expression text area, paste in the following:

#{order.surveyFieldValues.mailinglist eq 'Subscribe'}

conditions.png

Click Save again.


Creating a Custom Check Box

Next, you will need create a checkbox option for your mailing list. Go to SpringBoard's Store Home -> Custom Fields. Click Create Custom Field Configuration. Enter in a name for management purposes, and click Next. Enter in a Display name or leave this field blank. Click Add Form Field.

217.png218.png

Choose Checkboxes as the Input Type. In the Name field, enter mailinglist.


Enter Subscribe to our mailing list? under Question Text. Leave Question Description blank. Type in Subscribe under Selectable Values. Click Add.

Click Save. Make sure to move the field to Active Status.

Now this custom field will appear on your FastSpring order process, as shown below.

219.png

 

 

 

 

Option 2: Open a Support Ticket with Required Information

In your support ticket, please provide the following information obtained from MailChimp:

  • The API Key 
  • The List ID (with the numerical id associated with it) for your mailing list
  • Whether you want all buyers signed up automatically or you want them to have a checkbox option when ordering

We can take care of the rest for you!

Once we set it up, names of buyers will be passed on to MailChimp immediately after purchase.

We're Here to Help

If you assistance integrating with MailChimp, please open a support ticket. You can also contact MailChimp support.

Have more questions? Submit a request

Comments

Powered by Zendesk