Email customers when created
Use this task to send a quick welcome email to customers, when they sign up or are otherwise created in your shop. Optionally, filter by customer tag to only send welcome emails to certain customers.
Try this taskWhen it runs
Occurs whenever a customer is created
What you choose
- Required customer tag
- Email subject
- Email body
Documentation
Use this task to send a quick welcome email to customers, when they sign up or are otherwise created in your shop. Optionally, filter by customer tag to only send welcome emails to certain customers.
This task will send out your email to any customer when their account is created. This can happen when a customer signs themselves up, when you create their customer record within the store, when a new customer places an order, or for any other reason that a customer record is created.
Task code and subscriptions
You can edit the Liquid code after installing this task. View on GitHub or ask a question in the Mechanic Slack community.
Subscriptions
shopify/customers/create
How task subscriptions work
Option types and flags
- Email subject (required)
- Email body (multiline, required)
Task code
{% assign customer_qualifies = false %}
{% if options.required_customer_tag == blank %}
{% assign customer_qualifies = true %}
{% else %}
{% assign customer_tags = customer.tags | split: ", " %}
{% if customer_tags contains options.required_customer_tag %}
{% assign customer_qualifies = true %}
{% endif %}
{% endif %}
{% if customer.email == blank %}
{% assign customer_qualifies = false %}
{% endif %}
{% if event.preview or customer_qualifies %}
{
"action": {
"type": "email",
"options": {
"to": {{ customer.email | default: "customer@example.com" | json }},
"reply_to": {{ shop.customer_email | json }},
"from_display_name": {{ shop.name | json }},
"subject": {{ options.email_subject__required | json }},
"body": {{ options.email_body__multiline_required | strip | newline_to_br | json }}
}
}
}
{% endif %}
Mechanic Liquid reference