← Back to templates
Data Workflow Automation Template

Export Magento 2 customers with orders (aggregated)

Pull customer and order information with direct MySQL queries and aggregate.
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

Magento 2 provides a REST API, but it is slow to extract a large amount of information and additionally not as flexible as direct queries to the database.

How does it work?

The template uses direct database queries to fetch information about customers and orders. It then joins customers and orders to retrieve a few extra columns for each customer:

  • Number of orders
  • Total amount
  • First order date
  • Last order date

To use this workflow, you will need to:

  • Add credentials to connect to your Magento 2 database.
  • Set table prefixes in MySQL steps (if you use any prefixes).
  • Add extra steps to put information in the way that you need.

Main use cases

  • Export Magento 2 customers
  • Prepare files for importing Magento 2 customers to Mailchimp
  • Build reports by customers
  • Segment customers