What is conditional mailer content and how do I use it?

The BSD Mailing module has the ability to send out mailings with conditional content, which will give recipients different text based on the logic written in a template. The templating language this is based on is called Twig

You can learn more about its functionalities by reading the language documentation. BSD is currently using Twig version 1.16.1

The kinds of features supported by the Twig templating language include:

  • Variables (replacement of placeholder text with corresponding value per constituent). e.g. {{ cons.name }}
  • Conditionals (if/else) e.g. {% if cons.name == "Barack Obama" %} Dear Mr. President {%endif%}
  • Loops (for example, looping through a list of the constituents' US representatives)
  • Text manipulation (upper-case text, lower-case text, round a number, etc). e.g. {{ hpc_raw | round }} would display the rounded highest previous contribution for a donor. 
  • Comments (that will be removed from the body of the email before sending). e.g. {# This won't appear in the email #}

You can read more about it from our new BSD Twig documentation site, which contains a full list of the supported tags, example usages, and some basic explainations of how to use the Twig language in your mailings for personalization and segmentation: http://bsd.readme.io/v1.0/docs/

You can also watch an hour-long training we did on Twig and various implementations here.

 

Didn't find the answer you were looking for?

Email us at help@bluestatedigital.com