-
Notifications
You must be signed in to change notification settings - Fork 0
/
auto-complete-new-draft-orders.json
20 lines (20 loc) · 1.11 KB
/
auto-complete-new-draft-orders.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"docs": "This task monitors for newly-created draft orders, and converts each one into a completed order. Nothing more, nothing less. :)",
"halt_action_run_sequence_on_error": false,
"name": "Auto-complete new draft orders",
"online_store_javascript": null,
"options": {
"mark_new_orders_as_fully_paid__boolean": true
},
"order_status_javascript": null,
"perform_action_runs_in_sequence": false,
"script": "{% assign payment_pending = true %}\n{% if options.mark_new_orders_as_fully_paid__boolean %}\n {% assign payment_pending = false %}\n{% endif %}\n\n{% action \"shopify\" %}\n mutation {\n draftOrderComplete(\n id: {{ draft_order.admin_graphql_api_id | json }}\n paymentPending: {{ payment_pending | json }}\n ) {\n draftOrder {\n order {\n id\n name\n fullyPaid\n }\n }\n userErrors {\n field\n message\n }\n }\n }\n{% endaction %}",
"subscriptions": [
"shopify/draft_orders/create"
],
"subscriptions_template": "shopify/draft_orders/create",
"tags": [
"Draft Orders",
"Payment"
]
}