Skip to main content

WooCommerce Order TO iPaaS.com Mapping Documentation

How the WooCommerce integration brings committed WooCommerce orders TO iPaaS.com with their lines, fees, addresses, payment, taxes and coupons, and keeps them up to date as they change.

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 WooCommerce orders TO iPaaS.com. Two collections share the work:

  • Add WooCommerce Order TO iPaaS.com creates an iPaaS.com Order for each committed order: processing, completed, on hold (WooCommerce has already reduced the stock) or refunded (a sale refunded before it first reached iPaaS.com). Pending, failed and cancelled orders are not created; a pending order is created when it is paid.

  • Update WooCommerce Order TO iPaaS.com updates an order already in iPaaS.com: status changes, payments, edits and cancellations.

Each order arrives with its product and fee lines (on iPaaS.com products: the linked product's SKU, else the WooCommerce SKU, else a stand-in), billing and shipping addresses with the shipping method, its payment once paid, its taxes and its coupons as discounts, linked to its customer. Refunds have their own collection (WooCommerce Refund TO iPaaS.com).

ID Format

Manual Sync ID Format: Enter the WooCommerce order id (the number in the address of the order's edit page).

External ID Format (saved after sync): the WooCommerce order id (1307). Children: lines {order id}|{line id} and fees {order id}|fee-{id}, addresses {order id}|billing and |shipping, the payment {order id}|payment, taxes {order id}|tax-{id}, coupons {order id}|coupon-{id}.

Deleted Record Support

Trashed and deleted orders are not sent (Known Limitations 4); the iPaaS.com transaction stays as it was. Cancel an order in WooCommerce instead: the cancellation reaches iPaaS.com as a status change.

Custom Field Support

Yes, TO iPaaS.com: an order's public meta entries (keys not starting with _) are offered as custom fields. Create two custom fields: one for the WooCommerce subscription on its WooCommerce Order table named exactly as the meta key, and the iPaaS.com transaction custom field that will hold the value; then map one to the other (Custom to Custom). The order screen's Custom Fields panel in WordPress shows the keys (turn it on under Screen Options).

The template also writes WooCommerce Refund Ids, the refunds the order has, which keeps each refund linked to its order.

Mapping Collection Status

Both templates are active. The Add filter takes committed orders only; to also send pending orders (a business that ships before payment), add || !IsRefund && Status == "pending" to its return. The Update filter takes every order except refunds: leave it as it is, or cancellations are lost.

Required before go-live: replace the two "REPLACE ..." stand-in SKUs in the line Sku formula of all three order collections (keep the quotation marks and the rest of the formula), and the REPLACE targets of the payment method and shipping method translations with your iPaaS.com values (WooCommerce Installation Instructions, Set the stand-in SKUs and Review the translations).

Duplicate or Conflicting Mappings

TO iPaaS.com, an update replaces the whole record: deleting a mapping clears that field on the next update (Known Limitations 26). The Update collections keep every field WooCommerce has no value for, so another system's values survive. To stop sending a field, change its mapping to a keep-formula such as return DestinationValue != null ? DestinationValue.Status : null;. Keep every mapping marked Required: deleting one clears an amount or a street line. Still exposed: a mapping you delete or replace. A second Order TO collection must not overlap with the first: a record matching both is replaced by the later one with only its own fields (Known Limitations 28).

These collections have no Collision Handling Method setting, and the integration does not match orders: an order not linked yet whose order number another system already sent to iPaaS.com is refused as a duplicate and nothing is linked (Known Limitations 27).

Supported Child Collections

For each of the two collections:

  • Order Line: product and fee lines.

  • Order Address: billing and shipping, with the shipping method on the shipping address.

  • Order Payment: one Captured payment for the order total, once WooCommerce records the order as paid.

  • Order Tax: one per tax rate.

  • Order Coupon: one discount per coupon.

System Caveats

  • Every line must be an iPaaS.com product: an order with a line whose SKU isn't one is refused whole (iPaaS.com: "Product Id: … does not exist"), so send the store's products TO iPaaS.com first (Known Limitations 2).

  • A payment or shipping method translation target still reading REPLACE refuses the whole order (iPaaS.com VALD-1036), and nothing is written.

  • A paid order whose payment method has no translation row, or an order whose status has none, is refused whole (VALD-1024): add the row, then resend the order.

  • Guest orders arrive with the billing name and email but no customer (Known Limitations 15).

  • Order status and tracking are not written back to WooCommerce (Known Limitations 8).

  • A line removed after the order reached iPaaS.com stays on the transaction (Known Limitations 25). The order's phone number is not sent (Known Limitations 23).

  • An order number another system already sent to iPaaS.com is refused (Known Limitations 27).

  • WooCommerce sends webhooks from WordPress's scheduled tasks, which run when the site has visitors; the order poll catches up (Known Limitations 24).

Setup Requirements

  1. The products in iPaaS.com, the stand-in SKUs and the translations set (Mapping Collection Status).

  2. The webhook scopes order.created and order.updated turned on: the integration registers the webhooks in the store.

  3. A Webhook (Poll Request) event for order/poll, every 15 minutes, and Order Poll Initial Days set before its first run.

Integration Flow

  1. An order is placed or changed in WooCommerce; WooCommerce sends its webhook (or the next order poll finds it).

  2. iPaaS.com runs the Add collection for an order it doesn't have, the Update collection for one it has; the filter decides.

  3. The integration reads the order, fills its customer link and each line's iPaaS.com SKU, and the transaction is written with its children.

  4. Each refund of the order not yet in iPaaS.com is then queued as its own transfer.

Mappings

Add WooCommerce Order TO iPaaS.com

iPaaS.com data type: Transaction. Sync type: Add. Mappings: 15.

Description: Committed WooCommerce orders become iPaaS.com orders, with their product and fee lines, billing and shipping addresses, payment, taxes and coupons: orders that are processing, completed, on hold or refunded. Pending, failed and cancelled orders are not created; a pending order is created when it later moves to one of these statuses. Orders arrive by webhook and by the order poll. Every line must be an iPaaS.com product, so the store's products must be in iPaaS.com first. Refunds are created by Add WooCommerce Refund TO iPaaS.com.

Mapping Filter:

// Committed orders only: paid (processing, completed), on hold (WooCommerce has already reduced the stock),
// and refunded (a sale refunded before it first reached iPaaS.com, so the sale and then its return both arrive).
// Pending, failed and cancelled orders are not created. If your business ships before payment, add: || !IsRefund && Status == "pending"
// (No grouping parentheses: iPaaS.com filters refuse them and silently skip every record.)
// Refunds have their own collection (Add WooCommerce Refund TO iPaaS.com).
return !IsRefund && Status == "processing" || !IsRefund && Status == "completed" || !IsRefund && Status == "on-hold" || !IsRefund && Status == "refunded";

Mapping Type

Source Field (WooCommerce)

Destination Field (iPaaS.com)

Description

Dynamic Formula

formula 1 (below)

SystemId

(Required. Do not change.) Links the transaction to this subscription; iPaaS.com refuses a new transaction without it.

Field

Number

TransactionNumber

(Required.) The order number shown to the shopper.

Field

Type

Type

(Required.) Order for an order.

Lookup Translation

Status, through WooCommerce Order Status TO iPaaS.com

Status

(Required.) The WooCommerce status through the WooCommerce Order Status translation. iPaaS.com refuses an order whose status has no row and nothing is written; add a row for every status your store uses, then send the order again.

Dynamic Formula

formula 2 (below)

CustomerId

(Recommended.) The iPaaS.com customer of the registered WooCommerce customer, once that customer is in iPaaS.com. A guest order has none and carries the billing email and address.

Field

Email

EmailAddress

(Recommended.) The billing email.

Field

Subtotal

Subtotal

(Recommended.) The product lines before discounts and tax.

Field

DiscountTotal

DiscountAmount

(Optional.) The total discount before tax (coupons are listed in the coupon child collection).

Field

TaxTotal

TaxAmount

(Recommended.) Total tax.

Field

ShippingTotal

ShippingAmount

(Optional.) Shipping before tax.

Field

Total

Total

(Required.) The grand total.

Field

TotalQty

TotalQty

(Optional.) Total quantity of the product lines.

Field

DateCreated

TransactionCreatedDateTime

(Recommended.) When the order was placed, in UTC.

Field

DateModified

TransactionUpdatedDateTime

(Optional.) When the order last changed, in UTC.

Field

RefundIds

WooCommerce Refund Ids (Custom Field)

(Recommended.) The ids of the order's current WooCommerce refunds, comma-separated. Each refund also arrives as its own Return transaction; a refund deleted in WooCommerce drops off this list, so the deletion shows on the order.

Lookup Translation Tables

WooCommerce Order Status TO iPaaS.com:

Source Value (WooCommerce)

Destination Value (iPaaS.com)

Notes

pending

Awaiting Payment

An unpaid order. The Add filter doesn't create it; an order already in iPaaS.com can move to it.

failed

Awaiting Payment

A failed payment. The Add filter doesn't create it.

processing

Processing

Paid, to be fulfilled.

on-hold

On Hold

Awaiting confirmation of payment; WooCommerce has already reduced the stock.

completed

Complete

Fulfilled.

cancelled

Cancelled

Cancelled in WooCommerce; reaches an order already in iPaaS.com as a status change.

refunded

Refunded

Fully refunded. Refunds use it too.

checkout-draft

Draft

A checkout not yet placed. The Add filter doesn't create it.

Add a row for every other status your store uses (for example one added by a plugin) before the first order with it arrives: iPaaS.com refuses an order whose status has no row (Known Limitations 33).

Dynamic Formulas (verbatim)

Formula 1, SystemId:

return SpaceportSystemId;

Formula 2, CustomerId:

// The iPaaS.com customer of a registered WooCommerce customer who is already in iPaaS.com; empty for a guest order.
long id;
return long.TryParse(IpaasCustomerId, out id) ? (long?)id : null;

WooCommerce Order Line TO iPaaS.com (Add Order)

iPaaS.com data type: Transaction Line. Child of: Add WooCommerce Order TO iPaaS.com. Sync type: Add/Update. Mappings: 11.

Description: The order's product lines and fee lines. Every line must be an iPaaS.com product: a product line carries the linked iPaaS.com product's SKU, else its WooCommerce SKU, else the stand-in SKU for products without one; a fee line carries the fee item SKU. Replace both placeholders before the first order arrives.

Mapping Type

Source Field (WooCommerce)

Destination Field (iPaaS.com)

Description

Dynamic Formula

formula 3 (below)

Sku

(Required. Replace the two placeholders.) The line's iPaaS.com product SKU: the linked iPaaS.com product's SKU, else the WooCommerce SKU. Placeholder value — replace during implementation: replace "REPLACE with your SKU for products without one" with the SKU of an iPaaS.com product used for lines whose WooCommerce product has no SKU, and "REPLACE with your fee item SKU" with the SKU of the iPaaS.com product that stands for fees. Pre-install prerequisite — the transfer fails without it. Each stand-in MUST be the SKU of a product that exists in iPaaS.com: either (a) create iPaaS.com products with the SKUs you put here, or (b) put the SKUs of existing iPaaS.com products here; one of these must be done before the first order arrives. Until then, iPaaS.com refuses every order with such a line and nothing is written, with an error that names the stand-in, for example NFND-1003 - Product Id: REPLACE with your fee item SKU does not exist or can not be found. Make the same change in the other two order collections. Change only the quoted REPLACE texts and keep the quotation marks; if you replace the whole formula with a SKU, every line gets that SKU.

Field

Name

Description

(Recommended.) The line's name as shown on the order.

Static

Product

Type

(Required.) Product for every line. iPaaS.com accepts only Product and Gift Card lines, and a Product line must name an iPaaS.com product: fee lines travel as Product lines on the fee stand-in product the Sku mapping names.

Dynamic Formula

formula 4 (below)

Status

(Required.) Returned on a refund, Cancelled on a cancelled order; otherwise a status another system gave the line (for example Shipped) is kept, and a line that is new or still Pending becomes Complete when the order is completed, else Pending.

Field

Quantity

Qty

(Required.) Quantity.

Field

UnitPrice

UnitPrice

(Required.) The price per unit after discounts, before tax.

Field

OriginalUnitPrice

OriginalUnitPrice

(Optional.) The price per unit before discounts.

Field

Total

ExtendedPrice

(Recommended.) The line amount after discounts, before tax.

Field

DiscountAmount

DiscountAmount

(Optional.) The line's discount.

Field

TotalTax

EstimatedTaxAmount

(Optional.) The line's tax.

Field

TaxPercent

TaxPercent

(Optional.) The line's tax as a percent of the line amount.

Dynamic Formulas (verbatim)

Formula 3, Sku:

// Fee lines: the iPaaS.com product that stands for fees.
if (LineType == "Fee") return "REPLACE with your fee item SKU";
// Product lines: the SKU of the linked iPaaS.com product or variant (it survives a SKU edited in WooCommerce), else the WooCommerce SKU,
// else the stand-in SKU for products without one.
if (!string.IsNullOrWhiteSpace(IpaasSku)) return IpaasSku;
if (!string.IsNullOrWhiteSpace(Sku)) return Sku;
return "REPLACE with your SKU for products without one";

Formula 4, Status:

// A refund's lines are returned; a cancelled order cancels its lines.
if (Parent.IsRefund) return "Returned";
if (Parent.Status == "cancelled") return "Cancelled";
// Keep a status another system gave the line (for example Shipped); a line still Pending follows the order: Complete once the order is completed.
if (DestinationValue != null && !string.IsNullOrWhiteSpace(DestinationValue.Status) && DestinationValue.Status != "Pending") return DestinationValue.Status;
return Parent.Status == "completed" ? "Complete" : "Pending";

WooCommerce Order Address TO iPaaS.com (Add Order)

iPaaS.com data type: Transaction Address. Child of: Add WooCommerce Order TO iPaaS.com. Sync type: Add/Update. Mappings: 14.

Description: The order's billing and shipping addresses. The shipping address carries the shipping method (translated) and its name.

Mapping Type

Source Field (WooCommerce)

Destination Field (iPaaS.com)

Description

Field

IsPrimaryBilling

IsPrimaryBilling

(Recommended.) True for the billing address.

Field

IsPrimaryShipping

IsPrimaryShipping

(Recommended.) True for the shipping address.

Field

FirstName

FirstName

(Recommended.) First name.

Field

LastName

LastName

(Recommended.) Last name.

Field

Company

Company

(Optional.) Company.

Field

Address1

Address1

(Recommended.) Street 1.

Field

Address2

Address2

(Optional.) Street 2.

Field

City

City

(Recommended.) City.

Field

State

Region

(Recommended.) State or county code.

Field

Postcode

PostalCode

(Recommended.) Postal code.

Field

Country

Country

(Recommended.) Two-letter country code.

Lookup Translation

ShippingMethod, through WooCommerce Shipping Method TO iPaaS.com

ShippingMethod

(Recommended.) Shipping address only: the WooCommerce shipping method through the WooCommerce Shipping Method translation. Add a row for every shipping method your store offers.

Field

ShippingMethodDescription

ShippingMethodDescription

(Optional.) Shipping address only: the shipping method's name as the shopper saw it.

Field

ShippingAmount

ShippingAmount

(Optional.) Shipping address only: the shipping charge before tax.

Lookup Translation Tables

WooCommerce Shipping Method TO iPaaS.com:

Source Value (WooCommerce)

Destination Value (iPaaS.com)

Notes

flat_rate

Your iPaaS.com shipping method for flat-rate delivery

WooCommerce's Flat rate method.

free_shipping

Your iPaaS.com shipping method for free delivery

WooCommerce's Free shipping method.

local_pickup

Your iPaaS.com shipping method for collection

WooCommerce's Local pickup method.

Placeholder value — replace during implementation: each destination in the template starts with REPLACE with. Replace it with the matching shipping method of your iPaaS.com company, and add a row for every other shipping method your store offers. Pre-install prerequisite — the transfer fails without it. Every target MUST be the exact name of a Shipping Method in your iPaaS.com company: either (a) set the target to one of your iPaaS.com Shipping Methods, or (b) create a Shipping Method in iPaaS.com with the target's name; one of these must be done before the first order arrives. A target still reading REPLACE with, or naming a method your company doesn't have, refuses the whole order and nothing is written, with VALD-1036 - Value (…) provided for Address Shipping Method is not valid, naming the value.

WooCommerce Order Payment TO iPaaS.com (Add Order)

iPaaS.com data type: Transaction Payment. Child of: Add WooCommerce Order TO iPaaS.com. Sync type: Add/Update. Mappings: 4.

Description: The order's payment, once WooCommerce records it as paid (an unpaid or authorised-only order has none). The payment method comes through the WooCommerce Payment Method translation: iPaaS.com refuses a payment whose method isn't one of your iPaaS.com Payment Methods, so replace every REPLACE value in the translation before the first order arrives.

Mapping Type

Source Field (WooCommerce)

Destination Field (iPaaS.com)

Description

Lookup Translation

Method, through WooCommerce Payment Method TO iPaaS.com

Method

(Required.) The WooCommerce payment method through the WooCommerce Payment Method translation. iPaaS.com refuses a payment whose method is still a REPLACE text or isn't one of your Payment Methods (Payment Method is not valid). iPaaS.com refuses an order whose payment method has no row and nothing is written; add a row for every payment method your store uses, then send the order again.

Field

Amount

Amount

(Required.) The amount paid.

Field

Status

Status

(Required.) Captured for a paid order.

Dynamic Formula

formula 5 (below)

Description

(Optional.) The payment method's name and the payment gateway's transaction id.

Lookup Translation Tables

WooCommerce Payment Method TO iPaaS.com:

Source Value (WooCommerce)

Destination Value (iPaaS.com)

Notes

bacs

Your iPaaS.com payment method for bank transfers

WooCommerce's Direct bank transfer method.

cheque

Your iPaaS.com payment method for check payments

WooCommerce's Check payments method.

cod

Your iPaaS.com payment method for cash on delivery

WooCommerce's Cash on delivery method.

woocommerce_payments

Your iPaaS.com payment method for card payments

WooCommerce's own card payments.

Placeholder value — replace during implementation: each destination in the template starts with REPLACE with. Replace it with the matching payment method of your iPaaS.com company, and add a row for every other payment method your store offers, using the method's id from WooCommerce > Settings > Payments. Pre-install prerequisite — the transfer fails without it. Every target MUST be the exact name of a Payment Method in your iPaaS.com company: either (a) set the target to one of your iPaaS.com Payment Methods, or (b) create a Payment Method in iPaaS.com with the target's name; one of these must be done before the first order arrives. Nothing is written when a paid order is refused: an order whose method has no row is refused whole, and one whose target still reads REPLACE with or names a method your company doesn't have is refused with VALD-1036 - Value (…) provided for Payment Method is not valid, naming the value.

Dynamic Formulas (verbatim)

Formula 5, Description:

// The payment method's name and the payment gateway's transaction id.
var text = !string.IsNullOrWhiteSpace(MethodTitle) ? MethodTitle : Method;
if (!string.IsNullOrWhiteSpace(TransactionId)) text = text + " " + TransactionId;
return text;

WooCommerce Order Tax TO iPaaS.com (Add Order)

iPaaS.com data type: Transaction Tax. Child of: Add WooCommerce Order TO iPaaS.com. Sync type: Add/Update. Mappings: 3.

Description: One record per tax rate on the order, with the tax on items and shipping together.

Mapping Type

Source Field (WooCommerce)

Destination Field (iPaaS.com)

Description

Dynamic Formula

formula 6 (below)

Authority

(Recommended.) The tax rate's label, else its code.

Field

Amount

Amount

(Required.) The tax for this rate, items plus shipping.

Field

RatePercent

TaxPercent

(Optional.) The rate as a percentage.

Dynamic Formulas (verbatim)

Formula 6, Authority:

return !string.IsNullOrWhiteSpace(Label) ? Label : Code;

WooCommerce Order Coupon TO iPaaS.com (Add Order)

iPaaS.com data type: Transaction Discount. Child of: Add WooCommerce Order TO iPaaS.com. Sync type: Add/Update. Mappings: 2.

Description: The coupons used on the order, each with its discount before tax.

Mapping Type

Source Field (WooCommerce)

Destination Field (iPaaS.com)

Description

Field

Code

CouponCode

(Recommended.) The coupon code.

Field

Amount

DiscountAmount

(Required.) The coupon's discount, before tax.

Update WooCommerce Order TO iPaaS.com

iPaaS.com data type: Transaction. Sync type: Update. Mappings: 17.

Description: Changes to orders already in iPaaS.com: status changes, payments, cancellations and edits update the same transaction, never a second one. Lines are updated in place, not added again; a line removed in WooCommerce after the order reached iPaaS.com stays on the transaction. Fields WooCommerce doesn't own are kept (the order's company and parent transaction, a guest order's customer, and on the lines, addresses, payment, taxes and coupons the fields WooCommerce has no value for, such as a line's shipped quantity or a shipping address's ship date). The status is WooCommerce's: a status another system set in iPaaS.com is replaced by the next change in WooCommerce. To keep the back office's status, change the Status mapping to keep the iPaaS.com value. To stop WooCommerce changing a field in iPaaS.com, change its mapping to keep the iPaaS.com value instead of deleting it: a deleted mapping sends the field empty and clears it in iPaaS.com.

Mapping Filter:

// Every order change except refunds (they have their own collection). An update reaches only an order already in iPaaS.com,
// so later status changes, cancellations and payments of linked orders arrive; orders never created are not added here.
return !IsRefund;

Mapping Type

Source Field (WooCommerce)

Destination Field (iPaaS.com)

Description

Dynamic Formula

formula 7 (below)

SystemId

(Required. Do not change.) Links the transaction to this subscription; iPaaS.com refuses a new transaction without it. Kept when the transaction already has one.

Field

Number

TransactionNumber

(Required.) The order number shown to the shopper.

Field

Type

Type

(Required.) Order for an order.

Lookup Translation

Status, through WooCommerce Order Status TO iPaaS.com

Status

(Required.) The WooCommerce status through the WooCommerce Order Status translation. iPaaS.com refuses an order whose status has no row and nothing is written; add a row for every status your store uses, then send the order again.

Dynamic Formula

formula 8 (below)

CustomerId

(Recommended.) The iPaaS.com customer of the registered WooCommerce customer, once that customer is in iPaaS.com. A guest order keeps the customer iPaaS.com already has.

Dynamic Formula

formula 9 (below)

EmailAddress

(Recommended.) The billing email. When the WooCommerce order has none, the email iPaaS.com already has is kept.

Field

Subtotal

Subtotal

(Required.) The product lines before discounts and tax.

Field

DiscountTotal

DiscountAmount

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) The total discount before tax (coupons are listed in the coupon child collection).

Field

TaxTotal

TaxAmount

(Required.) Total tax.

Field

ShippingTotal

ShippingAmount

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) Shipping before tax.

