Snippets are reusable building blocks that enable modern and scalable content management in Iterable.
Snippets make it easier to create consistent, personalized experiences for your users with these key benefits:
Centralized updates — Edit a snippet once, and every template that references it picks up the change automatically. This is especially useful for content that appears in many templates, like a company-wide email footer.
Consistent messaging — Because all templates reference the same snippet, your content stays uniform across campaigns and journeys.
Modular design — Break complex templates into smaller, manageable pieces. Different team members can own different snippets, making collaboration easier.
Snippets are ideal for content that appears across many templates and needs to stay consistent, such as:
- Email headers and footers
- Promotional banners and CTAs
- Complex Handlebars logic blocks
- Standardized disclaimers or legal text
- Dynamic content that needs to be personalized for each user
# In this article
# How snippets work
Snippets are reusable content blocks that you can add to your templates. Snippets can contain a variety of content including HTML, CSS, Handlebars, and plain text.
To include a snippet in a template, add a snippet expression (a short Handlebars expression) to the template's content. Iterable generates this expression for you when you create the snippet, but you can also modify it to pass variables, include data feed fields, or add conditional logic.
When a template includes a snippet, Iterable inserts the snippet's content at send time. This allows for dynamic, personalized content that's consistent across all templates that reference the snippet.
When you update a snippet, every template that references it reflects the change automatically, so you won't need to manually update each template or pause active campaigns for minor content changes.
# Terms to know
# Snippet name
A unique identifier for a snippet, used to reference it in templates. Snippet names are internal to your organization and won't be visible to your users.
To learn more about snippet names and character requirements, read Creating and Managing Snippets.
# Snippet content
All snippets contain a body of content that gets inserted into any template that references the snippet. This content can be HTML, CSS, Handlebars, and/or plain text. For details about what content types snippets support, read Creating and Managing Snippets.
# Snippet variables
Dynamic fields defined in a snippet that allow individual templates to customize the snippet's output. For example, a snippet might define a variable to pass a user profile field to the snippet, letting each user see personalized content.
Snippet variables behave as positional parameters by default, but you can also use named parameters. To learn more, read Customizing Snippets with Variables.
# Snippet expression
A Handlebars expression that references a snippet by name, so it is inserted into the template at send time. Iterable generates a basic snippet expression when you create a snippet, but you may need to modify it depending on your use case—for example, to pass variable values, include data feed fields, or add conditional logic.
To learn how to build and customize snippet expressions, read Adding a Snippet to a Template and Customizing Snippets with Variables.
You can also nest snippet expressions with other Handlebars expressions, like conditional logic or loops. To learn more about building dynamic content with Handlebars, see Handlebars Overview.
# Getting started
To start working with snippets, go to Content > Snippets. From this page, you can create new snippets, edit existing ones, and manage your snippet library.
For step-by-step instructions, check out these articles:
- Creating and Managing Snippets
- Adding a Snippet to a Template
- Customizing Snippets with Variables
- Using Data Feeds in Snippets
- Tutorial: Create Your First Snippet
- See Where Snippets Are Used
# Want to learn more?
For more information about some of the topics in this article, check out this Iterable Academy course. Iterable Academy is open to everyone — you don't need to be an Iterable customer!