Remind customers daily about unpaid orders with Mechanic.

Mechanic is the one-tool-does-it-all automation app for Shopify. :)

Remind customers daily about unpaid orders

by Isaac Bowen (team@usemechanic.com)

This task emails customers right away about unpaid orders, and then continues to email them every (x) days until the order is paid. This task shows off Mechanic's ability to perform repeated delayed actions.

Runs when an order is created and 1 days after user/orders/unpaid_reminder is triggered. Configuration includes subject, body, and number of days to wait between reminders.

15-day free trial – unlimited tasks

Developer details

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.

Events
when an order is created (shopify/orders/create)
1 days after user/orders/unpaid_reminder is triggered (user/orders/unpaid_reminder+1.days)
Options
subject (required), body (multiline, required), number of days to wait between reminders (number, required)
Script
{% if event.topic == "user/orders/unpaid_reminder" %}
  {% assign order = shop.orders[event.data.order_id] %}
{% endif %}

{% 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": {
      "type": "email",
      "options": {
        "to": {{ order.email | json }},
        "reply_to": {{ shop.customer_email | json }},
        "subject": {{ options.subject__required | json }},
        "body": {{ options.body__multiline_required | strip | newline_to_br | json }},
        "from_display_name": {{ shop.name | json }}
      }
    }
  }

  {
    "action": {
      "type": "event",
      "options": {
        "topic": "user/orders/unpaid_reminder",
        "data": {
          "order_id": {{ order.id | json }}
        }
      }
    }
  }
{% endif %}
Mechanic tasks are written in Liquid, which makes them easy to write and easy to modify. Learn more about our platform.
Defaults
Subject
Don't forget! Order #{{ order.order_number }} still needs to be paid
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 between reminders
1