# if statement in emails

**URL:** <https://community.hubspot.com/t/if-statement-in-emails/96286>\
**Category:** CMS Development\
**Tags:** enterprise\
**Created:** [December 18, 2023, 7:43am UTC](https://community.hubspot.com/t/if-statement-in-emails/96286 "2023-12-18T07:43:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stavros\_gr](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stavros_gr/32/200906_2.png) [@stavros\_gr](https://community.hubspot.com/u/stavros_gr)\
**Post date:** [December 18, 2023, 7:43am UTC](https://community.hubspot.com/t/if-statement-in-emails/96286/1 "2023-12-18T07:43:05Z")

</div>

Hello,  
Im trying to achieve something very simple, but it all depends on the value of the custom property called kyc\_verified which holds either a “Yes” or “No”  
{% set kyc = contact.kyc\_verified|trim %}  
{% set yes = “Yes”|trim %}  
Dear {% if kyc == yes %} {{ contact.firstname }} {% else %} Customer {% endif %}

This should work in the test module i created but its not.

The condition kyc == yes doesnt evaluate to true.

If i replace the kyc with “Yes” it does.

if i use {{ contact.kyc\_verified }} outside of the if statement it shows the value but not in the if statement.  
Can you please advise what i can do to achieve this?  
Regards,  
Stav

 ![Screenshot 2023-12-18 094044.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/4/d4c819030969b25c31ff6701aafe5890789ae62e.png)

 ![Screenshot 2023-12-18 094213.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/9/b9dc72ab1fd8f002201c5c250956e726db69dfef.png)

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [December 19, 2023, 11:47pm UTC](https://community.hubspot.com/t/if-statement-in-emails/96286/2 "2023-12-19T23:47:55Z")

</div>

Hi, [@stavros\_gr](https://community.hubspot.com/t5/user/viewprofilepage/user-id/679183) 👋 One question, have you tried adding your module to an email and then testing it using a contact-specific test or preview? If so, please let us know, and we’ll try adding a few community members to the conversation.

Best,

Jaycee
