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?


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), "!")




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.