capabilities.work

Upsert Product by SKU

A 3-step recipe with WooCommerce. We can help you get access.

Recipe · 3 steps

Upsert Product by SKU

with WooCommerce · Product Lifecycle Management

Upsert a product keyed on its SKU, creating it only when missing.

  1. Search the catalog for a product matching the supplied SKU, returning at most one result.
  2. Read the matched product to confirm its current pricing and stock status.
  3. Create a new product carrying the supplied SKU when no existing product matched.
What you'll need to have ready
  • sku: Stock-keeping unit used to detect an existing product.
  • productName: Product name to use when creating a new product.
  • regularPrice: Regular price as a decimal string to use on create.
For your developer

Arazzo workflow woocommerce:upsert-product-by-sku, 3 operations: listProducts → getProduct → createProduct. Specs on APIs.io.