Remind customers after x days about unpaid orders, with Mechanic.

Mechanic is a development and ecommerce automation platform for Shopify. :)

Remind customers after x days about unpaid orders

This task wait for a configurable number of days (or hours!) after an order placed, and – if the order is still unpaid – emails the customer, and optionally adds a tag to the order. This task only sends one email – it does not send repeating reminders.

Runs Occurs whenever an order is created, with a 7 day delay. Configuration includes email subject, email body, tag to add to the order, number of days to wait, and use hours instead of days.

15-day free trial – unlimited tasks

Developer details

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?)

Open source
View on GitHub to contribute to this task
Subscriptions
shopify/orders/create+{{ options.number_of_days_to_wait__number_required | default: 7 }}.{% if options.use_hours_instead_of_days__boolean %}hours{% else %}days{% endif %}
Tasks use subscriptions to sign up for specific kinds of events. Learn more
Options
email subject (required), email body (multiline, required), tag to add to the order, number of days to wait (number, required), use hours instead of days (boolean)
Code
{% unless event.preview %}
  {% assign order = order.reload %}
{% endunless %}

{% assign order_qualifies = false %}
{% if order.financial_status == "pending" and order.cancelled_at == blank %}
  {% assign order_qualifies = true %}
{% endif %}

{% if event.preview or order_qualifies %}
  {% action "email" %}
    {
      "to": {{ order.email | json }},
      "reply_to": {{ shop.customer_email | json }},
      "subject": {{ options.email_subject__required | json }},
      "body": {{ options.email_body__multiline_required | strip | newline_to_br | json }},
      "from_display_name": {{ shop.name | json }}
    }
  {% endaction %}

  {% if options.tag_to_add_to_the_order != blank %}
    {% action "shopify" %}
      mutation {
        tagsAdd(
          id: {% if event.preview %}"gid://shopify/Order/1234567890"{% else %}{{ order.admin_graphql_api_id | json }}{% endif %}
          tags: {{ options.tag_to_add_to_the_order | json }}
        ) {
          userErrors {
            field
            message
          }
        }
      }
    {% endaction %}
  {% endif %}
{% endif %}
Task code is written in Mechanic Liquid, an extension of open-source Liquid enhanced for automation. Learn more
Defaults
Email subject
Don't forget! Order #{{ order.order_number }} still needs to be paid
Email body
Hi there,

Your payment is still required! Please get in touch at {{ shop.customer_email }} to proceed.

Thanks,
{{ shop.name }}
Number of days to wait
7