Skip to main content

Is there a solution using conditional statements to bypass the use of “Guest” as a First Name when personalizing an email subject line?

Hi there @rbhancock

 

Welcome to the Community! Happy to help! 

 

If you don't include a default value word between the quotations, aka where you see the word ‘friend’ below and we don't have data to populate into the placeholder for a given recipient, the variable will just appear like a blank space and, as mentioned in our How to insert template tags and variables into text blocks documentation.

 {{ first_name|default:'friend' }}

 

However, if you want to ensure that no word for a default property is added, you can simply consolidate the first name code to {{ first_name }} . This code would prevent any other words, such as ‘guest’ or ‘friend’ from appearing as a default. I would bear in mind how the syntax of your subject line would look if a default word or phrase isn’t present to provide the best customer experience.

 

Thank you for participating in the Community!

-Taylor 


Reply