Skip to main content

WooCommerce Product FROM iPaaS.com Mapping Documentation

How the WooCommerce integration turns iPaaS.com products and their variants into simple or variable WooCommerce products, with prices, status and stock, found by SKU so nothing is duplicated.

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 how the WooCommerce integration sends iPaaS.com products FROM iPaaS.com to a WooCommerce store. When a product is created or changed in iPaaS.com:

  • a product without variants becomes a simple WooCommerce product, and a product with variants a variable product, with one variation per variant (up to three options each, such as Size and Color, added to the product automatically);

  • before anything is created, the store is searched for a product with the same SKU: one found is linked and updated, so a repeated transfer never makes a copy;

  • name, description, regular and sale prices, status, backorders, weight and dimensions are written as the default template maps them; short description, tax and shipping class, categories, tags, images and custom fields are written when you map them;

  • the stock travels with the product: the total of the iPaaS.com locations named in the Stock Locations setting, measured by the Stock Quantity Field setting (available or on hand).

Only the fields mapped are written: a field you leave unmapped keeps the value it has in WooCommerce. Stock changes on their own are covered by WooCommerce Inventory FROM iPaaS.com, and a variant changed on its own by WooCommerce Product Variant FROM iPaaS.com.

ID Format

Manual Sync ID Format: Enter the iPaaS.com Product ID.

External ID Format (saved after sync): the WooCommerce product id (for example 812); each variation {product id}|{variation id} (812|815); the stock record {product id}|{iPaaS.com location id} (812|42). These are the ids WooCommerce shows in its admin screens.

Deleted Record Support

Deletes are not sent: deleting a product in iPaaS.com leaves it in the store (Known Limitations 3). To take a product off sale, set its status to Disabled or Discontinued in iPaaS.com: the default Status translation makes it a draft, and a variant becomes a draft too, so order history stays intact.

Custom Field Support

Yes, FROM iPaaS.com: a custom field mapped on a product or variation is written as a WooCommerce meta entry with the same key.

Create a custom field for the WooCommerce subscription on its WooCommerce Product (or WooCommerce Product Variation) table, named exactly as the meta key, and map a value to it in this collection. Keys starting with _ are WooCommerce's own and are not written.

Mapping Collection Status

The template is active. Its filter passes every product (return true;). Before you turn on the Product events, add to it:

  • the two stand-in products the order collections use, so shoppers can never buy them, for example return Sku != "FEE" && Sku != "NOSKU"; with your two SKUs;

  • any condition that keeps part of the item master off the web (a web category, a publish-to-web field). Add the same condition to the Product Variant, Product Inventory and Product Variant Inventory collections.

Filters take no grouping parentheses: write return A && B || A && C;, never return A && (B || C);.

Duplicate or Conflicting Mappings

You can add a second Product FROM iPaaS.com collection for another product line, with filters that don't overlap. A product passing both goes through both, one after the other: each writes its own fields and the product is found by SKU, not duplicated.

This collection has no Collision Handling Method setting. Matching is automatic: a product not linked yet is matched to the store product with the same SKU (Known Limitations 17); two store products with the SKU stop the transfer (WOOC-BIZL-1001).

