Mechanic is a development and ecommerce automation platform for Shopify. :)
It's critical to stay on top of any orders that aren't properly fulfilled – and your customers care, too! Use this task to auto-tag orders, to email yourself a reminder, and optionally to send customers a little reassurance message, if an order hasn't been fulfilled a configurable number of days after payment.
Runs Occurs whenever an order is paid, with a 2 day delay. Configuration includes include partially fulfilled orders, tag to add, staff notification recipient, send the customer an email, customer email subject, customer email body, and days to wait before followup.
It's critical to stay on top of any orders that aren't properly fulfilled – and your customers care, too! Use this task to auto-tag orders, to email yourself a reminder, and optionally to send customers a little reassurance message, if an order hasn't been fulfilled a configurable number of days after payment.
This task watches for paid orders, and schedules a follow-up check for some number of days later (you choose!).
Configure this task with a tag to automatically apply that tag on schedule, if the order remains unfulfilled. (Or if the order is partially fulfilled, if you've configured the task for this option.) Add a staff email address to receive a notification message. And, optionally, send a reassuring email to the customer, letting them know that the order is on its way, and with specifics about what's not in stock.
This task won't tag or send emails if the order is partially fulfilled, if the order has been restocked, or if the order has been cancelled.
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/paid+{{ options.days_to_wait_before_followup__number_required }}.days
{% if event.preview %} {% assign order = hash %} {% assign order["admin_graphql_api_id"] = "gid://shopify/Order/1234567890" %} {% assign order["fulfillment_status"] = nil %} {% assign order["cancelled_at"] = nil %} {% assign order["email"] = "customer@example.com" %} {% assign order["name"] = "#1234" %} {% assign order["id"] = 1234567890 %} {% else %} {% assign order = order.reload %} {% endif %} {% if order == nil %} {% comment %} Happens when the order has been deleted {% endcomment %} {% log "Order has been deleted; skipping" %} {% break %} {% endif %} {% assign order_qualifies = false %} {% if order.fulfillment_status == blank %} {% assign order_qualifies = true %} {% elsif options.include_partially_fulfilled_orders__boolean and order.fulfillment_status == "partial" %} {% assign order_qualifies = true %} {% endif %} {% if order.cancelled_at != blank %} {% assign order_qualifies = false %} {% endif %} {% if order_qualifies %} {% if options.tag_to_add != blank %} {% action "shopify" %} mutation { tagsAdd( id: {{ order.admin_graphql_api_id | json }} tags: {{ options.tag_to_add | json }} ) { userErrors { field message } } } {% endaction %} {% endif %} {% if options.staff_notification_recipient__email != blank %} {% capture email_body %} Hello, Order {{ order.name }} (for {{ order.email | default: "unknown email" }}) is still unfulfilled. Manage this order: https://{{ shop.domain }}/admin/orders/{{ order.id }} Thanks, Mechanic (for {{ shop.name }}) {% endcapture %} {% action "email" %} { "to": {{ options.staff_notification_recipient__email | json }}, "subject": {{ "Order " | append: order.name | append: " is still unfulfilled" | json }}, "body": {{ email_body | strip | unindent | newline_to_br | json }}, "reply_to": {{ shop.customer_email | json }}, "from_display_name": {{ shop.name | json }} } {% endaction %} {% endif %} {% assign order_email_qualified = false %} {% if event.preview or order.email != blank %} {% assign order_email_qualified = true %} {% endif %} {% if options.send_the_customer_an_email__boolean and order_email_qualified %} {% action "email" %} { "to": {{ order.email | json }}, "subject": {{ options.customer_email_subject | strip | json }}, "body": {{ options.customer_email_body__multiline | strip | newline_to_br | json }}, "reply_to": {{ shop.customer_email | json }}, "from_display_name": {{ shop.name | json }} } {% endaction %} {% endif %} {% endif %}
unfulfilled-needs-attention
Order {{ order.name }} is (still) on its way!
Hi {{ order.customer.first_name | default: "there" }}, Thanks for your order! We're still working on getting everything to you. If you have any questions, just reply to this message. Thanks, The team at {{ shop.name }}
2