Contents
Summary
ID Format
Deleted Record Support
Custom Field Support
Mapping Collection Status
Duplicate or Conflicting Mappings
Supported Child Collections
System Caveats
Setup Requirements
Integration Flow
Mappings
Error Handling
Testing and Validation
Additional Notes
Related Documents
Summary
This documentation covers iPaaS.com customers FROM iPaaS.com. A customer created or changed in iPaaS.com, for example a trade account opened in an ERP, becomes a WooCommerce customer account:
a customer not linked yet is matched to a store account by email only: a store customer with the same email is linked and updated, not duplicated (when Username is mapped, it must also match the store's username);
a new account gets the mapped Username, else the email, as its username; WooCommerce's New account email welcomes them if it is on. A mapped Password is sent only when a new account is created, never on an update or when an existing store customer is linked by email;
billing and shipping come from the customer's addresses: the address typed billing (else the primary billing address, else the first), and the address typed shipping (else the primary shipping address, else, for a new store account only, the billing address; an update with no shipping address leaves the store's shipping address as it is);
a field changed in WooCommerce since iPaaS.com last received it, and not changed in iPaaS.com, is left as the store has it (the WooCommerce Sync Baseline).
ID Format
Manual Sync ID Format: Enter the iPaaS.com Customer ID.
External ID Format (saved after sync): the WooCommerce customer id (96); addresses {customer id}|billing and {customer id}|shipping.
Deleted Record Support
Deletes are not sent: a WordPress user deleted would lose their order history.
Custom Field Support
Yes, FROM iPaaS.com: create a custom field for the WooCommerce subscription on its WooCommerce Customer table, named exactly as the meta key, and map a value to it; it is written as a meta entry. Keys starting with _ are not written.
Mapping Collection Status
The template is active. Its filter sends customers with an email only (WooCommerce needs one). You can narrow it, for example to trade accounts only. Decide on WooCommerce's New account email before turning on the Customer events.
Duplicate or Conflicting Mappings
For a second Customer FROM collection, keep the email condition and the WooCommerce Sync Baseline mapping: without the baseline, edits made in the store are overwritten.
This collection has no Collision Handling Method setting. Matching is automatic: a customer not linked yet is matched to a store account by email only, and a match that can't be made safely is refused (WOOC-BIZL-1010, WOOC-BIZL-1015, WOOC-BIZL-1017).
Supported Child Collections
WooCommerce Customer Address FROM iPaaS.com: the billing and shipping addresses (one of each in WooCommerce, Known Limitations 11).
System Caveats
A customer needs an email to be created (WOOC-VALD-1012); an update without one keeps the store's email. Two store users with the email stop the transfer (WOOC-BIZL-1010).
An email that belongs to a store administrator or shop manager is refused, so a staff account is never overwritten (WOOC-BIZL-1015).
Existing store customers with the email are linked and their mapped fields updated (Known Limitations 17).
WooCommerce does not let a username change. An update of a linked customer that maps a different Username keeps the store's username, saves the rest of the customer, then reports WOOC-BIZL-1016. A store customer found by email whose username differs from the mapped Username is not linked or changed (WOOC-BIZL-1017). A mapped Password goes only with a new account, so iPaaS.com cannot reset a shopper's login (Known Limitations 31).
WooCommerce reports the integration's own write as a customer change, so a customer written FROM iPaaS.com comes back once TO iPaaS.com as an ordinary update; it stops there (Known Limitations 32).
Setup Requirements
The iPaaS.com events customer/created and customer/updated turned on in the subscription's FROM iPaaS.com data flows, after the welcome-email decision.
Integration Flow
A customer is created or changed in iPaaS.com.
iPaaS.com runs this collection; the filter decides.
The integration finds the store customer by its link, else by email (a store customer whose username differs from the mapped Username is refused with WOOC-BIZL-1017 before anything is written), holds back fields only the store changed, and creates or updates the account (nothing is written when every field already matches). A mapped Password is sent only on the create. On an update, a different mapped Username is left out and WOOC-BIZL-1016 is reported after the rest is saved.
Mappings
Add/Update WooCommerce Customer FROM iPaaS.com
iPaaS.com data type: Customer. Sync type: Add/Update. Mappings: 5.
Description: iPaaS.com customers with an email address become WooCommerce customers (store accounts), with a billing and a shipping address. Before creating a customer, the integration looks for a WooCommerce customer with the same email and links to it (never to a store administrator's or shop manager's account: WOOC-BIZL-1015). WooCommerce may email a new customer (its New account email); updates never do. On update, a field changed in WooCommerce that iPaaS.com hasn't changed since is kept as WooCommerce has it; this needs the WooCommerce Sync Baseline mapping here and in Add/Update WooCommerce Customer TO iPaaS.com.
Mapping Filter:
// Customers with an email address only: WooCommerce needs one, and it is how an existing customer is found. return !string.IsNullOrEmpty(EmailAddress);
Mapping Type | Source Field (iPaaS.com) | Destination Field (WooCommerce) | Description |
Field | EmailAddress | (Required.) Email. WooCommerce needs one; it also finds an existing customer before a create. | |
Field | FirstName | FirstName | (Recommended.) First name. |
Field | LastName | LastName | (Recommended.) Last name. |
Field | Company | Company | (Optional.) The company, as the billing company. |
Dynamic Formula | formula 1 (below) | SyncBaseline | (Recommended. Keep it.) Reads back the WooCommerce Sync Baseline, so a field changed in WooCommerce that iPaaS.com hasn't changed since is kept. Without it every mapped field is written. |
Dynamic Formulas (verbatim)
Formula 1, SyncBaseline:
return GetCustomFieldValue(CustomFields, "WooCommerce Sync Baseline");
WooCommerce Customer Address FROM iPaaS.com
iPaaS.com data type: Customer Address. Child of: Add/Update WooCommerce Customer FROM iPaaS.com. Sync type: Add/Update. Mappings: 13.
Description: The customer's addresses into WooCommerce's one billing and one shipping address: the address typed or flagged as billing fills the billing address, the one typed or flagged as shipping the shipping address, else the first address; without a shipping address, a new store account gets the billing address for both, and an update leaves the store's shipping address as it is.
Mapping Type | Source Field (iPaaS.com) | Destination Field (WooCommerce) | Description |
Field | Type | Type | (Recommended.) billing or shipping: which WooCommerce address this one fills. |
Field | IsPrimaryBilling | IsPrimaryBilling | (Recommended.) The primary billing address fills the WooCommerce billing address. |
Field | IsPrimaryShipping | IsPrimaryShipping | (Recommended.) The primary shipping address fills the WooCommerce shipping address. |
Field | FirstName | FirstName | (Recommended.) First name on the address. |
Field | LastName | LastName | (Recommended.) Last name on the address. |
Field | Company | Company | (Optional.) Company. |
Field | Address1 | Address1 | (Recommended.) Street 1. |
Field | Address2 | Address2 | (Optional.) Street 2. |
Field | City | City | (Recommended.) City. |
Field | Region | State | (Recommended.) State or county, as a code (for example CA). |
Field | PostalCode | Postcode | (Recommended.) Postal code. |
Field | Country | Country | (Recommended.) Two-letter country code (for example US). |
Field | PhoneNumber | Phone | (Optional.) The phone on the address. |
Error Handling
Every error the integration raises carries a WOOC- code; WooCommerce Error Messages has the full text, cause and what to do for each. iPaaS.com's own refusals have no WOOC- prefix. Connection errors (Store URL, key, host) can stop any transfer and are listed there under "Connection and settings".
Code | When | What to do | Retried by iPaaS.com |
WOOC-VALD-1012 | WooCommerce requires an email for every customer account. | Give the customer an email address in the source record, or map one. | Yes, until fixed or dismissed; it fails the same way until the cause is fixed |
WOOC-BIZL-1010 | The email matches more than one WooCommerce user, so the integration cannot choose. | Merge or correct the duplicate WordPress users, then transfer again. | Yes, until fixed or dismissed; it fails the same way until the cause is fixed |
WOOC-BIZL-1015 | The iPaaS.com customer has the email of a WooCommerce administrator or shop manager. Linking would overwrite the staff account's name and addresses with the customer's. | Give the iPaaS.com customer its own email address, or leave it out with the collection's filter, then transfer it again. If the customer is already linked to the staff account, a new email alone does not help: also remove the customer's link in iPaaS.com (its external id for this subscription; your Managed Integration Service Provider (MiSP) or iPaaS.com Support can do it), then transfer it again. | Yes, until fixed or dismissed; it fails the same way until the cause is fixed |
WOOC-BIZL-1016 | The mapped Username differs from the username the customer already has in WooCommerce. The rest of the customer was saved. | Leave Username unmapped for customers that already exist, or map the store's username. | Yes, until fixed or dismissed; it fails the same way until the cause is fixed |
WOOC-BIZL-1017 | The iPaaS.com customer's email matches a WooCommerce customer with a different username, so they may not be the same person. Nothing was written or linked. | If it is the same person, leave Username unmapped or map the store's username. If not, give the iPaaS.com customer its own email address. Then transfer it again. | Yes, until fixed or dismissed; it fails the same way until the cause is fixed |
Testing and Validation
Follow the WooCommerce Installation Instructions, "Before you test: test safely": test on a staging copy of the store with its own subscription, if your host offers one; on your live store, test before your back-office systems are connected, with a Private test product and your own name and email address.
Create a test customer in iPaaS.com with an email you own and an address: a user with role Customer appears under Users in WordPress.
Change the last name in iPaaS.com: the same user is updated.
Additional Notes
A customer's phone and company go on the billing address.
Related Documents
iPaaS.com <> WooCommerce: Background
Related Mapping Documentation
WooCommerce Customer TO iPaaS.com Mapping Documentation
