{"id":29324,"date":"2026-03-13T17:51:36","date_gmt":"2026-03-13T15:51:36","guid":{"rendered":"https:\/\/aivie.ch\/faq\/how-can-i-create-a-personalized-greeting-based-on-gender-in-aivie\/"},"modified":"2026-03-13T17:51:37","modified_gmt":"2026-03-13T15:51:37","slug":"how-can-i-create-a-personalized-greeting-based-on-gender-in-aivie","status":"publish","type":"faq","link":"https:\/\/aivie.ch\/en\/faq\/how-can-i-create-a-personalized-greeting-based-on-gender-in-aivie\/","title":{"rendered":"How can I create a personalized greeting based on gender in Aivie?"},"content":{"rendered":"\n<p>You can implement a personalized greeting based on gender in Aivie using <strong>Dynamic Content<\/strong>. This evaluates the <em>Gender<\/em> contact field and displays a suitable greeting depending on the value.  <\/p>\n\n<!--more-->\n\n<h2 class=\"wp-block-heading\">Create a personalized greeting based on gender<\/h2>\n\n<p>By default, Aivie has a <strong>Gender<\/strong> contact field. This field contains the values <strong>Female<\/strong>, <strong>Male<\/strong>, or <strong>Diverse<\/strong>. These values can be adjusted in the <strong>custom fields<\/strong> if necessary.  <\/p>\n\n<p><strong>Dynamic Content<\/strong> is used to generate a personalized greeting from this.<\/p>\n\n<h2 class=\"wp-block-heading\">Step 1: Create dynamic content<\/h2>\n\n<ol class=\"wp-block-list\">\n<li>Go to <strong>Dynamic Content<\/strong>.<\/li>\n\n\n\n<li>Create a new entry, for example with the name <strong>Greeting<\/strong>.<\/li>\n\n\n\n<li>Activate <strong>Code Mode<\/strong>.<\/li>\n\n\n\n<li>Insert the following code:<\/li>\n<\/ol>\n\n<pre class=\"wp-block-preformatted\">{% if contactfield.gender == 'Female' %}<br\/> Dear Ms. {{contactfield.lastname}}<br\/>{% elseif contactfield.gender == 'Male' %}<br\/> Dear Mr. {{contactfield.lastname}}<br\/>{% else %}<br\/> Hello {{contactfield.firstname}}<br\/>{% endif %}<\/pre>\n\n<p>This code checks the value of the <strong>Gender<\/strong> contact field and outputs a suitable greeting accordingly.<\/p>\n\n<h2 class=\"wp-block-heading\">Step 2: Use Reusable Dynamic Content in emails<\/h2>\n\n<p>The created Dynamic Content can then be inserted into any email. Since it is <strong>Reusable Dynamic Content<\/strong>, the logic only needs to be created once. <\/p>\n\n<p>If you want to make changes to the greeting later, simply edit the Dynamic Content. All emails using it will be updated automatically. <\/p>\n\n<h2 class=\"wp-block-heading\">Politically correct address<\/h2>\n\n<p>In addition to <strong>Female<\/strong> and <strong>Male<\/strong>, the code also takes other or unset values into account. In these cases, a neutral greeting such as <strong>Hello First Name<\/strong> is used. This ensures communication remains respectful and inclusive.  <\/p>\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n<p>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. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.<\/p>\n","protected":false},"featured_media":0,"template":"","categories":[],"tags":[1637,113,1638],"FaqCategories":[281],"FaqTags":[312,497],"class_list":["post-29324","faq","type-faq","status-publish","hentry","tag-dynamic-content","tag-e-mail","tag-personalization","FaqCategories-emails","FaqTags-dynamic-contents","FaqTags-emails-en"],"acf":[],"featured_image_urls_v2":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","post-thumbnail":"","aiv_480w":"","woocommerce_thumbnail":"","woocommerce_single":"","woocommerce_gallery_thumbnail":""},"post_excerpt_stackable_v2":"<p>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&hellip;<\/p>\n","category_list_v2":"Uncategorized","author_info_v2":{"name":"","url":""},"comments_num_v2":"0 comments","_links":{"self":[{"href":"https:\/\/aivie.ch\/en\/wp-json\/wp\/v2\/faq\/29324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aivie.ch\/en\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/aivie.ch\/en\/wp-json\/wp\/v2\/types\/faq"}],"version-history":[{"count":1,"href":"https:\/\/aivie.ch\/en\/wp-json\/wp\/v2\/faq\/29324\/revisions"}],"predecessor-version":[{"id":29325,"href":"https:\/\/aivie.ch\/en\/wp-json\/wp\/v2\/faq\/29324\/revisions\/29325"}],"wp:attachment":[{"href":"https:\/\/aivie.ch\/en\/wp-json\/wp\/v2\/media?parent=29324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aivie.ch\/en\/wp-json\/wp\/v2\/categories?post=29324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aivie.ch\/en\/wp-json\/wp\/v2\/tags?post=29324"},{"taxonomy":"FaqCategories","embeddable":true,"href":"https:\/\/aivie.ch\/en\/wp-json\/wp\/v2\/FaqCategories?post=29324"},{"taxonomy":"FaqTags","embeddable":true,"href":"https:\/\/aivie.ch\/en\/wp-json\/wp\/v2\/FaqTags?post=29324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}