Field

Total

Total

(Required.) The grand total.

Field

TotalQty

TotalQty

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) Total quantity of the product lines.

Field

DateCreated

TransactionCreatedDateTime

(Recommended.) When the order was placed, in UTC.

Field

DateModified

TransactionUpdatedDateTime

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) When the order last changed, in UTC.

Field

RefundIds

WooCommerce Refund Ids (Custom Field)

(Recommended.) The ids of the order's current WooCommerce refunds, comma-separated. Each refund also arrives as its own Return transaction; a refund deleted in WooCommerce drops off this list, so the deletion shows on the order.

Dynamic Formula

formula 10 (below)

CompanyId

(Keep it.) Kept: WooCommerce doesn't own the order's iPaaS.com company.

Dynamic Formula

formula 11 (below)

ParentId

(Keep it.) Kept: WooCommerce doesn't own the parent transaction.

Lookup Translation Tables: WooCommerce Order Status TO iPaaS.com, as shown under Add WooCommerce Order TO iPaaS.com above.

Dynamic Formulas (verbatim)

Formula 7, SystemId:

return DestinationValue != null ? (object)DestinationValue.SystemId : SpaceportSystemId;

Formula 8, CustomerId:

// The WooCommerce customer's iPaaS.com customer; kept when the order has none (a guest order another system linked to a customer).
long id;
if (long.TryParse(IpaasCustomerId, out id)) return id;
return DestinationValue != null ? DestinationValue.CustomerId : null;