Supported Child Collections

  • WooCommerce Product Variant FROM iPaaS.com (with the product): the product's variants, as variations.

  • WooCommerce Product Variant Inventory FROM iPaaS.com (with the product's variants): each variation's stock.

  • WooCommerce Product Inventory FROM iPaaS.com (with the product): a simple product's stock.

System Caveats

  • A product needs a SKU (WOOC-VALD-1005, Known Limitations 29); two store products with the same SKU stop the transfer (WOOC-BIZL-1001).

  • Simple, grouped, external and variable products; any other Type stops the transfer (WOOC-BIZL-1002; Known Limitations 7). Give each variant its options: a variant without options is written as given, and WooCommerce shows it as matching any option (Known Limitations 6).

  • A sale price above the regular price is sent as given, and WooCommerce shows no sale (Known Limitations 30). When a regular price is sent and the sale price is empty or not mapped, the sale ends, unless KeepStoreSalePrice is mapped to a static true, as the template does for products and their variants.

  • One stock number per product or variation: the total of the chosen locations, in whole units (Known Limitations 1; WOOC-VALD-1009).

  • Images are downloaded by the store once and sent again only when the list of addresses changes; a changed image needs a new address (Known Limitations 9).

  • Categories and tags are found by name and created when missing; Parent > Child picks a sub-category (Known Limitations 20).

  • Existing store products with the same SKU are linked and their mapped fields overwritten (Known Limitations 17). There is no first load: a product goes when it next changes in iPaaS.com, or by Manual Sync (Known Limitations 19).

Setup Requirements

  1. The subscription's Store URL, Consumer Key and Consumer Secret, and the Stock Locations and Stock Quantity Field settings (WooCommerce Connections and Settings).

  2. The filter reviewed (Mapping Collection Status).

  3. The iPaaS.com events turned on in the subscription's FROM iPaaS.com data flows: product/created, product/updated, product/variant/created and product/variant/updated.

Integration Flow

  1. A product is created or changed in iPaaS.com, by the catalogue system's own integration or by hand.

  2. iPaaS.com raises its event and runs this collection; the filter decides whether the product is sent.

  3. The integration checks the product (SKU, prices, options), reads the stock total from iPaaS.com, and finds the store product by its link or SKU.

  4. It creates or updates the product, then its variations in batches of up to 100, and saves the links in iPaaS.com.

Mappings

Add/Update WooCommerce Product FROM iPaaS.com

iPaaS.com data type: Product. Sync type: Add/Update. Mappings: 12.

Description: iPaaS.com products become WooCommerce products: simple products, or variable products with their variations when the product has variants, with stock from the inventory child collection. Before creating a product, the integration looks for a WooCommerce product with the same SKU and links to it, overwriting the fields this collection maps; fields it doesn't map are left as they are, except the sale price (see the SalePrice mapping). This template doesn't map categories, tags or images; when you map categories or tags, they are matched by name and created if missing. Stock counts only the locations in the Stock Locations setting. Products are never deleted: an inactive product becomes a draft. If iPaaS.com holds items the store shouldn't sell, add a filter here and the same condition to the Product Variant and both inventory collections. Leave out the two stand-in products the order collections use for fee lines and lines without a SKU, or they appear in the shop as products shoppers can buy: add a filter here, for example return Sku != "FEE" && Sku != "NOSKU"; with your two SKUs.

Mapping Filter:

// Every product iPaaS.com sends is created or updated in the store.
// Leave out the two stand-in products the order collections use (the fee item and the item for lines without a SKU),
// for example: return Sku != "FEE" && Sku != "NOSKU"; with your two SKUs.
// To keep more of the item master off the store, add a condition here (for example a web category or a "publish to web" field)
// and the same condition to the Product Variant, Product Inventory and Product Variant Inventory collections.
return true;

Mapping Type

Source Field (iPaaS.com)

Destination Field (WooCommerce)

Description

Field

Sku

Sku

(Required.) The SKU. The integration uses it to find a product it already created or the store already has, so a retried transfer links to it instead of creating a second one. A product without a SKU is refused with WOOC-VALD-1005.

Field

Name

Name

(Required.) The product name.

Field

Description

Description

(Recommended.) The full description (HTML allowed).

Field

DefaultPrice

RegularPrice

(Recommended.) The price as the WooCommerce regular price (simple products; variable products are priced on their variations).

Dynamic Formula

formula 1 (below)

SalePrice

(Optional.) The sale price, sent when it is above zero. A sale price above the regular price is sent as given, and WooCommerce shows no sale. When the regular price is sent and the sale price is empty or zero, the sale ends in WooCommerce, unless the collection keeps its static mapping KeepStoreSalePrice = true (below); WooCommerce's sale price is then left as it is.

Static

true

KeepStoreSalePrice

(Recommended.) Keeps a sale you run in WooCommerce: when iPaaS.com sends a regular price but no sale price, the store's sale price is left as it is instead of being cleared. A sale price sent from iPaaS.com is still written. Remove this mapping only if iPaaS.com is the only place sale prices are managed and an empty sale price should end the sale.

Lookup Translation

Status, through WooCommerce Product Status FROM iPaaS.com

Status

(Recommended.) The product status through the WooCommerce Product Status translation: Active and Preorder are published; Disabled and Discontinued become drafts that shoppers can't see, so order history stays intact. To load a catalogue hidden, change this mapping to the static value draft.

Dynamic Formula

formula 2 (below)

Backorders

(Optional.) Whether shoppers may order when the product is out of stock: allowed with a notice (notify) when iPaaS.com allows backorders, otherwise not (no).

Field

Weight

Weight

(Optional.) Weight, in the store's weight unit.

Field

Depth

Length

(Optional.) Depth, as the WooCommerce length, in the store's dimension unit.

Field

Width

Width

(Optional.) Width, in the store's dimension unit.

Field

Height

Height

(Optional.) Height, in the store's dimension unit.

Lookup Translation Tables

WooCommerce Product Status FROM iPaaS.com:

Source Value (iPaaS.com)

Destination Value (WooCommerce)

Notes

Active

publish

Shoppers can see and buy it.

Preorder

publish

Shoppers can see and buy it.

Disabled

draft

Hidden from shoppers; order history is kept.

Discontinued

draft

Hidden from shoppers; order history is kept.

You can change a draft row's WooCommerce value to private if you prefer.

Dynamic Formulas (verbatim)

Formula 1, SalePrice:

// The sale price when it is above zero. WooCommerce shows it as a sale only when it is below the regular price.
if (SalePrice == null || SalePrice <= 0) return null;
return SalePrice;

Formula 2, Backorders:

// iPaaS.com allows backorders: shoppers may order when out of stock and are told it is on backorder.
if (AllowBackorders == null) return null;
return AllowBackorders == true ? "notify" : "no";

WooCommerce Product Variant FROM iPaaS.com (with the product)

iPaaS.com data type: Product Variant. Child of: Add/Update WooCommerce Product FROM iPaaS.com. Sync type: Add/Update. Mappings: 17.

Description: The product's variants, written with the product as WooCommerce variations. A product with variants becomes a variable product whose attributes are the variants' options (up to three per variant). A variation is found by its SKU, else by its options, so a repeated transfer never duplicates it.

Mapping Type

Source Field (iPaaS.com)

Destination Field (WooCommerce)

Description

Dynamic Formula

formula 3 (below)

IpaasProductId

(Required.) The iPaaS.com product this variant belongs to. A variant sent on its own finds its WooCommerce product with it (transfer the product first).

Field

Sku

Sku

(Recommended.) The variant's SKU. It finds a variation the integration already created, and order lines are linked back to the variant by it.

Dynamic Formula

formula 4 (below)

Option1Name

(Recommended.) The first option's name, for example Size. WooCommerce tells variations apart by their options, and adds the option to the product's attributes. A variant without options is written as sent, and WooCommerce treats it as matching any option of the product (Known Limitations 6).

Dynamic Formula

formula 5 (below)

Option1Value

(Recommended.) The first option's value, for example Large.

Dynamic Formula

formula 6 (below)

Option2Name

(Optional.) The second option's name, for example Color.

Dynamic Formula

formula 7 (below)

Option2Value

(Optional.) The second option's value.

Dynamic Formula

formula 8 (below)

Option3Name

(Optional.) The third option's name.

Dynamic Formula

formula 9 (below)

Option3Value

(Optional.) The third option's value.

Field

DefaultPrice

RegularPrice

(Recommended.) The variant's price as the WooCommerce regular price.

Dynamic Formula

formula 10 (below)

SalePrice

(Optional.) The variant's sale price, sent when it is above zero. A sale price above the regular price is sent as given, and WooCommerce shows no sale. When the regular price is sent and the sale price is empty or zero, the sale ends in WooCommerce, unless the collection keeps its static mapping KeepStoreSalePrice = true (below); WooCommerce's sale price is then left as it is.

Static

true

KeepStoreSalePrice

(Recommended.) Keeps a sale you run in WooCommerce: when iPaaS.com sends a regular price but no sale price, the store's sale price is left as it is instead of being cleared. A sale price sent from iPaaS.com is still written. Remove this mapping only if iPaaS.com is the only place sale prices are managed and an empty sale price should end the sale.

Dynamic Formula

formula 11 (below)

Status

(Recommended.) Active and Preorder variants are published; Disabled and Discontinued ones become drafts (hidden from shoppers, order history kept), the same as products; any other status leaves the variation as it is.

Dynamic Formula

formula 16 (below)

Backorders

(Optional.) Whether shoppers may order the variant when it is out of stock, taken from its product's iPaaS.com backorder setting: notify when allowed, otherwise no. WooCommerce applies it only when the variation's stock is managed.

Field

Weight

Weight

(Optional.) Weight, in the store's weight unit.

Field

Depth

Length

(Optional.) Depth, as the WooCommerce length, in the store's dimension unit.

Field

Width

Width

(Optional.) Width, in the store's dimension unit.

Field

Height

Height

(Optional.) Height, in the store's dimension unit.

Dynamic Formulas (verbatim)

Formula 3, IpaasProductId:

return Convert.ToString(ParentId);

Formula 4, Option1Name:

// Option 1 of the variant (iPaaS.com option order).
if (Options == null) return null;
var o = Options.OrderBy(x => x.Order ?? 0).Skip(0).FirstOrDefault();
return o != null ? o.OptionName : null;

Formula 5, Option1Value:

// Option 1 of the variant (iPaaS.com option order).
if (Options == null) return null;
var o = Options.OrderBy(x => x.Order ?? 0).Skip(0).FirstOrDefault();
return o != null ? o.Value : null;

Formula 6, Option2Name:

// Option 2 of the variant (iPaaS.com option order).
if (Options == null) return null;
var o = Options.OrderBy(x => x.Order ?? 0).Skip(1).FirstOrDefault();
return o != null ? o.OptionName : null;

Formula 7, Option2Value:

// Option 2 of the variant (iPaaS.com option order).
if (Options == null) return null;
var o = Options.OrderBy(x => x.Order ?? 0).Skip(1).FirstOrDefault();
return o != null ? o.Value : null;

Formula 8, Option3Name:

// Option 3 of the variant (iPaaS.com option order).
if (Options == null) return null;
var o = Options.OrderBy(x => x.Order ?? 0).Skip(2).FirstOrDefault();
return o != null ? o.OptionName : null;

Formula 9, Option3Value:

// Option 3 of the variant (iPaaS.com option order).
if (Options == null) return null;
var o = Options.OrderBy(x => x.Order ?? 0).Skip(2).FirstOrDefault();
return o != null ? o.Value : null;

Formula 10, SalePrice:

// The sale price when it is above zero. WooCommerce shows it as a sale only when it is below the regular price.
if (SalePrice == null || SalePrice <= 0) return null;
return SalePrice;

Formula 11, Status:

// Active and Preorder variants are sold; Disabled and Discontinued ones become drafts (hidden from shoppers, order history kept), the same as products. Other statuses leave the variation as it is.
if (Status == "Active" || Status == "Preorder") return "publish";
if (Status == "Disabled" || Status == "Discontinued") return "draft";
return null;

Formula 16, Backorders:

// The product's backorder setting (an iPaaS.com variant has none of its own): shoppers may order when out of stock and are told it is on backorder.
if (Parent == null || Parent.AllowBackorders == null) return null;
return Parent.AllowBackorders == true ? "notify" : "no";

WooCommerce Product Variant Inventory FROM iPaaS.com (with the product's variants)

iPaaS.com data type: Product Variant Inventory. Child of: WooCommerce Product Variant FROM iPaaS.com (with the product). Sync type: Add/Update. Mappings: 3.

Description: Each variant's stock, written with the product's variations. For each variation the integration reads the stock of every location in the Stock Locations setting from iPaaS.com, measured by the Stock Quantity Field setting, turns on Manage stock and sets the total. The Stock Locations setting decides which locations count. If this collection's filter passes no inventory record, stock isn't sent with the variations; the stock-only collections still update it.

Mapping Type

Source Field (iPaaS.com)

Destination Field (WooCommerce)

Description

Dynamic Formula

formula 12 (below)

IpaasVariantId

(Required.) The iPaaS.com variant this stock belongs to (the inventory record's parent). The integration uses it to find the WooCommerce variation and to read the stock at every location.

Dynamic Formula

formula 13 (below)

LocationId

(Optional.) The iPaaS.com location of this stock. Left unmapped, the integration finds the location from the inventory record in iPaaS.com.

Field

QtyAvailable

StockQuantity

(Required. A plain field, never a formula: map the same quantity as the Stock Quantity Field setting, QtyAvailable by default or QtyOnHand when the setting is QtyOnHand; change both together.) The WooCommerce total is read from iPaaS.com's inventory over the locations in the Stock Locations setting and counts the quantity the Stock Quantity Field setting names. This mapping never changes the total: the integration compares it with this location's available and on-hand quantities in iPaaS.com to confirm that iPaaS.com already shows the stock change, so the check covers only the quantity mapped here. A formula here (for example a safety buffer) doesn't change the total; a value that matches neither quantity is logged as a warning.

Dynamic Formulas (verbatim)

Formula 12, IpaasVariantId:

return Convert.ToString(ParentId);

Formula 13, LocationId:

return Convert.ToString(LocationId);

WooCommerce Product Inventory FROM iPaaS.com (with the product)

iPaaS.com data type: Product Inventory. Child of: Add/Update WooCommerce Product FROM iPaaS.com. Sync type: Add/Update. Mappings: 3.

Description: The product's stock, written with the product. WooCommerce keeps one stock number, so the integration reads the stock of every location in the Stock Locations setting from iPaaS.com, measured by the Stock Quantity Field setting, turns on Manage stock and sets the total. The Stock Locations setting decides which locations count. If this collection's filter passes no inventory record, stock isn't sent with the product; the stock-only collections still update it.

Mapping Type

Source Field (iPaaS.com)

Destination Field (WooCommerce)

Description

Dynamic Formula

formula 14 (below)

IpaasProductId

(Required.) The iPaaS.com product this stock belongs to (the inventory record's parent). The integration uses it to find the WooCommerce product and to read the stock at every location.

Dynamic Formula

formula 15 (below)

LocationId

(Optional.) The iPaaS.com location of this stock. Left unmapped, the integration finds the location from the inventory record in iPaaS.com.

Field

QtyAvailable

StockQuantity

(Required. A plain field, never a formula: map the same quantity as the Stock Quantity Field setting, QtyAvailable by default or QtyOnHand when the setting is QtyOnHand; change both together.) The WooCommerce total is read from iPaaS.com's inventory over the locations in the Stock Locations setting and counts the quantity the Stock Quantity Field setting names. This mapping never changes the total: the integration compares it with this location's available and on-hand quantities in iPaaS.com to confirm that iPaaS.com already shows the stock change, so the check covers only the quantity mapped here. A formula here (for example a safety buffer) doesn't change the total; a value that matches neither quantity is logged as a warning.

Dynamic Formulas (verbatim)

Formula 14, IpaasProductId:

return Convert.ToString(ParentId);

Formula 15, LocationId:

return Convert.ToString(LocationId);

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-EXTN-1006

WooCommerce rejected a value in the record (its own message follows).

Correct the value named in WooCommerce's message in the source record or the mapping, then transfer again.

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

WOOC-NFND-1002

The record was deleted in WooCommerce, or the link points to a record in another store.

If the record was deleted in WooCommerce on purpose, remove its link in iPaaS.com (the record's external id for this subscription; your MiSP or iPaaS.com Support can do it) and transfer it again to recreate it.

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

WOOC-EXTN-1007

WooCommerce answered the batch request but rejected some of the items in it.

Correct the values named in WooCommerce's message, then transfer the product again: the saved product is found by its SKU and the missing variations are added.

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

WOOC-VALD-1005

The product's mapped SKU is empty. The SKU is how the integration finds a product it already created.

Give the product a SKU in its source system, or map one, and transfer it again.

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

WOOC-BIZL-1001

The SKU is used by more than one product in WooCommerce.

Give each WooCommerce product its own SKU, then transfer again.

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

WOOC-BIZL-1002

The mapping sets the product Type to a value WooCommerce does not have.

Map Type to simple, grouped, external or variable, or leave it empty so the integration chooses from the variants.

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

WOOC-BIZL-1003

The category name is not unique in the store, so the integration cannot choose.

Rename or merge the duplicate categories in Products > Categories, or use a Parent > Child path.

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

WOOC-BIZL-1004

The variation SKU is used more than once on the product.

Give each variation its own SKU in WooCommerce, then transfer again.

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

WOOC-BIZL-1006

The tag name is not unique in the store, so the integration cannot choose.

Rename or merge the duplicate tags in Products > Tags.

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

WOOC-BIZL-1007

The product has duplicate variations with the same option values, and the variant has no link or SKU that picks out one of them.

Delete or change the duplicate variations in WooCommerce, or put the variant's SKU on the WooCommerce variation it should update, then transfer again.

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

WOOC-VALD-1009

WooCommerce stores stock as a whole number, and the total of the counted locations has a fraction.

Keep this product's stock in whole units in iPaaS.com (the total is read from its inventory there), then transfer again.

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

WOOC-NFND-1006

The Stock Locations setting names locations (ids or names) that don't exist, or are misspelt.

Correct the Stock Locations setting: iPaaS.com location ids or names, comma-separated; leave it blank to count every location.

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.

  1. Create a test product with a SKU, a price and stock, status Disabled (so it arrives as a draft). Check Products in WordPress: one product with that SKU, name, price and stock.

  2. Change its price: the same product is updated, with no second copy.

  3. Create a test product with two variants (Size Small and Large): a variable product with two variations, each with its own SKU, price and stock.

  4. Remove the test products in both systems afterwards (WooCommerce Installation Instructions).

Additional Notes

Your back-office system stays the record for products, prices and stock: products are not sent TO iPaaS.com from WooCommerce (Known Limitations 2 and 10). The template maps KeepStoreSalePrice to a static true, so sales run in WooCommerce are kept; remove that mapping only if iPaaS.com manages every sale price.

Related Documents

Related Mapping Documentation

  • WooCommerce Product Variant FROM iPaaS.com Mapping Documentation

  • WooCommerce Inventory FROM iPaaS.com Mapping Documentation

Did this answer your question?