SparkPost Templates: Cascading Data with Substitution Data

Benjamin Dean
May. 11, 2015 by Benjamin Dean

cascading dataEffective email is fueled by data-driven, personalized content containing a clear and conspicuous purpose. This is true both for transactional email and for non-transactional (marketing, one-to-many, or ‘bulk’) email. As email content providers, when we deliver anticipated, well-organized, concise and personalized email transmissions to our recipients, the more relevant, engaging and compelling our email content will be. SparkPost’s REST API easily empowers you as a developer to programmatically generate relevant, personalized content for all of your transmissions with our Substitution Data templating. SparkPost’s Substitution Data allows you to data-power your email transmission content at appropriate scopes within the email assembly process.  Data-driven customer content in your email transmissions strengthens your messaging and makes it more insightful and friendly. Read about all of the logic, looping, conditional statements and other programmatic power in our Substitution Data Reference.

Unique to SparkPost (versus our competitors), we enable cascading substitutions at the transmission level, the template level, and the recipient level for maximum customization. The availability of data dictates how the customization happens.

Similar to cascading style sheets (CSS) which style DOM elements using cascading rule importance, SparkPost gives you the same degree of flexibility in applying data-driven personalization to your emails. We can think of the cascade as tiers that get closer and closer to the individual recipient.

If you have substitution data for the recipient (shown below as {{Salutory}}, that takes precedence. But if you don’t have substitution data at that level, SparkPost looks for substitution data at the template level and lastly at the transmission level. For example, you might have designed the template for people who bought a certain product. In that case, you could say “Thank you for buying our new gizmo!” If no substitution data is available at the template level, it falls back to what you may have defined at the transmission level (in the example below, “Greetings and salutations, Valued Customer”).

The cascading approach to Substitution Data provides a high level of flexibility so that email is as personalized as possible based on the data you have available for each recipient. Substitution is a powerful feature. For an in-depth look at Substitution Data, see the reference doc at https://www.sparkpost.com/api#/reference/substitutions-reference

To learn more:

Related Content

Meet Our New West Coast Developer Advocate

From Intern to Engineer to West Coast Developer Advocate -- Avi’s got big things ahead of him! Learn more about his journey and what he's most excited about.

read more

Community Spotlight: Rise And Shine With This Alexa Skill

Getting out of bed in the morning is easier with coffee and your new favorite Alexa skill: MyMorning.Online, our winners from the recent AngelHack.

read more

Our Top 5 Email Template Hacks

From creating standards that can apply to many templates to design hints on validating your data, here are our top 5 email template hacks.

read more

Start sending email in minutes!

The world’s most powerful email delivery solution is now yours in a developer-friendly, quick to set up cloud service. Open a SparkPost account today!

Get Started

Send this to a friend