1

We are adding personalization to our subject lines in SFMC. This is currently the code we use to pull their first name into the subject line:

%%[ set @billingFirstName = ProperCase([billingFirstName]) ]%% %%=v(@billingFirstName)=%%

How can I set a default value if there isn't a billingFirstName in our data?

1 Answer 1

1

I'd recommend adding this AMPscript in the body of your email (or better in an init code-resource template slot) and then referring to the variable in the subject line:

%%[

set @billingFirstName = AttributeValue("billingFirstName") 
set @subject = "Welcome to the Club!" /* default subject */

/* personlize SL if billing name exists */
if not empty(@billingFirstName) then
  set @subject = concat("Welcome to the Club, ", properCase(@billingFirstName), "!")
endif

]%%

Subject:

%%=v(@subject)=%%

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .