Skip to main content
Solved

How can I bypass the default filter in a subject line?

  • 16 May 2023
  • 1 reply
  • 78 views

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

1 reply

Userlevel 7
Badge +60

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