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

How to Generate Realistic Test Traffic Patterns in your SparkPost Account

Behold, a “bouncy sink” that behaves like real-world recipients and a “traffic generator” to easily test traffic patterns and complex sending environments.

read more

Target Engaged Users with New Smart Send Beta

Smart Send is an optional API feature that allows you to easily remove recipients who haven’t clicked on or opened your messages in the past six months.

read more

This is My Code

In This is My Code, our lead data scientist outlines code written in Javascript for a NodeJS process used to move data between AWS ElastiCache Redis and S3.

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