Customer name in the email temple

Solved

Customer name in the email temple

mpatsi
Shopify Partner
111 0 14

Hello

 

I wonder how can i add the name of the customer using liquid in the title of the automated email when he/she place an order.

 

Thanks in advance

 

Screenshot from 2023-05-30 09-53-39.png

Accepted Solution (1)

ZestardTech
Shopify Partner
5833 1058 1396

This is an accepted solution.

Hello @mpatsi 

 

To add the name of the customer dynamically to the title of an automated email in Shopify, you can use Liquid, which is Shopify's template language. Here's an example of how you can achieve this:

  1. In your Shopify admin, go to Settings > Notifications.

  2. Locate the automated email notification you want to modify and click on its name.

  3. In the email template editor, locate the <title> tag, which represents the email's title.

  4. Modify the <title> tag to include the customer's name using Liquid syntax. For

 

 

<title>New order placed by {{ customer.first_name }} {{ customer.last_name }}</title>

 

 

In the above example, {{ customer.first_name }} and {{ customer.last_name }} are Liquid variables that will be replaced with the corresponding values when the email is sent. This assumes that the customer's first name and last name are stored as separate properties in the customer object.

 

5.Save the changes to the email template.

By using {{ customer.first_name }} and {{ customer.last_name }} in the email's title, Shopify will dynamically replace these variables with the actual customer's name when the email is sent. This way, each customer will receive an email with a personalized title that includes their name.

 

Note: Keep in mind that the available Liquid variables can vary depending on the email template and the data available in the context of that template. Make sure to test the email notification to ensure the variables are being replaced correctly and provide the desired output.

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: [email protected]
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing

View solution in original post

Replies 7 (7)

ZestardTech
Shopify Partner
5833 1058 1396

This is an accepted solution.

Hello @mpatsi 

 

To add the name of the customer dynamically to the title of an automated email in Shopify, you can use Liquid, which is Shopify's template language. Here's an example of how you can achieve this:

  1. In your Shopify admin, go to Settings > Notifications.

  2. Locate the automated email notification you want to modify and click on its name.

  3. In the email template editor, locate the <title> tag, which represents the email's title.

  4. Modify the <title> tag to include the customer's name using Liquid syntax. For

 

 

<title>New order placed by {{ customer.first_name }} {{ customer.last_name }}</title>

 

 

In the above example, {{ customer.first_name }} and {{ customer.last_name }} are Liquid variables that will be replaced with the corresponding values when the email is sent. This assumes that the customer's first name and last name are stored as separate properties in the customer object.

 

5.Save the changes to the email template.

By using {{ customer.first_name }} and {{ customer.last_name }} in the email's title, Shopify will dynamically replace these variables with the actual customer's name when the email is sent. This way, each customer will receive an email with a personalized title that includes their name.

 

Note: Keep in mind that the available Liquid variables can vary depending on the email template and the data available in the context of that template. Make sure to test the email notification to ensure the variables are being replaced correctly and provide the desired output.

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: [email protected]
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing
mpatsi
Shopify Partner
111 0 14

Thank you! 🤗

ZestardTech
Shopify Partner
5833 1058 1396

Thank you for your response. It's good to know that it's worked for you. Kindly feel free to get back to me if you need any further assistance.
If helpful then please Like and Accept Solution.

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: [email protected]
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing
Will_Westwood
Tourist
6 0 3

Hi there!

 

I'm wondering if it's possible to use these customer name variables in the email body itself? (Using Shopify Email)

I have tried using the {{ customer.first_name }} variable, but it doesn't seem to like it.

 

Thanks!

ZestardTech
Shopify Partner
5833 1058 1396

Hello @Will_Westwood 

Please send a screenshot of where to add the customer's name.

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: [email protected]
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing
Will_Westwood
Tourist
6 0 3

Hey! Here you go, seems to not like it!

Screenshot_4 (2).jpg

hgnbpt
Not applicable
2 0 0

I tried to pull customer tags into the email template but that does not seem to work.  When using a custom liquid block like this:

 

<title>New order placed by

{{ data.customer.first_name }}

{{ data.customer.last_name }}

{{ data.customer.tags.first }}
</title>

 

It displays the name elements fine but the tag does not pull in.

 

Any feedback would be appreciated.