I usually just put all of the AMPscript for subject lines in the subject line itself, but there are a metric ton of versions for this one I'm working on, so it's exceeding the 400 character limit when I go to send it.
So I'm trying to set the subject lines in the body of the email, but it's not working for me. SFMC isn't breaking the email, so the AMPscript has no errors, but it's not doing what I want.
I need the subject line to vary depending on the VERSION_CODE in the DE.
My subject line contains:
%%[v(@subjectline)]%%
And in the body of my email I have:
%%[var @vcode
Set @vcode = VERSION_CODE]%%
%%[
var @subjectline,
if (@vcode == "FEP_Truck_Private_Urban_EN") OR (@vcode == "FEP_Truck_Private_Rural_EN") OR (@vcode == "FEP_SUV_Private_Rural_EN") OR (@vcode == "FEP_SUV_Private_Urban_EN") then
set @subjectline = "OFFER 1"
elseif (@vcode == "FEP_Truck_NoOffer_Urban_EN") OR (@vcode == "FEP_Truck_NoOffer_Rural_EN") then
set @subjectline = "OFFER 2"
elseif (@vcode == "FEP_SUV_NoOffer_Urban_EN") OR (@vcode == "FEP_SUV_NoOffer_Rural_EN") then
set @subjectline = "OFFER 3"
elseif (@vcode == "FEP_Combo_PrivateEN") then
set @subjectline = "OFFER 4"
elseif (@vcode == "FEP_Combo_NoOfferEN") then
set @subjectline = "OFFER 5"
%%[endif]%%
Thanks!!