How to segment Mailchimp lists using WooCommerce product variations & SKUs
Posted by Kaine Shutler on April 2, 2018
Since this post went live, I’ve had a few emails from readers who’ve experienced issues implementing this guide. After some tweaks and experimentation, we got it working on their sites. It’s tricky and sometimes temperamental, but I’m confident that this method works on the majority of WooCommerce sites. I’ll be updating this post with some alternate solutions just as soon as I get the time.
List segmentation is one of Mailchimp’s most powerful features. It allows you to build a master list of customers and then segment users that meet a specific set of conditions. Want to email customers who’ve spent over £100 in your store? No problem. Want to send a localised offer to customers in London that’ve made a purchase in the last 30 days? You got it.
Now we can get even more granular, allowing you to set Mailchimp segments using specific WooCommerce variations and SKUs. This could be handy for segmenting your customers based on their clothes sizing or a particular colour they go for regularly, for example.
Both Mailchimp and WooCommerce say that segmenting by variations is not possible, but I’ve found a way without using any custom code. In this article, I’ll show you how to create Mailchimp segments based on WooCommerce product variations.
Install a WordPress plugin to import users to Mailchimp as they make purchases
We’re going to start by installing a plugin to send your WooCommerce customer purchase data to Mailchimp. WooChimp does exactly this. As users buy products in your store, WooChimp will import that customer’s personal data and their purchase history into a master Mailchimp list.
Once you’ve installed and activated WooChimp, head over to WooCommerce > Mailchimp, tick “enable integration”, enter a Mailchimp API key and click save.
Configure the plugin to sync your e-commerce data to Mailchimp
Next, click the e-commerce tab and on the settings pane, tick “enable e-commerce”, “enable orders sync”, “update order status” and “subscribe all customers”. Depending on your circumstances, you might want to tick “delete cancelled order data”. You’ll then need to select a brand-new master list that you wish all of your users and purchase data to be imported into.
Note that in our tests, importing variations did not work with a list that contained existing e-commerce data; e-commerce data from two sources simply did not mix. You must create a brand new list for this integration.
Before you leave, click the “automatic” tab and select “order placed” from the drop down. Select the brand-new master mailing list and connect the WooCommerce name fields to the Mailchimp name fields. If you’re importing more personal data into Mailchimp, you can go ahead and connect those fields too. Click save.
Add SKUs to your variables
SKU stands for “stock keeping unit” and like barcodes, SKUs help us and systems identify products. We’ll need to enter SKUs on your product variations so that we can tell the products apart when creating our segments. Without SKUs, your variations won’t show up in Mailchimp and you won’t be able to segment based on these variations. WooCommerce doesn’t add SKUs to your products by default, so you’ll need to add these yourself or install a plugin like WooCommerce Product SKU Generator to handle this for you.
To do this manually, go to each product, scroll down to the “product data” pane and click on “variations”. Click each variation and enter a SKU in the uppermost field. Try and think of a SKU format that’s descriptive enough for you to be able to distinguish the variation. For example, if your product is a Rick & Morty T-shirt that’s available in different colours and sizes, your SKU for an extra large, black T-shirt could be “RMTS-BLACK-XL”. You can use letters, numbers and symbols in your SKU.
If you use WooCommerce Product SKU Generator, it will create an easily understandable SKU format so that you can identify products by their SKU. You can add SKUs to existing products in bulk and it will add SKUs to your new products and variations automatically.
If your SKUs are long, you’ll run into problems
Note that when importing product titles/variations into Mailchimp it will do so in “Name | variation SKU” format. So a Rick and Morty T-shirt in extra large & black might be imported as “rick and morty t-shirt | rick-morty-t-shirt-extra large-black”.
Unfortunately, Mailchimp will truncate any name and variation SKU combinations that exceed 50 characters. If you have long names or many variation attributes, your names will be truncated and you’ll be unable to segment by these variations. The Rick & Morty T-shirt name would therefore be truncated to “rick and morty t-shirt | rick-morty-t-shirt-extra”. Because the above product title was truncated, the colour variation has been removed and we therefore can’t segment on colour.
If you have long product names or many variation attributes, you’ll need to create shorter SKUs manually to avoid truncation.
Purchase every variation
You can only segment your list using variations if that product variation exists in your Mailchimp list. If nobody has purchased the variation, it simply won’t show in the list and you can’t segment users using that purchase condition. We also can’t import existing purchase data. Therefore, you need to add every single product variation to your cart and complete the checkout process so that these are imported in to Mailchimp. You can checkout using your payment gateway’s sandbox mode or by enabling the cash on delivery payment option temporarily. Remember to disable these when you’re done with your purchase.
Once you’ve completed checkout, you’ll need to wait 5-10 minutes for the plugin to send the new purchase data to Mailchimp.
Segment to your heart’s content
Head back in to Mailchimp and click in to your master list. Find the account that you just made your purchases in and click the “e-commerce” tab. You should be able to see the products and variations that you just purchased.
Go back to the list and click “create a segment” and in the first dropdown, select “product purchased”. Now when you click onto the “select a product” dropdown, you’ll see your products along with their variations. You can tell the variations based on their SKUs.
Not sure where to start with your own learning management system? See how we can help with Learning Management System development.