The guy who is in charge of our html emails is leaving and I have been asked to take over. We are an online retailer and send out an email once a week. An email will consist of a main image, a bit of an opening paragraph and then rows of product offers.
As everyone knows html emails are painful to work with due to the archaic html and css you need to deal with. When something needs changing last minute it's a real pain to wade through the spaghetti of td's to get to the link that needs it's url and tracking code changing and the opportunities to make a mistake are plentiful.
So I've decided to create an
xml file consisting of all the data that needs to go in the email. For example, the products would be recorded like this:
<products> <product id="1"> <title>My Product</title> <image width="160px" height="160px"> <alt>My Product</alt> <url>http://somedomain.com/emails/image1.jpg</url> </image> <link> <term>my_term_for_google_analytics</term> <url>http://somedomain.com/products/1</url> </link> </product> <product id="2"> <title>My Second Product</title> ... etc ... </product> </products>
I could then use an
xslt template to create the email. The advantage of this is that when a product goes out of stock the morning the email is due to go out I can just change a bit of text in the
xml file, generate the html and we're good to go again. I can also use the same
xml to create a microsite for the email. The trouble is I've had a good ol' Google about this and I can't find anyone else who has really tried this. So I'm either a visionary genius or an idiot. It usually turns out I'm an idiot so has anyone else had any experience of creating html emails from
xslt or can anyone see any major pitfalls with this approach. Is it a good idea?
Disclaimer - I don't really think I'm a potential visionary genius.