ActiveCampaign Forum

Conditional First Name tag use with if/else


#1

Hello!

Now, my %FIRSTNAME% is defaulting to “Hey” if the first name value is blank.
Any kind of default value creates limitations when it comes to creating personalized subject lines and message starts.
What I’m trying to do is super simple:

  1. Create IF/ELSE conditional personalization in the subject line that will check if the First Name field is blank and then put in a blank value (not the default for the tag)
  2. Create two conditional text blocks in the message, one of which is only used when the First Name value is blank and another when it is not.

So far, I’ve only managed to break the entire email by trying {blank} (Test sends “Your content could not be processed”, and the Spam filter processes forever).

The only topic that I have managed to find on this is:

Am I missing something obvious? Is there a way to do this at all?


Bulk Conditions: Is it better to have a lot of small conditions or a few large conditions?
#2

I haven’t tested, but this is what I found on forum:

%IF $FIRSTNAME != ‘’%
Hi %FIRSTNAME%,
%ELSE%
Hi,
%/IF%


#3

Hi @bungalowsoftware,

Let me know if my previous response to your other questions clears everything up. If not, we will work on getting a better solution for you.

Perry


#4

I tested this and it doesn’t produce the desired result. It just returns “Hi Hey” :frowning: (“Hey” is my default)

Any other ideas?


#5

Hi @webfriendly,

I have seen “Hi There, Hi Friend, Hey There, Hey You” and others used as default values. Hope that helps!

Perry


#6

Can you show your exact %expression% ?


#7

Just exactly what you posted:

%IF $FIRSTNAME != ‘’%Hi %FIRSTNAME%,%ELSE%Hi,%/IF%


#8

There is a simpler solution here: https://ideas.activecampaign.com/ideas/AC-I-10971