Formula 9, EmailAddress:

// The billing email; kept when the WooCommerce order has none.
return !string.IsNullOrWhiteSpace(Email) ? Email : (DestinationValue != null ? DestinationValue.EmailAddress : null);

Formula 10, CompanyId:

return DestinationValue != null ? DestinationValue.CompanyId : null;

Formula 11, ParentId:

return DestinationValue != null ? DestinationValue.ParentId : null;

WooCommerce Order Line TO iPaaS.com (Update Order)

iPaaS.com data type: Transaction Line. Child of: Update WooCommerce Order TO iPaaS.com. Sync type: Add/Update. Mappings: 16.

Description: The order's product lines and fee lines. Every line must be an iPaaS.com product: a product line carries the linked iPaaS.com product's SKU, else its WooCommerce SKU, else the stand-in SKU for products without one; a fee line carries the fee item SKU. Replace both placeholders before the first order arrives.

Mapping Type

Source Field (WooCommerce)

Destination Field (iPaaS.com)

Description

Dynamic Formula

formula 12 (below)

Sku

(Required. Replace the two placeholders.) The line's iPaaS.com product SKU: the linked iPaaS.com product's SKU, else the WooCommerce SKU. Placeholder value — replace during implementation: replace "REPLACE with your SKU for products without one" with the SKU of an iPaaS.com product used for lines whose WooCommerce product has no SKU, and "REPLACE with your fee item SKU" with the SKU of the iPaaS.com product that stands for fees. Pre-install prerequisite — the transfer fails without it. Each stand-in MUST be the SKU of a product that exists in iPaaS.com: either (a) create iPaaS.com products with the SKUs you put here, or (b) put the SKUs of existing iPaaS.com products here; one of these must be done before the first order arrives. Until then, iPaaS.com refuses every order with such a line and nothing is written, with an error that names the stand-in, for example NFND-1003 - Product Id: REPLACE with your fee item SKU does not exist or can not be found. Make the same change in the other two order collections. Change only the quoted REPLACE texts and keep the quotation marks; if you replace the whole formula with a SKU, every line gets that SKU.

