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 stock-only updates FROM iPaaS.com. When only the stock of a product or variant changes at a location in iPaaS.com:
the integration reads that product's or variant's inventory from iPaaS.com and adds up the quantity of each location named in the Stock Locations setting (every location when it is blank);
the quantity is the available or the on-hand quantity, as the Stock Quantity Field setting says;
it writes only the stock to WooCommerce, never the name, price, description or images, so edits made for the web stay.
ID Format
Manual Sync ID Format: Enter the iPaaS.com Product Inventory ID (or Product Variant Inventory ID).
External ID Format (saved after sync): {product id}|{iPaaS.com location id} for a product (812|42); {product id}|{variation id}|{iPaaS.com location id} for a variation (812|815|42).
Deleted Record Support
Deletes are not sent. A location removed from a product in iPaaS.com no longer counts at the next stock change.
Custom Field Support
No: only the stock is written.
Mapping Collection Status
Both templates are active and pass every stock change. If you filter the Product (or Product Variant) collection, add a matching condition here. A stock record carries no SKU, so leave out the two stand-in products by id, or a stock change on one fails with WOOC-NFND-1004:
in Add/Update WooCommerce Product Inventory FROM iPaaS.com, by the stand-ins' iPaaS.com product ids:
return Convert.ToInt64(ParentId) != 12345 && Convert.ToInt64(ParentId) != 12346;with your ids;in Add/Update WooCommerce Product Variant Inventory FROM iPaaS.com, only when a stand-in product has variants, by those variants' iPaaS.com ids (there, ParentId is the variant).
Which locations count is the Stock Locations setting alone. Don't use a filter for that.
Duplicate or Conflicting Mappings
Keep the parent id mapping (IpaasProductId or IpaasVariantId): without it the total can't be worked out (WOOC-VALD-1010). The StockQuantity mapping must stay a plain QtyAvailable or QtyOnHand, the same as the Stock Quantity Field setting: a formula (for example a safety buffer) stops every stock-only update with WOOC-BIZL-1008.
These collections have no Collision Handling Method setting: a stock record updates the product or variation its parent is linked to, and never creates one.
Supported Child Collections
None.
System Caveats
A stock-only update never creates a product or variation: one not in the store yet fails with WOOC-NFND-1004 or WOOC-NFND-1005 until the product is sent.
WooCommerce stores whole numbers: a total with a fraction is refused (WOOC-VALD-1009).
A Stock Locations entry iPaaS.com doesn't have stops stock updates (WOOC-NFND-1006). With 100 or more locations, use location ids.
One stock number per product or variation (Known Limitations 1).
Setup Requirements
The iPaaS.com events product/inventory/updated and product/variant/inventory/updated turned on, and the Stock Locations and Stock Quantity Field settings filled in.
Integration Flow
A stock quantity changes in iPaaS.com.
iPaaS.com runs the stock collection; the filter decides whether it is sent.
The integration finds the store product or variation by its link, reads the inventory of every counted location from iPaaS.com and adds it up.
It writes the total as the WooCommerce stock, with stock management on.
Mappings
Add/Update WooCommerce Product Inventory FROM iPaaS.com
iPaaS.com data type: Product Inventory. Sync type: Add/Update. Mappings: 3.
Description: A stock change in iPaaS.com updates only the stock of the WooCommerce product: Manage stock is turned on and the stock number is set to the total of the locations in the Stock Locations setting, read from iPaaS.com and measured with the Stock Quantity Field setting. Name, price, description and images are never rewritten. A product that isn't in WooCommerce yet stops with a clear error (transfer the product first); nothing is created.
Mapping Filter:
// Every stock change iPaaS.com sends. Which locations count is the Stock Locations setting. // If you filter the Product collection, add a matching condition here. // Leave out the two stand-in products too (the fee item and the item for lines without a SKU), or a stock change // on one fails with WOOC-NFND-1004. A stock record carries no SKU, so use their iPaaS.com product ids, for example: // return Convert.ToInt64(ParentId) != 12345 && Convert.ToInt64(ParentId) != 12346; with your ids. return true;
Mapping Type | Source Field (iPaaS.com) | Destination Field (WooCommerce) | Description |
Dynamic Formula | formula 1 (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 2 (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) stops every stock update with WOOC-BIZL-1008. |
Dynamic Formulas (verbatim)
Formula 1, IpaasProductId:
return Convert.ToString(ParentId);
Formula 2, LocationId:
return Convert.ToString(LocationId);
Add/Update WooCommerce Product Variant Inventory FROM iPaaS.com
iPaaS.com data type: Product Variant Inventory. Sync type: Add/Update. Mappings: 3.
Description: A variant's stock change in iPaaS.com updates only the stock of its WooCommerce variation, with the same rules as product stock: the total of the locations in the Stock Locations setting, read from iPaaS.com and measured with the Stock Quantity Field setting. A variant that isn't in WooCommerce yet stops with a clear error; nothing is created.
Mapping Filter:
// Every variant stock change iPaaS.com sends. Which locations count is the Stock Locations setting. // If you filter the Product Variant collection, add a matching condition here. // If a stand-in product (the fee item or the item for lines without a SKU) has variants, leave their stock out too, // by the variants' iPaaS.com ids (a stock record carries no SKU), for example: // return Convert.ToInt64(ParentId) != 12345 && Convert.ToInt64(ParentId) != 12346; with your ids. return true;
Mapping Type | Source Field (iPaaS.com) | Destination Field (WooCommerce) | Description |
Dynamic Formula | formula 3 (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 4 (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) stops every stock update with WOOC-BIZL-1008. |
Dynamic Formulas (verbatim)
Formula 3, IpaasVariantId:
return Convert.ToString(ParentId);
Formula 4, LocationId:
return Convert.ToString(LocationId);
Error Handling
WOOC-NFND-1007 usually means iPaaS.com's read was a moment older than the change; the automatic retry succeeds. WOOC-BIZL-1008 clears on the retry only when the read was late; if it keeps failing, the StockQuantity mapping is a formula: set it back to the plain field the Stock Quantity Field setting names.
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-NFND-1004 | A stock-only update never creates a product. | Transfer the product; later stock changes then update it. | Yes, until fixed or dismissed; it fails the same way until the cause is fixed |
WOOC-NFND-1005 | A stock-only update never creates a variation. | Transfer the product with its variants; later stock changes then update them. | Yes, until fixed or dismissed; it fails the same way until the cause is fixed |
WOOC-VALD-1008 | The stored link for this inventory record was changed by hand or comes from another integration. | Remove the inventory record's link in iPaaS.com and transfer the product 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-1007 | iPaaS.com did not return the product or variant, or its inventory did not yet list this record (the read was older than the change). | No action is usually needed: the next retry normally succeeds. If it keeps failing, check that the parent product or variant still exists in iPaaS.com. | Yes; a later attempt usually succeeds without a change |
WOOC-VALD-1010 | The stock collection does not map the parent id (IpaasProductId for product stock, IpaasVariantId for variant stock). | Map the inventory record's parent id into IpaasProductId or IpaasVariantId in the stock collection, 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 |
WOOC-BIZL-1008 | Either iPaaS.com's read was older than the change (the automatic retry then succeeds), or the stock collection's StockQuantity mapping is a formula (for example a safety buffer or rounding), which never matches. | If it keeps failing, map StockQuantity in the stock collection to QtyAvailable or QtyOnHand (the same as the Stock Quantity Field setting), not a formula. iPaaS.com tries the transfer again automatically. | Yes; a later attempt succeeds only when iPaaS.com's read was late; with a formula mapping it fails every time until the mapping 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.
Change the stock of a test product at one counted location: only the stock changes in WooCommerce, and it equals the total of the counted locations.
With Stock Locations set to some of your locations, change the stock at a location that isn't listed: the store stock stays the same.
Additional Notes
Stock also travels with every product and variant transfer, so the store is corrected whenever the product next changes.
Related Documents
iPaaS.com <> WooCommerce: Background
Related Mapping Documentation
WooCommerce Product FROM iPaaS.com Mapping Documentation
WooCommerce Product Variant FROM iPaaS.com Mapping Documentation
