Setting the file. One moment. Order Created Presale Products · Shopify · Shopify/Shopify-AI-Toolkit · Skills DocsOrder Created Presale Products
22.11
Onboarding Merchant
(opens in a new tab)
assets/flow/order-created-presale-products.json
JSON·121 lines·3 KB
"TRIGGER"
,
12 "config_field_values": []
13 },
14 {
15 "step_id": "has_presale_items",
16 "task_id": "shopify::flow::condition",
17 "task_version": "0.1",
18 "task_type": "CONDITION",
19 "config_field_values": [
20 {
21 "config_field_id": "condition",
22 "value": "(order.lineItems any? |lineItems_item| (lineItems_item.product.tags any? |tags_item| (tags_item == 'presale')))"
23 }
24 ]
25 },
26 {
27 "step_id": "each_line_item",
28 "task_id": "shopify::flow::foreach",
29 "task_version": "0.1",
30 "task_type": "FOREACH",
31 "config_field_values": [
32 {
33 "config_field_id": "listpath",
34 "value": "order.lineItems"
35 }
36 ]
37 },
38 {
39 "step_id": "is_presale_product",
40 "task_id": "shopify::flow::condition",
41 "task_version": "0.1",
42 "task_type": "CONDITION",
43 "config_field_values": [
44 {
45 "config_field_id": "condition",
46 "value": "(lineItemsForeachitem.product.tags any? |tags_item| (tags_item == 'presale'))"
47 }
48 ]
49 },
50 {
51 "step_id": "tag_presale_product",
52 "task_id": "shopify::admin::add_product_tags",
53 "task_version": "0.1",
54 "task_type": "ACTION",
55 "config_field_values": [
56 {
57 "config_field_id": "product_id",
58 "value": "lineItemsForeachitem.product.id"
59 },
60 {
61 "config_field_id": "tags",
62 "value": "[\"Ordered-Presale\"]"
63 }
64 ]
65 },
66 {
67 "step_id": "email_presale_summary",
68 "task_id": "shopify::flow::send_email",
69 "task_version": "2.0",
70 "task_type": "ACTION",
71 "config_field_values": [
72 {
73 "config_field_id": "address",
74 "value": "staff@example.com"
75 },
76 {
77 "config_field_id": "subject",
78 "value": "Presale order {{ order.name }}"
79 },
80 {
81 "config_field_id": "message",
82 "value": "Finished processing the presale products in order {{ order.name }}."
83 }
84 ]
85 }
86 ],
87 "links": [
88 {
89 "from_step_id": "order_created",
90 "from_port_id": "output",
91 "to_step_id": "has_presale_items",
92 "to_port_id": "input"
93 },
94 {
95 "from_step_id": "has_presale_items",
96 "from_port_id": "true",
97 "to_step_id": "each_line_item",
98 "to_port_id": "input"
99 },
100 {
101 "from_step_id": "each_line_item",
102 "from_port_id": "loop_body",
103 "to_step_id": "is_presale_product",
104 "to_port_id": "input"
105 },
106 {
107 "from_step_id": "is_presale_product",
108 "from_port_id": "true",
109 "to_step_id": "tag_presale_product",
110 "to_port_id": "input"
111 },
112 {
113 "from_step_id": "each_line_item",
114 "from_port_id": "after",
115 "to_step_id": "email_presale_summary",
116 "to_port_id": "input"
117 }
118 ],
119 "patched_fields": []
120 }
121}