Field

Name

Description

(Recommended.) The line's name as shown on the order.

Static

Product

Type

(Required.) Product for every line. iPaaS.com accepts only Product and Gift Card lines, and a Product line must name an iPaaS.com product: fee lines travel as Product lines on the fee stand-in product the Sku mapping names.

Dynamic Formula

formula 13 (below)

Status

(Required.) Returned on a refund, Cancelled on a cancelled order; otherwise a status another system gave the line (for example Shipped) is kept, and a line that is new or still Pending becomes Complete when the order is completed, else Pending.

Field

Quantity

Qty

(Required.) Quantity.

Field

UnitPrice

UnitPrice

(Required.) The price per unit after discounts, before tax.

Field

OriginalUnitPrice

OriginalUnitPrice

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) The price per unit before discounts.

Field

Total

ExtendedPrice

(Required.) The line amount after discounts, before tax.

Field

DiscountAmount

DiscountAmount

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) The line's discount.

Field

TotalTax

EstimatedTaxAmount

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) The line's tax.

Field

TaxPercent

TaxPercent

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) The line's tax as a percent of the line amount.

Dynamic Formula

formula 17 (below)

QtyShipped

This is an optional field. Keeps the value your systems set: WooCommerce has no QtyShipped, and an update replaces the whole record, so without this mapping the value would be cleared each time the record transfers again.

