0

I have a subject line that takes a bonus offer, adds it to the current balance, then displays the sum. Everything worked in testing, everything previewed right when viewing in Send Wizard when using prod data, but when we sent, neither the current account balance variable nor the summed amount, rendered. Not sure why. Below is the code.

%%[
    if @Version == 'V1' then 
        set @Subjectline = Concat('',@FirstName,', open ASAP for a 20,000 bonus points offer.') 
    else then 
        set @Subjectline = Concat('Take your balance from ',@AccountBalance,' to ',@sum_formatted,' with ',@num1,' bonus points') 
    endif

    set @num1 = '20,000'
    set @sum  = Add(@num1, @AccountBalance)
    set @sum_formatted = FormatNumber(@sum, "N0", "en-US")
]%%

1 Answer 1

0

You are declaring variables making the Subjectline variable after itself. I doubt if it can render properly in the preview mode.

Try something like this:

%%[
    set @num1 = 20000
    set @sum  = Add(@num1, @AccountBalance)
    set @sum_formatted = FormatNumber(@sum, "N0", "en-US")

    if @Version == 'V1' then 
        set @Subjectline = Concat('',@FirstName,', open ASAP for a 20,000 bonus points offer.') 
    else 
        set @Subjectline = Concat('Take your balance from ',@AccountBalance,' to ',@sum_formatted,' with ',@num1,' bonus points')
    endif
]%%
4
  • It did render correctly, I have screenshots of it looking right.
    – PForsyth
    Sep 22, 2023 at 13:33
  • @PForsyth have you tried my suggestion above yet?
    – Duc Le
    Sep 22, 2023 at 13:40
  • yes that approach made it render correctly in prod. I still don't understand why the testing and prod preview functionality showed it correctly then the actual prod send it did not. Seems to defeat the purpose of testing and previewing.
    – PForsyth
    Sep 22, 2023 at 14:37
  • @PForsyth I am glad this solved the issue. If you find the answer helpful, kindly mark it as an accepted answer. Thanks
    – Duc Le
    Sep 22, 2023 at 14:49

You must log in to answer this question.

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