Customizing confirmation email by product

7 0 2
Hi there,
I know how to edit Shopify's confirmation email content (in the notification) but if there a way to send different emails according to the product(s) purchased? For example, if a customer buys product A, we send him/her email template 1. If he buys product B, we send him/her email template 2...
I didn't figure out a way to do it so I tried setting up Shopify marketing automations. I chose "lineitem ID equals xxx" as the condition. But looks like the automation isn't working. I wonder if anyone knows where to find the lineitem ID anyway? I am afraid I used the wrong ID.
Alternatively, is there an App to do that?
Thank you!
Replies 3 (3)

Shopify Partner
6275 574 1324

There's only 1 notification template, period, every other method means customers are getting multiple emails. 

Since there's 1 template the logic needs to be build into that

A lineitem id may not be what you think it is, try to match the underlying, or, or better the product.handle .


Just surround the body content with simple liquid logic.

First checks if the conditional product is in the order then create a flag to turn on/off different parts of the template or body content.


{% assign conditional_product_handle = "PRODUCTHANDLE" %}
{% assign product_handles = order.line_items | map:"product" | map:"handle" %}

{% if product_handles contains conditional_product_handle %}
 {% assign campaign_product_1 = true %}
 {% assign campaign_product_2 = false %}
{% endif %}

{% if  campaign_product_1 %}


If you need this customization then contact me directly by mail for services.
Please always provide context, examples: store url, theme name, post url(s) , or any further detail.
Contact Info in signature.

Save time & money ,Ask Questions The Smart Way

Confused? Busy? Get the solution you need

Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to

7 0 2

Hi Paul,


Thank you so much for your reply. That helped solve a big confusion bugging me for days. Just to confirm, you mean adding simple liquid logic in the confirmation email code, right? Not automation flow under marketing.



Shopify Partner
8 1 1

Hey! On top of that, it sounds like it might be beneficial for you guys to set up post-purchase flows with cross sells. 


Klaviyo is an amazing platform for that and you can get very detailed in the set up of flows based on specific customer behavior. 


Also, it integrates with Shopify so well - really recommend checking it out! 


Anna Rewinska • Growing Ecom Brands with Paid Ads and Email Marketing • Founder of Blue Drop Studio