[ { "label": "Add and Remove Tags For Size Based on Stock Availability", "trigger_type": [ "product_updated" ], "object_type": "product", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": { "1": { "conditions": [], "actions": { "1": { "type": "trigger_child_workflow", "settings": { "target_path": "product.variants", "exported_workflow": { "label": "Variant subworkflow", "trigger_type": [ "manual" ], "object_type": "product_variant", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "1": { "field": "product_variant.inventory_quantity", "settings": { "operator": "lte", "value": "0", "token_browser": "{{ Browse Tokens }}", "token_object_type": "product_variant", "condition_type": "AND" }, "weight": 999 }, "2": { "field": "product_variant.product.tags_array", "settings": { "multiple": "any", "operator": "equals", "value": "{{ product_variant.options[\"Size\"] }}", "long_value": "", "token_browser": "{{ Browse Tokens }}", "token_object_type": "product_variant", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "product_remove_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "{{ product_variant.options[\"Size\"] }} ", "token_object_type": "product_variant" }, "weight": 999, "target_key": "product_variant.product" } } }, "2": { "conditions": { "1": { "field": "product_variant.inventory_quantity", "settings": { "operator": "gt", "value": "0", "token_browser": "{{ Browse Tokens }}", "token_object_type": "product_variant", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "product_add_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "{{ product_variant.options[\"Size\"] }} ", "token_object_type": "product_variant" }, "weight": 999, "target_key": "product_variant.product" } } } } } } }, "weight": 999, "target_key": "product" } } } }, "shared_workflow_id": 14373 }, "description": "This workflow is triggered when a product is updated, it checks if the variant quantity is above 0 and added the relevant size tag to the product. If the variant quantity is lower than 0, then it removes the respective size tag from the product." } ]