Tags: Customers, Email, Localization, Retention
This task demonstrates how to send emails that respect the customer's language preference, by matching their locale to a pre-written email translation.
- View in the task library: tasks.mechanic.dev/send-a-welcome-email-to-new-customers-in-their-language
- Task JSON, for direct import: task.json
- Preview task code: script.liquid
{
"default_locale__required": "es",
"email_subject_translations__keyval_required": {
"es": "¡Bienvenidos, {{ customer.first_name }}!",
"en": "Welcome, {{ customer.first_name }}!"
},
"email_body_translations__keyval_multiline_required": {
"es": "Hola {{ customer.first_name }},\n\nEstamos contentos de que estés aquí. :) ¡Salud!\n\n{{ shop.name }}",
"en": "Hello {{ customer.first_name }},\n\nWe're glad you're here. :) Cheers!\n\n{{ shop.name }}"
}
}
Learn about task options in Mechanic
shopify/customers/create
Learn about event subscriptions in Mechanic
This task demonstrates how to send emails that respect the customer's language preference, by matching their locale to a pre-written email translation.
For more on the techniques in this task, see Sending multilingual emails.
Find this task in the library at tasks.mechanic.dev, and use the "Try this task" button. Or, import this task's JSON export – see Importing and exporting tasks to learn how imports work.
Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.
Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!