Products¶
The Products pull reads the store's products, for an item record in the target system or to compare the store's prices and stock with the ERP's. Each product carries its prices, stock, categories, tags, images and attributes. A variable product has a record for each of its variations beneath it.
On a reader, select Products as the WooCommerce Entity.
Which Products It Reads¶
The pull reads every product on every run: published, draft, pending review and private, but not those in the bin. It keeps no date of its last run, and the reader's Status and Orders created in the last options have no effect. WooCommerce returns products ten to a request. A catalogue of 2,000 products takes 200 requests.
Variations¶
For each product, the pull sends one more request for the product's variations, and returns them as ProductVariation records beneath the product. It sends the request for a simple product too, and gets no variations back. The 2,000-product catalogue costs 2,000 variation requests on top of its 200.
If the integration does not use the variations, untick ProductVariation in the reader's Hierarchy, on the Field Mapping tab. The pull then sends no variation requests.
Records¶
The pull returns a Product record for each product, with a ProductVariation record for each variation.
Product¶
id, WooCommerce's id for the product, withname,slug,permalinkandparent_id;type:simple,variable,groupedorexternal;status,featured,catalog_visibility,description,short_descriptionandmenu_order;sku,price,regular_priceandsale_price, withon_saleand the sale dates;manage_stock,stock_quantity,stock_status,backordersandsold_individually;tax_statusandtax_class;weight, thedimensions_fields,shipping_classandshipping_class_id;virtualanddownloadable;total_sales,average_ratingandrating_count;date_createdanddate_modified, in the store's time zone, each with a_gmtfield in UTC beside it.
WooCommerce returns several lists on a product. The pull spreads the first few of each across numbered fields:
| Fields | Holds | Each one has |
|---|---|---|
category_1_ to category_3_ |
the first three categories | id, name and slug |
tag_1_ to tag_3_ |
the first three tags | id, name and slug |
image_1_ to image_4_ |
the first four images. The first is the product image | id, src, name, alt and the dates |
attribute_1_ to attribute_3_ |
the first three attributes | id, name, position, visible, variation, and option_1 to option_3 |
default_attribute_1_ to default_attribute_3_ |
the variation a shopper sees first | id, name and option |
related_id_1 to related_id_5, upsell_id_1 to upsell_id_3, cross_sell_id_1 to cross_sell_id_3 |
the ids of linked products |
ProductVariation¶
id, WooCommerce's id for the variation;sku,price,regular_priceandsale_price, withon_saleand the sale dates;status,descriptionandpermalink;manage_stock,stock_quantity,stock_statusandbackorders;tax_status,tax_class,weight, thedimensions_fields andshipping_class;- the
image_fields, for the variation's one image; attribute_1_toattribute_3_, each withid,nameandoption. These name the variation, such asColourBlueandSizeLarge.
The ProductVariation record has no product id of its own. Its parent Product record's id is the product's.
Meta Data¶
Each key in the reader's Customer/Order Meta Fields option becomes a field of the same name on the Product record. See Meta Data on the Orders page.
WooCommerce Reference¶
Products and Product variations in the WooCommerce REST API documentation.