← Back to templates
Data Workflow Automation Template

Export Magento 2 Customers to Mailchimp (different segments)

Creates a Mailchimp Contacts import .CSV file split into different groups (with orders and without orders).
Use workflow
Use Template
Import template to workspace
Copy template to clipboard (JSON)
Copied! Next, paste into your Mipler workflow canvas
Developer Mipler Team
Use Cases Magento 2, Exporting
export magento 2 customers to mailchimp

Exporting existing Magento 2 customers to Mailchimp is a common task, and it can be fully automated with extensions. However, in that case, you lose the ability to split customers into different groups, which is required for better email targeting.

This flow splits customers into two groups based on the number of orders (with orders and without orders). For each group, it creates separate .CSV files that meet Mailchimp's requirements for importing files.

How does it work?

The flow fetches customers and orders directly from the MySQL database. After the initial customer filtration (for example, removing all customers with 'test' emails), the flow joins order tables to calculate the number of orders for each customer.

In the next steps, the flow splits customers into two different groups using a Filter node and saves each group to a .CSV file.

The flow is fully customizable and can be adapted for any business requirements with different customer segmentation rules and groups.

Main use cases

  • Export Magento 2 customers
  • Prepare files for exporting Magento 2 customers to Mailchimp
  • Segment customers
  • Improve email marketing targeting
  • Automate customer data export processes

Benefits

  • Automated process saves time and reduces manual effort
  • Improved email marketing effectiveness through targeted segmentation
  • Customizable flow to fit specific business needs
  • Accurate customer data export

Technical Details

The flow utilizes MySQL node to interact with the MySQL database. It leverages advanced querying capabilities to filter and segment customer data efficiently. The process includes:

  1. Fetching customer data from the MySQL database
  2. Filtering out unwanted records (e.g., test emails)
  3. Joining order data to determine the number of orders per customer
  4. Segmenting customers into groups based on predefined criteria
  5. Generating .CSV files for each segment