Shopify themes + email notifications

I’d like to give some product feedback regarding the email notifications. Could Shopify not enable in the future the ability to store email confirmations as liquid code or .liquid files in the theme editor under an emails folder? Because you might want differently themed emails based on the current theme of the store e.g. a halloween theme + halloween email templates and that could be done simply by changing the theme. Then when the event is over you can switch your theme back to your original brand and everything changes. You could then edit the liquid code in the VS code editor (which currently used to edit themes) and is a lot nicer than the current email notifications editor (which lacks features like syntax checking and intellisense).

The folder could be called emails and each .liquid file could represent an entry in the email notifications section of Shopify admin (e.g. order-confirmed.liquid, order-delivered.liquid, new-customer.liquid, etc.)

And I think because themes can easily be imported and exported it just makes sense for the product to have this all under one umbrella rather than separately. I know stores will usually stick to one theme but this could open up the ability for stores to have unique looks based on sales/seasons, etc. and the emails can then follow suit.

Whereas currently it would all need to be manually changed each time. But having it incorporated with the theme will mean instantly changed emails (or setup in advance by using the theme import/export or cloning your existing theme).

Interesting request. The transactional emails are based on order/fulfillment not what theme is active at the time. Would require significant structural change.

There would probably be a bit of versioning and rollback chaos. And since Shopify only manages a handful out of the thousands of themes, they’d either need to inject the files into the theme, or set heavy restrictions for theme developers as to not have complete corruption and contamination in the theme marketplace.

Here’s a major issue. Those emails are sensitive information between you and your customer. If part of the theme, that presents a massive security vulnerability. Anyone, like a shady developer you hire, who would have access to your theme would have the ability to cause some serious damage. I think that’s a big enough concern to not have your email templates anywhere near the theme. Theme = outward facing. Emails = sensitive and internal.

Maybe a set of templates you choose from might be a better request. Like in the Messaging app. You could even have an entire “theme” lined up of email templates.

On the other hand they did add robots.txt.liquid as an optional theme resource?


I would agree that email “theming” would be a nice option with a better editor.
Currently notifications are like an ugly duckling IMO.

We used to store e-mail templates in the same GIT repo next to the theme code; unfortunately, there was no way to deploy them from the repo automatically, not sure if there is now…

True but the same could be said for the theme. You can put some dodgy JavaScript into the theme or download a dodgy app from the store which could do things like capture keystrokes and send this info via XHR requests to 3rd parties without your knowledge… programming in general is risky. So is using npm as no one has the time to check all dependencies when building stuff in JS. On my original point as they are separate files I would not see the concern or cross contamination. Yes if someone you hire has creative control over both themes and emails you would expect them not to do anything malicious but that’s programming. You can zero trust using permissions as much as possible but there’s a limitation to this. Besides if you’re getting someone to theme your site you probably will give them access to the emails too so it’s all on brand. Emails are very secure nowadays as very little can be executed in email clients because of that reason so I do not see this as exposing anything. Tracking pixels is as invasive as it can get with email liquid code. JS is very limited in emails and some clients remove CSS and JS altogether and disable the downloading of images for this exact reason.

Hi there @itdevelopment_1
This is a great concept and would make the management of seasonal branding so much better and easier. One workaround is Shopify Email or an app that provides multiple branded templates and automations and allowing you to change templates by campaign or tag. You can also save reusable Liquid code snippets in a theme’s asssets file and call them from within your notifications to gain a level of consistency. At the moment, I organize seasonal variations with duplicated notification templates along with naming conventions so switching between them is a matter of a couple clicks and controlled (i.e. not having to rebuild everything each time).