MailChimp: Updating Lists with ShipWorks
Update your MailChimp email list by sending your customer's name and email address to MailChimp from within ShipWorks. With a single click of a a button in ShipWorks, update your MailChimp list with customer information that may not already be included in your email list.
This may prove useful if you have customers who place orders with you and the customer's information is not automatically added to the email list in MailChimp.
This article will guide you through how to add an action and a template to ShipWorks, allowing you to update your MailChimp list(s).
Please be sure that you have the following in place before continuing:
-
You have ShipWorks installed and are logged into ShipWorks as a user with administrator rights.
-
You are able to log into your MailChimp account as a user with administrator access.
The MailChimpSubscribe template is used by ShipWorks to send your customer's subscription information to MailChimp in a format that MailChimp understands. The following steps will guide you through how to add the template to ShipWorks.
2. Click on the New Template button on the right side of the Template Manager screen.
3. Name the template MailChimp Subscribe.
4. In the Select the folder to put the new template in: section, expand the Reports folder. Then, select the Exports folder. Click Next.
5. Select Standard as the Template Type. Then, click Next.
6. On the Template Format screen, select Plain Text and then click the Finish button.
7. Verify that the MailChimp Subscribe template that you just created is selected. Then, click on the Edit button.
8. Verify that the Code tab is selected. Then, select and delete all of the code in the code screen. Next, copy the code from the below box and paste it into the Code tab in ShipWorks.
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE xsl:stylesheet[ <!ENTITY nl "&amp;amp;amp;#xd;&amp;amp;amp;#xa;"> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sw="http://www.interapptive.com/shipworks" extension-element-prefixes="sw" > <xsl:output method="text" encoding="utf-8" /> <!-- Start of template --> <xsl:template match="/"><xsl:apply-templates /></xsl:template> <xsl:template match="ShipWorks"> { "email_address": "<xsl:value-of select="//Order/Address/Email"/>", "status": "subscribed", "merge_fields": { "FNAME": "<xsl:value-of select="//Order/Address/FirstName"/>", "LNAME": "<xsl:value-of select="//Order/Address/LastName"/>" } } </xsl:template> </xsl:stylesheet>
9. Click Save and then click Close.
In order to create the Send to MailChimp action in ShipWorks you will need to gather some information from MailChimp first:
-
Your MailChimp list's unique ID - Please follow the steps outlined in this MailChimp article to obtain your MailChimp Audience ID . Make note of the ID as you will need it when creating the action in ShipWorks.
-
Your MailChimp API Key - Please follow the steps outlined in this MailChimp article to generate and/or obtain your MailChimp API key Make note of the key as you will need it when creating the action in ShipWorks.
-
Your MailChimp server ID - Follow the below steps to obtain your MailChimp server ID. Make note of the ID as you will need it when creating the action in ShipWorks.
Here's how to locate the ID:
-
Log into your MailChimp account.
-
Once logged in, look at the URL in your web browser. Make note of the highlighted section in the sample below. This is your MailChimp server ID.
In the above example, the server ID is us15.
Using the List ID, API key, and Server ID obtained from MailChimp in the previous steps, let's create the action to update your MailChimp list with information from ShipWorks.
2. Click on the New Action button on the right side of the Action Manager screen.
3. Give the action a name, like Send to MailChimp. You can actually name the action anything you would like.
4. Click on the When the following occurs: drop-down menu and select A custom button is clicked from the list of options. This option creates a custom button on the Home tab in ShipWorks that you will click to send information to MailChimp.
5. Optionally, you can select the image used on the custom button by clicking on the Choose link to the right of the Image: icon. You can select an image from the available list of images in ShipWorks, or upload your own image by clicking on the Browse for more images... link. In our example, we uploaded a publicly available image of the MailChimp logo.
6. The custom button, by default, will show up on the Home tab in ShipWorks. You can also specify whether or not to show the button in the right-click menu of the orders grid or the customers grid.
7. Leave the Require: option as the default of An order to be selected.
8. Click on the Add Task button and select Send web request from the drop-down menu.
9. Leave Send the request using: The selected orders as is. Then, click on the Send the request: drop-down menu and select Using the results of processing a template so that the options are configured like the below screen-shot.
10. Click on the Template: drop-down menu and select the Reports Exports MailChimp Subscribe template you created earlier in this article.
11. Now, we need to create your Request URL: by replacing the server ID and List ID in the below example URL with the information gathered from MailChimp earlier in this article.
example URL: https://yourserverID.api.mailchimp.com/3.0/lists/yourlistID/members/
So, if your Server ID is us17 and your unique List ID is d78e54n456, your URL would be https://us17.api.mailchimp.com/3.0/lists/d78e54n456/members/
Enter your URL into the Request URL: field.
12. In the Request options: section, check the box to the left of Use basic authentication. Then, enter the following:
-
Username: user
-
Password: The API Key that you obtained from MailChimp earlier in this article.
13. Click OK then Close.
That's it!! Your template is installed and the action is created to send customer information to your MailChimp list. Next, let's take a look at how to send the information to MailChimp using the action you just created.
1. On the main orders grid, select the order(s) that contain the customer information you wish to send to MailChimp by checking the box to the left of the order(s).
2. Click on the Home tab and then click on the Send to MailChimp button.
-
There will be no physical indicator that the list was updated successfully after clicking the Send to MailChimp button. No response is a good thing.
-
If you receive an action error after clicking on the Send to MailChimp button, check the error by clicking on the View Errors link in the information bar at the top of the ShipWorks window. A 400 response was received error is a response from MailChimp indicating that one or more email addresses were already included in the MailChimp list.
Still Need Help?
Please feel free to reach out to one of our awesome Technical Support Representatives in St. Louis. We are happy to help.
Have a comment to share about this article? We'd love to hear from you. You must be logged in to your Support Portal account to leave a comment.
Comments
0 comments