[ { "label": "Change the order fulfillment location based on tags", "trigger_type": [ "order_created" ], "object_type": "order", "app_id": "triggers", "tags": [], "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "1": { "field": "order.tags_array", "settings": { "multiple": "any", "operator": "equals", "value": "my-tag", "long_value": "", "token_object_type": "order", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "shopify_api_request", "settings": { "wait": "0", "run_once": 0, "custom_wait": "", "label": "", "method": "GET", "path": "orders\/{{ order.id }}\/fulfillment_orders", "data": "", "response_handle": "handle_response", "response_object_type": "", "parent_data": "", "workflow_actions": [], "token_object_type": "order", "exported_workflow": { "label": "HTTP Response subworkflow", "trigger_type": [ "manual" ], "object_type": "http_response", "app_id": "triggers", "tags": [], "settings": { "priority": 0, "condition_groups": { "1": { "conditions": [], "actions": { "1": { "type": "custom", "settings": { "wait": "0", "custom_wait": "", "label": "", "twig": "{% if http_response.success ==1 %}\r\n{% set fulfillment_orders = http_response.json.fulfillment_orders %}\r\nfullfill Orders Found : {{fulfillment_orders|length}}\r\n{% for fulfillment_order in fulfillment_orders %}\r\n{{fulfillment_order.assigned_location_id|debug}}\r\n{% set movedFulfillment = QUEUE_ACTION('shopify_api_request',{\r\n method: \"POST\",\r\n path: \"fulfillment_orders\/\"~fulfillment_order.id~\"\/move\",\r\n data: {\"fulfillment_order\": {\"new_location_id\": \"36688363567\"}}\r\n})%}\r\n{% endfor %}\r\n{% endif %}", "token_object_type": "http_response" }, "weight": 999, "target_key": "http_response" } } } } } } }, "weight": 999, "target_key": "order" } } } }, "shared_workflow_id": 37820 } } ]