SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Add Dynamic Content in Marketing Campaigns Templates

Objective

Twilio SendGrid Marketing Campaigns allow you to add dynamic content to your templates. 

 

Product

Twilio SendGrid Email 

 

Procedure

This is achieved using greaterThan with else and length helpers. These allow you to iterate through a string or array. Here's some example code of what this might look like:

<p>{{#greaterThan (length newsletter_items) 0}}
It looks like you still have some items in your cart. Sign back in to continue checking out.
{{else}}
Thanks for browsing our site. Come back and see us soon.
{{/greaterThan}}</p>

 

Additional Information 

For full details, see our doc Adding Dynamic Content with Handlebars in Marketing Campaigns.

Have more questions? Submit a request
Powered by Zendesk