Dynamic Formula

formula 18 (below)

DiscountPercent

This is an optional field. Keeps the value your systems set: WooCommerce has no DiscountPercent, and an update replaces the whole record, so without this mapping the value would be cleared each time the record transfers again.

Dynamic Formula

formula 19 (below)

Weight

This is an optional field. Keeps the value your systems set: WooCommerce has no Weight, and an update replaces the whole record, so without this mapping the value would be cleared each time the record transfers again.

Dynamic Formula

formula 20 (below)

SequenceNumber

This is an optional field. Keeps the value your systems set: WooCommerce has no SequenceNumber, and an update replaces the whole record, so without this mapping the value would be cleared each time the record transfers again.

Dynamic Formula

formula 21 (below)

LineInfo

This is an optional field. Keeps the value your systems set: WooCommerce has no LineInfo, and an update replaces the whole record, so without this mapping the value would be cleared each time the record transfers again.

Dynamic Formulas (verbatim)

Formula 12, Sku:

// Fee lines: the iPaaS.com product that stands for fees.
if (LineType == "Fee") return "REPLACE with your fee item SKU";
// Product lines: the SKU of the linked iPaaS.com product or variant (it survives a SKU edited in WooCommerce), else the WooCommerce SKU,
// else the stand-in SKU for products without one.
if (!string.IsNullOrWhiteSpace(IpaasSku)) return IpaasSku;
if (!string.IsNullOrWhiteSpace(Sku)) return Sku;
return "REPLACE with your SKU for products without one";

