Customizing Your Messages

Last updated: November 25, 2025

Beginner

Note - Switchboard custom fields are built using Jinja templating! If you ask Chat GPT to help you with “Jinja templating” that is really useful for troubleshooting 🙂

Using Custom Fields

  • Use the format {{ custom_field }} to dynamically insert custom fields.

  • See here for the list of reusable fields available to use in message customization.

Using Conditional Statements

You can also use if statements. For example:

  • Can you chip in {% if previous_donation and previous_donation > 20 %}$20{% else %}$5{% endif %} today?

  • Hi {% if first_name %}{{ first_name }}{% else %}friend{% endif %}!

Note: if you want to check if a custom field has an exact value, use == (two equals signs) instead of just one. For example:

  • Thanks for being a {% if total_donations == 1 %}one-time{% else %}repeat{% endif %} donor!

You can also use or statements if you just want to have a backup option for a blank field, or if you're combining two lists with differently named custom fields. For example:

  • {{sb_first_name or 'friend'}} will show sb_first_name if it's present, or the word friend if it isn't.

  • {{sb_first_name or firstname or 'friend'}} will try sb_first_name first, then try firstname, then use friend as a last resort if both are missing.

🚩 Using Math Operations (like <, >, +, )

If you are using a custom and/or reusable field that does NOT have 100% coverage over your list, some of these more complex statements may fail. If you are using any field in a math operation (like <, >, *) you will need to make sure the value exists. For example:

${% if sb_max_amount_donated %}{{ (sb_max_amount_donated * 0.75) | sb_money}}{% else %}5{% endif %}

{% if sb_max_amount_donated %} - this part checks to make sure there is real value for the field sb_max_amount_donated, otherwise it will use the "else" section (in this case 5). If you were to not include the "if" part, when we try to render the message for a phone number with a missing sb_max_amount_donated, the * part would cause the message to fail.

How do I check coverage of fields in my list? When drafting your message, under “custom fields available” you can see coverage ratios like this:

Formatting names

If you'd like to make sure fields are formatted with proper capitalization, use the keyword title.

  • Hello {{sb_first_name | title}}

This will turn sb_first_name values like jane or JANE or JaNe all into Jane.

Formatting Money

If you'd like to display a money amount, you can use the keyword sb_money to make sure the number is formatted properly. If the field is a full dollar amount, we will not include the .00. So 100.5 becomes 100.50, but 100.00 becomes 100. For example, for the custom field previous_amount, you can write:

  • Can you chip in ${{ previous_amount | sb_money }} today?

Bolding and Italicizing Fields

You can now bold and italicize your fields by adding | bold }} or | italics }} to the end of your field.

  • 𝗖𝗮𝗻 𝘄𝗲 𝗰𝗼𝘂𝗻𝘁 𝗼𝗻 𝘆𝗼𝘂 𝘁𝗼 𝗰𝗵𝗶𝗽 𝗶𝗻 {{ sb_first_name | bold}}?

  • 𝘊𝘢𝘯 𝘸𝘦 𝘤𝘰𝘶𝘯𝘵 𝘰𝘯 𝘺𝘰𝘶 𝘵𝘰 𝘤𝘩𝘪𝘱 𝘪𝘯 {{ sb_first_name | italic }}?

Note: You can bold numbers (0-9) but you cannot italicize or bold italicize numbers.

Other Fields You Can Use

We make the following generic variables available in templates for convenience.

  • {{ sb_month }} - Shows the current month (in Hawaii Standard Time). ex: July

  • {{ sb_weekday }} - Shows the current weekday (in Hawaii Standard Time). ex: Wednesday

  • {{ sb_day }} - Shows the current day of the month (in Hawaii Standard Time). ex: 29

  • {{ sb_year }} - Shows the current year (in Hawaii Standard Time). ex: 2024