[ { "label": "\"Backorder\" and \"In Stock\" Metafields", "trigger_type": [ "product_updated" ], "object_type": "product", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": [ { "conditions": { "5": { "field": "product.inventory_quantity", "settings": { "operator": "lte", "value": "0", "token_browser": "{{ Browse Tokens }}", "condition_type": "AND" }, "weight": 10 }, "4": { "field": "product.metafields", "settings": { "multiple": "any", "namespace": "global", "key": "custom_stock_status", "operator": "not_equals", "value": "Expected Availability: 7-10 Business Days", "token_browser": "{{ Browse Tokens }}", "condition_type": "AND" }, "weight": 20 } }, "actions": [ { "type": "product_set_metafield_value", "settings": { "wait": "0", "custom_wait": "", "namespace": "global", "key": "custom_stock_status", "value_type": "string", "value": "Expected Availability: 7-10 Business Days" }, "weight": 30, "target_key": "product" } ] }, { "conditions": { "3": { "field": "product.inventory_quantity", "settings": { "operator": "gt", "value": "0", "token_browser": "{{ Browse Tokens }}", "condition_type": "AND" }, "weight": 999 }, "4": { "field": "product.metafields", "settings": { "multiple": "any", "namespace": "global", "key": "custom_stock_status", "operator": "not_equals", "value": "In Stock", "token_browser": "{{ Browse Tokens }}", "condition_type": "AND" }, "weight": 999 } }, "actions": [ { "type": "product_set_metafield_value", "settings": { "wait": "0", "custom_wait": "", "namespace": "global", "key": "custom_stock_status", "value_type": "string", "value": "In Stock" }, "weight": 60, "target_key": "product" } ] } ], "shared_workflow_id": 9116 }, "description": "This automation is fired when a product is updated. It checks on the available stock quantities and updates the product metafield based on the inventory levels." } ]