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

A FreeMarker Converter in C#

One of our engineers walks through step by step how he created a FreeMarker conversion tool in C# to support SparkPost templates.

read more

Why We Hack

A look inside the internal hackathon trend, the cross-functional relationships that hackathons encourage and more reasons why we hack at SparkPost.

read more

High Touch Client Onboarding Using Process Street and Zapier

How to build a zap connecting SparkPost with Process Street to produce a high touch client onboarding experience for your sales outreach teams.

read more

Get started and start sending

Try SparkPost and see how easy it is to deliver your app’s email on time and to the inbox.

Try Free

Send this to a friend