Mechanic is a development platform for Shopify. :)
This task monitors order tags, and when a certain tag is added to an order, it auto-fulfills all unfulfilled items in the order. Optionally, you can choose to notify customers when their order is fulfilled by this task.
Runs when an order is updated. Configuration includes order tag to watch for, ignore if this order tag is found, and notify customer on fulfillment.
This task monitors order tags, and when a certain tag is added to an order, it auto-fulfills all unfulfilled items in the order. Optionally, you can choose to notify customers when their order is fulfilled by this task.
This task auto-fulfills from the store's default location.
Mechanic is designed to benefit everybody: merchants, customers, developers, agencies, Gurus, 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.
{% if event.preview %} {% assign order = hash %} {% assign order["id"] = 1234567890 %} {% assign order["tags"] = options.order_tag_to_watch_for__required %} {% endif %} {% assign order_qualifies = false %} {% if order.fulfillment_status == nil or order.fulfillment_status == "partial" %} {% assign order_tags = order.tags | split: ", " %} {% if order_tags contains options.order_tag_to_watch_for__required %} {% assign order_qualifies = true %} {% endif %} {% if order_qualifies and options.ignore_if_this_order_tag_is_found != blank %} {% if order_tags contains options.ignore_if_this_order_tag_is_found %} {% log message: "Order had the tag to watch for, but it also had the ignore tag. Skipping.", order_tags: order_tags, task_options: options %} {% assign order_qualifies = false %} {% endif %} {% endif %} {% endif %} {% if order_qualifies %} {% action "shopify" %} [ "post", "/admin/orders/{{ order.id }}/fulfillments.json", { "fulfillment": { "location_id": {{ shop.primary_location_id | json }}, "notify_customer": {{ options.notify_customer_on_fulfillment__boolean | json }}, "status": "success" } } ] {% endaction %} {% endif %}