Skip to main content

Customizing Addressing Based on if you know the First Name

Alexander Lagger avatar
Written by Alexander Lagger
Updated over 10 months ago

At CamBuildr, we understand the importance of personalizing messages to make them more engaging for you. When writing emails or messages, it's crucial to address users appropriately, depending on their gender and whether a first name is available. Here's a simple formula you can use:

{% if var:firstname:false %}
Hello {{var:firstname}},
{% else %}
Hello,
{% endif %}

Explanation of the formula:

  • {% if var:firstname:false %}: This condition checks if a first name is available. If a first name is provided, the greeting "Dear" followed by the first name is used. ​

  • {% else %}: If a first name is not available, a general greeting "Hello" is used without addressing anyone specifically.

To save you from having to enter this formula every time, we would recommend either embedding it in your templates or creating it as a separate row and saving the row

Then you can easily find and reuse this row under "Rows" -> "Saved Rows".

Did this answer your question?