Mechanic is a development and ecommerce automation platform for Shopify. :)
This task monitors for newly-created draft orders, and converts each one into a completed order. Nothing more, nothing less. :)
Runs Occurs whenever a draft order is created. Configuration includes mark new orders as fully paid.
Mechanic is designed to benefit everybody: merchants, customers, developers, agencies, Shopifolks, everybody.
That’s why we make it easy to configure automation without code, why we make it easy to tweak the underlying code once tasks are installed, and why we publish it all here for everyone to learn from.
(By the way, have you seen our documentation? Have you joined the Slack community?)
shopify/draft_orders/create
{% assign payment_pending = true %}
{% if options.mark_new_orders_as_fully_paid__boolean %}
{% assign payment_pending = false %}
{% endif %}
{% action "shopify" %}
mutation {
draftOrderComplete(
id: {{ draft_order.admin_graphql_api_id | json }}
paymentPending: {{ payment_pending | json }}
) {
draftOrder {
order {
id
name
fullyPaid
}
}
userErrors {
field
message
}
}
}
{% endaction %}true