Formula 13, Status:

// A refund's lines are returned; a cancelled order cancels its lines.
if (Parent.IsRefund) return "Returned";
if (Parent.Status == "cancelled") return "Cancelled";
// Keep a status another system gave the line (for example Shipped); a line still Pending follows the order: Complete once the order is completed.
if (DestinationValue != null && !string.IsNullOrWhiteSpace(DestinationValue.Status) && DestinationValue.Status != "Pending") return DestinationValue.Status;
return Parent.Status == "completed" ? "Complete" : "Pending";

Formula 17, QtyShipped:

return DestinationValue != null ? (object)DestinationValue.QtyShipped : null;

Formula 18, DiscountPercent:

return DestinationValue != null ? (object)DestinationValue.DiscountPercent : null;

Formula 19, Weight:

return DestinationValue != null ? (object)DestinationValue.Weight : null;

Formula 20, SequenceNumber:

return DestinationValue != null ? (object)DestinationValue.SequenceNumber : null;

Formula 21, LineInfo:

return DestinationValue != null ? (object)DestinationValue.LineInfo : null;

WooCommerce Order Address TO iPaaS.com (Update Order)

iPaaS.com data type: Transaction Address. Child of: Update WooCommerce Order TO iPaaS.com. Sync type: Add/Update. Mappings: 16.

