You can implement a personalized greeting based on gender in Aivie using Dynamic Content. This evaluates the Gender contact field and displays a suitable greeting depending on the value.
Create a personalized greeting based on gender
By default, Aivie has a Gender contact field. This field contains the values Female, Male, or Diverse. These values can be adjusted in the custom fields if necessary.
Dynamic Content is used to generate a personalized greeting from this.
Step 1: Create dynamic content
- Go to Dynamic Content.
- Create a new entry, for example with the name Greeting.
- Activate Code Mode.
- Insert the following code:
{% if contactfield.gender == 'Female' %}
Dear Ms. {{contactfield.lastname}}
{% elseif contactfield.gender == 'Male' %}
Dear Mr. {{contactfield.lastname}}
{% else %}
Hello {{contactfield.firstname}}
{% endif %}
This code checks the value of the Gender contact field and outputs a suitable greeting accordingly.
Step 2: Use Reusable Dynamic Content in emails
The created Dynamic Content can then be inserted into any email. Since it is Reusable Dynamic Content, the logic only needs to be created once.
If you want to make changes to the greeting later, simply edit the Dynamic Content. All emails using it will be updated automatically.
Politically correct address
In addition to Female and Male, the code also takes other or unset values into account. In these cases, a neutral greeting such as Hello First Name is used. This ensures communication remains respectful and inclusive.
Summary
With Dynamic Content, you can easily create a personalized greeting based on gender in Aivie. The logic is defined once centrally and can then be reused in any number of emails.

