Customers¶
The Customers push creates and updates customer accounts in the store, such as trade customers from the ERP.
On a push connector, select Customers as the WooCommerce Import Type. The push offers Insert, Update and Insert/Update. See Insert and Update for how Id decides between creating and updating.
Fields¶
- Id, WooCommerce's id for the customer. Map it to update a customer, or from an empty field to catch the new customer's id;
- Email, required for a new customer. WooCommerce refuses an email address another customer already uses;
- First Name, Last Name, Username and Password;
- the billing address:
billing_first_name,billing_last_name,billing_company,billing_address_1,billing_address_2,billing_city,billing_state,billing_postcodeandbilling_country; - the shipping address: the same fields, beginning
shipping_.
The push has no billing email or phone fields.
billing_country and shipping_country take a two-letter country code, such as GB. billing_state and shipping_state take WooCommerce's code for the state or county where it has one, such as CA for California.
Meta Data¶
Plugins store their own values on a customer as meta data, such as a VAT number or a price group. The push sets up to ten of them, through pairs of fields:
| Fields | Holds |
|---|---|
meta1_key and meta1_value |
the first key, such as vat_number, and its value |
meta2_key and meta2_value |
the second |
| … | |
meta10_key and meta10_value |
the tenth |
The push sends a pair only when both its key and its value hold something. It sets the value of that key on the customer, adding the key if the customer has none. Keys the push does not send keep their values.
To read the values back, name the keys in the Customers pull's Customer/Order Meta Fields option. See Customers.
WooCommerce Reference¶
Customers in the WooCommerce REST API documentation.