Update product status
The Update product status action allows you to change the status of a product.
On this page
Triggers
This action has a hidden field added to it by the trigger or a previous step in the workflow. This field, Product ID, identifies the product. The product ID is set by default and can't be changed. As a result, the Update product status action can be used in workflows that have a Get product data action, or any triggers that contain a product or a variant, such as:
- Product added to store
- Product status updated
- Product variant added
- Inventory quantity changed
- Variant back in stock
- Variant out of stock
- Inventory item created
Example
In this example workflow, products are archived when all of their variants have sold out.
Known limitations
This action updates a product, which causes triggers that are related to product updates to fire. If you combine this action with triggers that fire when a product is updated, then the workflow runs forever in an infinite loop. Because of this, the Update product status action should not be combined with triggers that are related to product updates, such as Product status updated. You can avoid loops by adding conditions to the workflow. For example, if the workflow is archiving a product, then you can check if the product is already archived.
API details
To learn more, review the productUpdate mutation.