This is quite specific, so I don’t know if it will be useful to anyone. But I really have to blog about it in a vain attempt to justify the amount of time I’ve spent on this.
I’m helping out a friend with his Shopify store for buying fancy prescription sports glasses. He wants to automatically send an email to his suppliers whenever an order is submitted, containing all the relevant information for them to fulfill the order.
The solution he’s found for this uses the free Shopify Flow app. This app lets you set up workflows to do things in response to events - in this case, “Send internal email” in response to “Order created”. But I’m sure it’s generally useful for much more use cases I don’t know of.
The template for the email is written in Flow’s custom editor, and uses Liquid. So you can use liquid to add any of the shop, order or order.lineItem data to the email. However, it’s pretty confusing to try to build up a mental picture of all the fields that are available to you and what they might contain for any given order. There is a handy browser which will tell you all the available variables, but it’s a little slow and cumbersome to click around, and it’s not easy to copy/paste names out of it.
I’m sure anyone who is trying to do this same thing would have the same challenge of experimenting and experimenting with different data, tweaking for hours and then going through the slow process of submitting test orders over and over again.