[ { "label": "Unpublish product from all Sales Channels when out of stock", "trigger_type": [ "product_updated" ], "object_type": "product", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "1": { "field": "product.inventory_quantity", "settings": { "operator": "lte", "value": "0", "token_object_type": "product", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "product_unpublish_sales_channels", "settings": { "token_object_type": "product", "sales_channels": { "gid:\/\/shopify\/Publication\/78161936566": "gid:\/\/shopify\/Publication\/78161936566", "gid:\/\/shopify\/Publication\/111404351670": "gid:\/\/shopify\/Publication\/111404351670", "gid:\/\/shopify\/Publication\/111405596854": "gid:\/\/shopify\/Publication\/111405596854" }, "wait": "0", "cw_timezone": "Africa\/Nairobi", "custom_wait": "" }, "weight": 999, "target_key": "product" } } } }, "instructions": "To ensure that the products get unpublished from all sales channels, open the unpublish action below and confirm that all the sales channel options are selected.", "shared_workflow_id": 283505 }, "description": "This automation is triggered whenever a product is sold or updated. It checks if the product is out of stock and unpublishes it from all sales channels. This automation helps ensure that items, once sold out, are no longer available for sale across all sales channels." } ]