Send a follow-up email to customers after purchasing from a certain vendor with Mechanic.

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

Send a follow-up email to customers after purchasing from a certain vendor

by Isaac Bowen (team@usemechanic.com)

This task will send a follow-up email to your customer after their order is paid, waiting for a configurable number of days before doing so.

Runs when an order is created. Configuration includes product vendor, email subject, email body, and number of days to wait before sending email.

15-day free trial – unlimited tasks

Documentation

This task will send a follow-up email to your customer after their order is paid. Configure it with the name of the vendor to watch for. The vendor name is case-sensitive!

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)
Options
product vendor (required), email subject (required), email body (required, multiline), number of days to wait before sending email (number)
Script
{% assign order_qualifies = true %}

{% assign order_vendors = order.line_items | map: "vendor" | uniq %}
{% unless order_vendors contains options.product_vendor__required %}
  {% assign order_qualifies = false %}
{% endunless %}

{% if order.email == blank %}
  {% assign order_qualifies = false %}
{% endif %}

{% if order.reload.cancelled_at != blank %}
  {% assign order_qualifies = false %}
{% endif %}

{% if event.preview or order_qualifies %}
  {% action "email" %}
    {
      "to": {{ order.email | json }},
      "subject": {{ options.email_subject__required | json }},
      "body": {{ options.email_body__required_multiline | strip | newline_to_br | json }},
      "reply_to": {{ shop.customer_email | json }},
      "from_display_name": {{ shop.name | json }}
    }
  {% endaction %}
{% endif %}
Mechanic tasks are written in Liquid, which makes them easy to write and easy to modify. Learn more about our platform.
Defaults
Email subject
Following up on your order ({{ order.name }})
Email body
Hello,

Thanks for ordering a (add your vendor!) product from {{ shop.name }}! Here's some important information you need to know...

Thanks,
{{ shop.name }}