Mechanic is a development and ecommerce automation platform for Shopify. :)
Save time jumping between screens, by making sure that the order record has everything you need. Useful for shops that keep important fulfillment information in the customer notes. This task can be run manually to back-fill notes for open orders.
Runs Occurs whenever an order is created and Occurs when a user manually triggers the task.
Save time jumping between screens, by making sure that the order record has everything you need. Useful for shops that keep important fulfillment information in the customer notes. This task can be run manually to back-fill notes for open orders.
This task runs automatically, whenever a new order is created.
Run this task manually to scan all open orders, copying the customer note to the order note. (To include open orders older than 60 days, enable "read all orders".)
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/orders/create mechanic/user/trigger
{% capture newline %} {% endcapture %} {% if event.preview %} { "action": { "type": "shopify", "options": [ "update", [ "order", 12345 ], { "note": "(Note copied from customer)" } ] } } {% elsif event.topic == "shopify/orders/create" %} {% if order.customer.note == blank %} {"log": "No note on file for this customer; skipping order update"} {% else %} { "action": { "type": "shopify", "options": [ "update", [ "order", {{ order.id | json }} ], { "note": {{ order.note | append: newline | append: newline | append: order.customer.note | strip | json }} } ] } } {% endif %} {% elsif event.topic == "mechanic/user/trigger" %} {% for order in shop.orders.open %} {% assign order_note_downcased = order.note | downcase %} {% assign customer_note_downcased = order.customer.note | downcase %} {% unless customer_note_downcased == blank or order_note_downcased contains customer_note_downcased %} { "action": { "type": "shopify", "options": [ "update", [ "order", {{ order.id | json }} ], { "note": {{ order.note | append: newline | append: newline | append: order.customer.note | strip | json }} } ] } } {% endunless %} {% endfor %} {% endif %}