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

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

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

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 Occurs whenever 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, waiting for a configurable number of days before doing so.

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, 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{% if options.number_of_days_to_wait_before_sending_email__number != blank %}+{{ options.number_of_days_to_wait_before_sending_email__number }}.days{% endif %}
Tasks use subscriptions to sign up for specific kinds of events. Learn more
Options
product vendor (required), email subject (required), email body (required, multiline), number of days to wait before sending email (number)
Code
{% 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 %}
Task code is written in Mechanic Liquid, an extension of open-source Liquid enhanced for automation. Learn more
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 }}