Text Blocks
A detailed look at Text Block functionality, use cases and best practices.
Working With Text Blocks
Availability: All channels
Text Block Options
- Variables: In every channel and integration, customized text can be inserted with variables.
- Background Color: Sets the background color behind the text.
- Insert Bulleted List: Use this option for static bulleted lists. See list blocks for dynamic list content.
- Hyperlink: You have the option to hyperlink text in a Text Block in every channel.
Hide or Show Text With Inline Conditions
Conditional text lets you show or hide text within any Text Block in any channel. Using filters that show or hide the text in-line based on data from the data or profile objects sent with the Send API call.
A typical use case for inline text conditions is creating a fallback greeting when you don't have a user's name.
- Highlight the
profile.name
variable in your template and create a condition to hide it when the name property is empty. - Highlight your fallback text,
there
for example, and set a condition to show whenprofile.name
property is empty so your sentences renders asHi there,
instead ofHi {profile.name},
Cross-Channel Formatting Behaviors
Courier automatically adjusts any text formating to align with the channel and integration limitations when you drag text blocks in from the shared content library.
Email
- Text blocks in email offer options such as inline images, bulleted lists, header text (H1, H2), subtext, text color, and text alignment that are not available in other channels such as SMS, push, or Slack.
- You can also insert images inline:
- Highlight Text:
- Add a static bulleted list (for dynamic lists that pull from an array, see list blocks):
Direct Message
- Bold and Italic formatting is available in certain direct message text blocks.
SMS
- SMS does not allow text formatting, so any formatted text using bold, italics, headers, subtext, background-colors or alignment will revert to plain text.
- Formatted anchor links become URL hyperlinks when pulled into an SMS from the shared library.
Hide Text Blocks With Conditions
It is possible to hide a Text Block or any other type of block using conditional filters. When the User Profile data matches the filter rules, the block will be hidden.