Skip to content

Variations

The Variations push updates and creates the variations of a variable product: each size or colour a shopper can choose. Its main use is keeping each variation's price and stock in step with the ERP.

On a push connector, select Variations as the WooCommerce Import Type. The push offers Insert, Update and Insert/Update. See Insert and Update for how Variation Id decides between creating and updating.

Ids

Field Holds
Product Id WooCommerce's id for the variable product. Required for every record. A record without one fails with "The product id field must be set."
Variation Id WooCommerce's id for the variation. Map it to update a variation, or from an empty field to catch a new variation's id.

A variation's SKU finds both ids. A lookup on products by SKU returns the variation, with its own id and its product's parent_id.

Fields

  • SKU, Description, Status and Menu Order;
  • Regular Price and Sale Price, with the On Sale from Date and On Sale to Date fields;
  • Manage Stock, Stock Quantity, Stock Status and Backorders;
  • Tax Status and Tax Class;
  • Weight, Length, Width, Height and Shipping Class;
  • Is Virtual, Is Downloadable, Download Limit and Download Expiry Days;
  • Default Image Url, the address of the variation's one image. WooCommerce downloads it into the media library each time the push sends it.

Prices and stock work as on Products. Stock Quantity takes effect only when Manage Stock is True.

Creating a Variation

The push cannot set a variation's attributes, the Colour and Size values that tell shoppers which one it is. A variation the push creates matches any value of each attribute until someone sets them in WooCommerce. Create variations in WooCommerce, and use the push to keep their prices and stock up to date.

WooCommerce Reference

Product variations in the WooCommerce REST API documentation.