Description: The order's billing and shipping addresses. The shipping address carries the shipping method (translated) and its name.

Mapping Type

Source Field (WooCommerce)

Destination Field (iPaaS.com)

Description

Field

IsPrimaryBilling

IsPrimaryBilling

(Recommended.) True for the billing address.

Field

IsPrimaryShipping

IsPrimaryShipping

(Recommended.) True for the shipping address.

Field

FirstName

FirstName

(Recommended.) First name.

Field

LastName

LastName

(Recommended.) Last name.

Field

Company

Company

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) Company.

Field

Address1

Address1

(Required.) Street 1.

Field

Address2

Address2

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) Street 2.

Field

City

City

(Recommended.) City.

Field

State

Region

(Recommended.) State or county code.

Field

Postcode

PostalCode

(Recommended.) Postal code.

Field

Country

Country

(Recommended.) Two-letter country code.

Lookup Translation

ShippingMethod, through WooCommerce Shipping Method TO iPaaS.com

ShippingMethod

(Recommended.) Shipping address only: the WooCommerce shipping method through the WooCommerce Shipping Method translation. Add a row for every shipping method your store offers.

Field

ShippingMethodDescription

ShippingMethodDescription

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) Shipping address only: the shipping method's name as the shopper saw it.

Field

ShippingAmount

ShippingAmount

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) Shipping address only: the shipping charge before tax.

Dynamic Formula

formula 14 (below)

Address3

(Keep it.) Kept: WooCommerce addresses have no third street line.

Dynamic Formula

formula 22 (below)

ShipDate

This is an optional field. Keeps the value your systems set: WooCommerce has no ShipDate, and an update replaces the whole record, so without this mapping the value would be cleared each time the record transfers again.

Lookup Translation Tables: WooCommerce Shipping Method TO iPaaS.com, as shown under WooCommerce Order Address TO iPaaS.com (Add Order) above.

Dynamic Formulas (verbatim)

Formula 14, Address3:

return DestinationValue != null ? DestinationValue.Address3 : null;

Formula 22, ShipDate:

// Keep the ship date another system set (read as a date-time offset; the field takes a date-time).
return DestinationValue != null && DestinationValue.ShipDate != null ? (object)((DateTimeOffset)DestinationValue.ShipDate).UtcDateTime : null;

WooCommerce Order Payment TO iPaaS.com (Update Order)

iPaaS.com data type: Transaction Payment. Child of: Update WooCommerce Order TO iPaaS.com. Sync type: Add/Update. Mappings: 5.

Description: The order's payment, once WooCommerce records it as paid (an unpaid or authorised-only order has none). The payment method comes through the WooCommerce Payment Method translation: iPaaS.com refuses a payment whose method isn't one of your iPaaS.com Payment Methods, so replace every REPLACE value in the translation before the first order arrives.

Mapping Type

Source Field (WooCommerce)

Destination Field (iPaaS.com)

Description

Lookup Translation

Method, through WooCommerce Payment Method TO iPaaS.com

Method

(Required.) The WooCommerce payment method through the WooCommerce Payment Method translation. iPaaS.com refuses a payment whose method is still a REPLACE text or isn't one of your Payment Methods (Payment Method is not valid). iPaaS.com refuses an order whose payment method has no row and nothing is written; add a row for every payment method your store uses, then send the order again.

Field

Amount

Amount

(Required.) The amount paid.

Field

Status

Status

(Required.) Captured for a paid order.

Dynamic Formula

formula 15 (below)

Description

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) The payment method's name and the payment gateway's transaction id.

Dynamic Formula

formula 23 (below)

MethodInfo

This is an optional field. Keeps the value your systems set: WooCommerce has no MethodInfo, and an update replaces the whole record, so without this mapping the value would be cleared each time the record transfers again.

Lookup Translation Tables: WooCommerce Payment Method TO iPaaS.com, as shown under WooCommerce Order Payment TO iPaaS.com (Add Order) above.

Dynamic Formulas (verbatim)

Formula 15, Description:

// The payment method's name and the payment gateway's transaction id.
var text = !string.IsNullOrWhiteSpace(MethodTitle) ? MethodTitle : Method;
if (!string.IsNullOrWhiteSpace(TransactionId)) text = text + " " + TransactionId;
return text;

Formula 23, MethodInfo:

return DestinationValue != null ? (object)DestinationValue.MethodInfo : null;

WooCommerce Order Tax TO iPaaS.com (Update Order)

