Product updated

The Product updated trigger starts a workflow when one or more fields on a product or its variants change in your store. You choose which product and variant fields matter, and the workflow runs only when one of those fields changes, such as when a tag is added or a price changes.

To start a workflow when a product is added, use the Product created trigger. To start a workflow when the inventory quantity of a variant changes, use the Product variant inventory quantity changed trigger.

Fields available to monitor

The Product updated trigger requires you to select at least one field to monitor. You can select up to five fields. When any one of the selected fields changes, the workflow runs. Changes to fields that you didn't select don't start the workflow.

Review the following table to learn more about the fields that you can monitor.

Fields that you can monitor with the Product updated trigger.
Field typeFields
Productcategory, combinedListingRole, descriptionHtml, giftCardTemplateSuffix, handle, metafield.value, productType, requiresSellingPlan, status, tags, templateSuffix, title, vendor
Mediamedia
Optionsoptions, options.linkedMetafield, options.linkedMetafield.key, options.linkedMetafield.namespace, options.name, options.optionValues, options.optionValues.linkedMetafieldValue, options.optionValues.name, options.optionValues.swatch, options.optionValues.swatch.color, options.optionValues.swatch.image, options.position
Variantsvariants.barcode, variants.barcodes, variants.compareAtPrice, variants.inventoryPolicy, variants.media, variants.metafield.value, variants.position, variants.price, variants.productVariantComponents, variants.productVariantComponents.quantity, variants.requiresComponents, variants.showUnitPrice, variants.taxable, variants.title
BundlesbundleComponents, bundleComponents.quantity, bundleComponents.quantityOption
Combined listingscombinedListing, combinedListing.combinedListingChildren, combinedListing.combinedListingChildren.parentVariant, combinedListing.combinedListingChildren.product

To monitor a product metafield or a variant metafield, select the metafield.value field or the variants.metafield.value field, and then choose the metafield. You can select one of your store's metafield definitions, or enter a namespace to monitor every metafield in that namespace, including metafields that don't have a definition. Each metafield definition or namespace that you select counts as one of your five fields.

Depending on which fields you monitor, adding a product can also start this workflow. Setting Product fields, such as title or tags, when a product is added doesn't start the workflow. However, the variants, options, media, bundle components, and combined listing products that are added with a product count as changes to that product. If you monitor a field in the Media, Options, Variants, Bundles, or Combined listings group, then adding a product that includes those items starts the workflow. For example, every product has at least one variant, so a workflow that monitors variants.price runs when a product is added.

Select the fields that start the workflow

Select the fields that start the workflow when they change.

Steps:

  1. In the workflow editor, click the Product updated trigger.
  2. In the Select product fields section, click Select fields.
  3. In the Add field to monitor dialog, search for or browse to the field that you want to monitor, and then select it.
  4. If you selected metafield.value or variants.metafield.value, then choose which metafields to monitor:
    • To monitor one metafield, click Select metafield, select a metafield definition, and then click Add field.
    • To monitor every metafield in a namespace, click Select metafield, click Use namespace only, enter the namespace, and then click Add field.
  5. Optional: Repeat steps 2 to 4 to monitor up to five fields.

Fields

The Product updated trigger contains the following fields, which can be used in conditions and actions, and to get data in the workflow. The Product and Shop fields are always available. The other fields are available only when you monitor a related field. For example, the Product Variant field is available when you monitor a variant field, such as variants.price.

Fields in the Product updated trigger.
FieldDescription
ProductThe product that was updated.
ShopThe shop where the product was updated.
Product VariantThe product variant that changed. Available when you monitor a variant field.
Product OptionThe product option that changed. Available when you monitor an option field.
MediaThe media that changed. Available when you monitor the product's media.
Combined Listing ProductThe child product of the combined listing that changed. Available when you monitor the products in a combined listing.

If you monitor fields of different types, then the Product Variant, Product Option, Media, and Combined Listing Product fields can be empty when the workflow runs. For example, if you monitor both tags and variants.price, then the Product Variant field is empty when only the tags change. Before you use one of these fields in an action, add a condition that checks that the field has a value.

The Product updated trigger provides only the current values of the product and its variants, options, and media. The previous values of the fields that changed aren't available in the workflow. For example, if you monitor the variants.price field, then you can use the new price in a condition or action, but you can't use the price before the change.

Testing the Product updated trigger

To test a workflow that starts with this trigger, turn on the workflow, and then edit a product in the Shopify admin to change one of the fields that the workflow monitors.

API details

The Product updated trigger allows actions to be taken with the Product GraphQL API object. This trigger corresponds to the update action of the Product topic in the Shopify Events reference, filtered to the fields that you choose to monitor.