Mechanic is a development platform for Shopify. :)
Use this task to make repeat business easy. Set the number of days to wait, then let this task automatically email your customers a one-click reorder link X days after their purchase, sending them straight to checkout with their entire cart pre-filled.
Runs 30 days after an order is paid. Configuration includes order referral code, email subject, email body, and days to wait.
Use this task to make repeat business easy. Set the number of days to wait, then let this task automatically email your customers a one-click reorder link X days after their purchase, sending them straight to checkout with their entire cart pre-filled.
Tip: Fill in the "Order referral code" option to enable order conversion tracking for this task's emails. (Learn more about conversion tracking with order links.)
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.
{% assign order = order.reload %} {% if event.preview or order.email != blank %} {% assign variant_string = "" %} {% for line_item in order.line_items %} {% if line_item.variant_id %} {% capture variant_string %}{% if variant_string != blank %}{{ variant_string }},{% endif %}{{ line_item.variant_id }}:{{ line_item.quantity }}{% endcapture %} {% endif %} {% endfor %} {% if event.preview and variant_string == blank %} {% assign variant_string = "1234567890:1,0987654321:2" %} {% endif %} {% if variant_string != blank %} {% capture reorder_url %}https://{{ shop.domain }}/cart/{{ variant_string }}?{% if options.order_referral_code != blank %}ref={{ options.order_referral_code | url_param_escape }}&{% endif %}checkout[email]={{ order.email | url_param_escape }}{% endcapture %} { "action": { "type": "email", "options": { "to": {{ order.email | json }}, "subject": {{ options.email_subject__required | strip | json }}, "body": {{ options.email_body__multiline_required | replace: "REORDER_URL", reorder_url | strip | newline_to_br | json }}, "reply_to": {{ shop.customer_email | json }}, "from_display_name": {{ shop.name | json }} } } } {% endif %} {% endif %}
Would you like to order again?
Hello, Thanks for your order! Use this link to reorder in just a couple clicks: <b><a href="REORDER_URL">Reorder now</a></b> Cheers, {{ shop.name }}