[ { "label": "Check if a customer has ever purchased a specific item and tag them", "trigger_type": [ "customer_custom" ], "object_type": "customer", "app_id": "triggers", "tags": [], "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "1": { "field": "customer.tags_array", "settings": { "multiple": "none", "operator": "equals", "value": "custom-item-purchased", "long_value": "", "token_browser": "{{ Browse Tokens }}", "token_object_type": "customer", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "shopify_api_request", "settings": { "wait": "0", "custom_wait": "", "label": "Load the customer's previous orders", "method": "GET", "path": "orders", "data": "{\r\n\"status\":\"closed\",\r\n\"email\":\"{{ customer.email }}\"\r\n}", "response_handle": "handle_objects", "response_object_type": "order", "parent_data": "", "workflow_actions": [], "token_object_type": "customer", "exported_workflow": { "label": "Order subworkflow", "trigger_type": [ "manual" ], "object_type": "order", "app_id": "triggers", "tags": [], "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "2": { "field": "parent.tags_array", "settings": { "multiple": "none", "operator": "equals", "value": "custom-item-purchased", "long_value": "", "token_browser": "{{ Browse Tokens }}", "token_object_type": "order", "condition_type": "AND" }, "weight": 10 }, "1": { "field": "order.line_items.title", "settings": { "multiple": "any", "operator": "contains", "value": "custom", "long_value": "", "token_browser": "{{ Browse Tokens }}", "token_object_type": "order", "condition_type": "AND" }, "weight": 20 } }, "actions": { "2": { "type": "debug", "settings": { "wait": "0", "custom_wait": "", "action_label": "", "title": "Order That's Matching Condition", "body": "Order ID: {{ order.id}} \r\nOrder No: {{ order.name }} \r\nOrder Email: {{ order.email}} \r\nDate Created:{{ order.created_at|date('Ymd') }} \r\nItems in Order\r\n{% for line_item in order.line_items %}\r\n {{ line_item.title }}\r\n{% endfor %}\r\n\r\n", "token_object_type": "order" }, "weight": 30, "target_key": "order" }, "1": { "type": "customer_add_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "custom-item-purchased", "token_object_type": "order" }, "weight": 40, "target_key": "order.customer" } } } } } } }, "weight": 999, "target_key": "customer" } } } }, "shared_workflow_id": 28817 } } ]