[ { "label": "Unpublish products from the web and publish them on the POS Channel", "trigger_type": [ "product_created", "product_updated" ], "object_type": "product", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "3": { "field": "product.published", "settings": { "value": "true", "condition_type": "AND" }, "weight": 999 }, "4": { "field": "product.inventory_quantity", "settings": { "operator": "lte", "value": "0", "token_object_type": "product", "condition_type": "AND" }, "weight": 999 }, "5": { "field": "product.published_at", "settings": { "operator": "not_empty", "value": "", "check_date": [], "use_timezone": 0, "timezone": "shop", "token_object_type": "product", "condition_type": "AND" }, "weight": 999 } }, "actions": { "2": { "type": "shopify_api_request", "settings": { "token_object_type": "product", "label": "Unpublish from web but leave POS published.", "method": "PUT", "path": "products\/{{product.id}}", "data": "{\r\n \"product\": {\r\n \"id\": {{ product.id }},\r\n \"published_at\": null,\r\n \"published_scope\": \"global\"\r\n }\r\n}", "response_handle": "", "response_object_type": "", "parent_data": "", "workflow_actions": [], "wait": "0", "cw_timezone": "America\/New_York", "custom_wait": "", "run_once": 0 }, "weight": 1009, "target_key": "product" } } }, "2": { "conditions": { "1": { "field": "product.published", "settings": { "value": "true", "condition_type": "AND" }, "weight": 999 }, "2": { "field": "product.inventory_quantity", "settings": { "operator": "gte", "value": "0", "token_object_type": "product", "condition_type": "AND" }, "weight": 999 }, "3": { "field": "product.published_at", "settings": { "operator": "empty", "value": "", "check_date": [], "use_timezone": 0, "timezone": "shop", "token_object_type": "product", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "shopify_api_request", "settings": { "token_object_type": "product", "label": "Unpublish from web but leave POS published.", "method": "PUT", "path": "products\/{{product.id}}", "data": "{\r\n \"product\": {\r\n \"id\": {{ product.id }},\r\n \"published_scope\": \"global\"\r\n }\r\n}", "response_handle": "", "response_object_type": "", "parent_data": "", "workflow_actions": [], "wait": "0", "cw_timezone": "America\/New_York", "custom_wait": "", "run_once": 0 }, "weight": 1009, "target_key": "product" } } } }, "shared_workflow_id": 53536 }, "description": "This workflow will unpublish a product from the web channel, leaving it available on the POS channel. The automation will also publish the product on the web channel when restocked. " } ]