In this article we explain how to map nuevoMailer to WooCommerce and import your WooCommerce customers into nuevoMailer.

In addition we take this a step further and show how to also import the total number of orders, the total revenue of a customer and the last order date.
The advantage of this complete approach is that it allows you to use nuevoMailer advanced search and perform customer segmentation, setup autoresponders and triggers.
What's demonstrated here can be applied with all popular shopping carts and ordering systems that use a relational database. In case you are using PrestaShop then refer to this article.
 

Create these custom fields in nuevoMailer

First we will create some custom subscriber fields in nuevoMailer to hold data. This is not entirely necessary since the minimum you need is the email.
  1. First name (use a text field - ignore if you already have one)
  2. Last name (use a text field - ignore if you already have one)
  3. Country (use a text field - ignore if you already have one)
  4. Orders # (use an integer number)
  5. Total $ (use a decimal number)
  6. Last order date (use a date field)
In the same page you may want to create this view.
Custom subscriber fields setup
 

Create two mailing lists

This is an optional step. But as you will see below it is very handy.
Let's name them,
Woo customers (order completed)
Woo customers (payment pending)
 

Create an external database connection

Start with a new connection to MySQL.
Adjust database name, server name, username and password accordingly.
Normally, these are the same as the ones you use in your WordPress website.
 

Field mapping

Source table and fields
This field will hold the total number of orders from this customer.
This field will hold the total sales from this customer.
 

Custom SQL statement

This is one of the most important elements. Copy it from below. Status refers to the order status.
WooCommerce Order statuses explained
Options available for order status:
Pending payment: wc-pending
Processing: wc-processing
On hold: wc-on-hold
Completed: wc-completed

Cancelled: wc-cancelled
Refunded: wc-refunded
Failed: wc-failed
Draft: wc-checkout-draft

Key points & further ideas

  • Depending on the nature of the goods you sell and your business processes you may want to create several data sources that differentiate by order status.
  • For example you may create a data source that pulls customers having "payment pending" and assign them to a "Pending list".
  • Another source may pull customers having "payment completed" and assign them to your main customers list.
  • In both cases you can setup autoresponders following up on the "Last order date" field you created.
  • An autoresponder can be used to remind customers to pay and/or follow-up after they've paid.
  • The timing of your autoresponders is again related to your business model.
    In case you create a "Payment reminder" autoresponder a good idea would be to add a Trigger on this that removes the customer from the "Pending list" as soon as the email is sent. See an example.
  • Using a cron job you can automate this process and synchronize your data sources as often as you need.

Use multiple order statuses

Depending again on your business model you can adjust the custom sql to combine order statuses with an OR condition.
This example will pull customers having an order as wc-processing or wc-pending.

Bonus: customers who purchased a specific product

Replace 125 with the product ID you like.
You can proceed now with an advanced search and further segment your customers!
https://www.nuevomailer.com/import-woocommerce-customers

See also,

Top of page