Why Courier Elemental?
Courier Elemental provides a modern, programmatic approach to building notification templates that works seamlessly across all channels. Unlike standard templates that require separate content definitions for each channel, Elemental lets you define your notification structure once and customize it per channel, locale, or user context.Elemental vs Standard Templates
| Standard Templates | Courier Elemental | |
|---|---|---|
| Format | Block-based | JSON-based |
| Cross-Channel | Separate content per channel | Single structure, channel-adaptive |
| Localization | Manual per channel | Built-in locale system |
| Conditional Logic | Limited | Full support (if, loop, ref) |
| Programmatic | Dashboard/API only | JSON structure, easy to generate |
| Version Control | Template-level | Element-level structure |
| Complex Layouts | Limited | Columns, groups, nested structures |
| Best For | Simple, static notifications | Dynamic, multi-channel, localized |
Most existing templates use the standard template format. New templates created with Courier Create or Courier Design Studio 2.0 use Elemental format. You can use both formats in the same workspace.
Elemental Capabilities
Courier Elemental provides powerful features for building sophisticated, adaptive notifications. Here’s a quick overview of the main capabilities:Localization
Automatically serve content in your users’ preferred language using Elemental’s built-in locale system. Define translations once and Courier handles the rest based on the recipient’s locale.Learn more about localization in the Locales documentation.
Channel-Specific Customization
Customize your notification content for different channels using channel elements or thechannels property. Send detailed emails and concise SMS from the same template structure.
Using channel elements:
channels property:
Learn more about channel customization in the Control Flow documentation.
Dynamic Logic
Use conditional rendering, loops, and element references to create notifications that adapt to your data and user context. Conditional rendering withif:
loop:
ref:
Learn more about dynamic logic in the Control Flow documentation.
Where Elemental is Used
Courier Elemental is the modern template format used across Courier’s platform:- Courier Create: The embeddable designer component uses Elemental format for all templates
- Courier Design Studio 2.0: The new template designer in Courier Studio creates templates in Elemental format
- Send API: You can send notifications using Elemental format directly via the Send API
- Template API: Elemental templates can be created, updated, and managed via the Templates API
Construct an Elemental Template
All Courier Elemental templates have the following top level structure. When used in API calls, this structure is passed as thecontent property of the message object:
message.content:
Required Fields
Specifies the Elemental format version. The only supported value at this time is
"2022-01-01"Array of Courier Elements. See the Elements Index for a complete reference of all available element types.
The
version field specifies the Elemental format version. This version identifier ensures compatibility and allows for future format evolution while maintaining backward compatibility.Understanding Elemental Structure
Elemental templates use a tree-like structure where elements can contain other elements. Theelements array is the root container, and many element types support nested elements arrays of their own.
Element Nesting
Elements can be nested within other elements to create complex, hierarchical structures: Container elements that support nesting:group- Groups elements together for conditional logic or loopschannel- Contains channel-specific element collectionscolumns- Containscolumnelements, which in turn contain their own elementslist- Containslist-itemelements, which can contain text content or nested lists
- The root
elementsarray contains achannelelement - The
channelelement contains its ownelementsarray withmetaandgroupelements - The
groupelement contains acolumnselement - The
columnselement containscolumnelements - Each
columncontains its ownelementsarray withimageandtextelements
Tree Structure Benefits
This hierarchical structure enables:- Logical grouping: Related elements can be grouped together
- Conditional rendering: Entire groups can be shown or hidden based on conditions
- Reusable patterns: Common element combinations can be encapsulated in groups
- Channel customization: Different branches of the tree can target different channels
- Complex layouts: Nested structures enable sophisticated multi-column and grid layouts
For a complete reference of all available element types and their properties, see the Elements Index.
Two Ways to Use Elemental
Courier Elemental offers two formats to suit different needs: ElementalContentSugar for simple notifications and full Elemental for advanced use cases.ElementalContentSugar (Simplified Format)
ElementalContentSugar provides a fast shorthand for basic notifications. Instead of defining a full element structure with the requiredversion and elements fields outlined above, you can simply use title and body fields—those required fields aren’t needed in the sugar format.
- Simple notifications with just a title and body
- Quick inline prototyping and testing
- Basic welcome emails, confirmations, or alerts
- When you don’t need advanced features like conditionals, loops, or complex layouts
ElementalContentSugar is automatically converted to full Elemental format by Courier’s backend. The
title becomes a meta element, and body becomes a text element.Full Elemental Format
Full Elemental format gives you complete control over your notification structure with support for all element types, conditional logic, loops, and complex layouts. When to use full Elemental:- Multi-channel notifications with channel-specific customization
- Complex layouts with columns, groups, or nested structures
- Dynamic content with conditionals (
if), loops (loop), or references (ref) - Localized content with locale-specific translations
- Advanced styling and customization needs
Use Cases
Multi-Channel Order Confirmation
Send order confirmations that adapt to each channel—detailed email with product images and order summary, concise SMS with tracking number, and push notification with order status.Localized Welcome Messages
Welcome new users in their preferred language with automatic locale detection.Dynamic Product Lists
Display product recommendations that adapt based on user preferences and inventory.Related Documentation
Elements
Complete reference for all Elemental element types, including text, image, action, channel, and more.
Control Flow
Learn how to use conditionals (
if), loops (loop), references (ref), and channel filtering.Locales
Guide to localizing your Elemental templates for multiple languages and regions.
Export to Elemental
Convert Designer-built notifications into Courier Elemental JSON format.