iPaaS.com data type: Transaction Tax. Child of: Update WooCommerce Order TO iPaaS.com. Sync type: Add/Update. Mappings: 4.

Description: One record per tax rate on the order, with the tax on items and shipping together.

Mapping Type

Source Field (WooCommerce)

Destination Field (iPaaS.com)

Description

Dynamic Formula

formula 16 (below)

Authority

(Recommended.) The tax rate's label, else its code.

Field

Amount

Amount

(Required.) The tax for this rate, items plus shipping.

Field

RatePercent

TaxPercent

(Optional. To stop sending it, change it to a keep-formula: deleting it clears the field in iPaaS.com on the next update.) The rate as a percentage.

Dynamic Formula

formula 24 (below)

OriginalAmount

This is an optional field. Keeps the value your systems set: WooCommerce has no OriginalAmount, and an update replaces the whole record, so without this mapping the value would be cleared each time the record transfers again.

Dynamic Formulas (verbatim)

Formula 16, Authority:

return !string.IsNullOrWhiteSpace(Label) ? Label : Code;

Formula 24, OriginalAmount:

return DestinationValue != null ? (object)DestinationValue.OriginalAmount : null;

WooCommerce Order Coupon TO iPaaS.com (Update Order)

iPaaS.com data type: Transaction Discount. Child of: Update WooCommerce Order TO iPaaS.com. Sync type: Add/Update. Mappings: 4.

Description: The coupons used on the order, each with its discount before tax.

Mapping Type

Source Field (WooCommerce)

Destination Field (iPaaS.com)

Description

Field

Code

CouponCode

(Recommended.) The coupon code.

Field

Amount

DiscountAmount

(Required.) The coupon's discount, before tax.

Dynamic Formula

formula 25 (below)

DiscountMethod

This is an optional field. Keeps the value your systems set: WooCommerce has no DiscountMethod, and an update replaces the whole record, so without this mapping the value would be cleared each time the record transfers again.

Dynamic Formula

formula 26 (below)

DiscountPercent

This is an optional field. Keeps the value your systems set: WooCommerce has no DiscountPercent, and an update replaces the whole record, so without this mapping the value would be cleared each time the record transfers again.

Dynamic Formulas (verbatim)

Formula 25, DiscountMethod:

return DestinationValue != null ? (object)DestinationValue.DiscountMethod : null;

Formula 26, DiscountPercent:

return DestinationValue != null ? (object)DestinationValue.DiscountPercent : null;

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-1011

The transfer named an id that is neither an order number nor an order-refund pair.

Transfer the order from WooCommerce again; refunds follow their order.

Yes, until fixed or dismissed; it fails the same way until the cause is fixed

WOOC-BIZL-1009

Someone deleted the refund in WooCommerce between the order's change and the refund's transfer.

No action is needed for this refund. A refund deleted after it reached iPaaS.com leaves its return there as it was: correct that return in iPaaS.com and in any system that received it.

No; it is a warning in the subscription's log, not a transfer error

WOOC-VALD-1014

The stored link is not in the form this record type uses.

Remove the record's link in iPaaS.com and transfer it again.

Yes, until fixed or dismissed; it fails the same way until the cause is fixed

WOOC-NFND-1002

The order was deleted in WooCommerce

Nothing to transfer: dismiss the error (Known Limitations 4)

Yes, until fixed or dismissed

iPaaS.com: "Product Id: … does not exist"

A line SKU is not an iPaaS.com product, or a stand-in SKU still reads REPLACE; the whole order is refused

Add the product in iPaaS.com, or set the stand-in SKUs, then resend the order

Yes, until fixed or dismissed

iPaaS.com: VALD-1024 "Required property 'method'" or "'status' not found"

The order's payment method or status has no translation row; the whole order is refused

Add the row, then resend the order

Yes, until fixed or dismissed

iPaaS.com: VALD-1036 "… provided for Payment Method (or Address Shipping Method) is not valid"

A payment or shipping method translation still holds its REPLACE target, or names a method your company doesn't have

Replace the target with the exact name of one of your iPaaS.com methods, then resend

Yes, until fixed or dismissed

iPaaS.com: NFND-1029 "Duplicate transaction found!"

Another system already sent a transaction with that number

Prefix the TransactionNumber mapping in Add Order, Update Order and Add Refund (Known Limitations 27)

Fails the same way until the number is unique

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.

  1. Place a test order paid with Check payments; it is On hold, so set it to Processing as if the payment had arrived. It appears as an Order with its lines, addresses and payment. (An order paid by Cash on delivery has no payment until it is marked paid.)

  2. Complete it in WooCommerce: the same transaction becomes Complete, with no duplicate lines or payments.

  3. Remember that the order also reaches your connected systems; remove it there and in WooCommerce afterwards.

Additional Notes

Use a keep-formula on the Update collection's Status if your back office sets the order status (for example Shipped), so later WooCommerce changes don't overwrite it. Keep the Add collection's Status mapping: a new order needs a status.

Related Documents

Related Mapping Documentation

  • WooCommerce Refund TO iPaaS.com Mapping Documentation

Did this answer your question?