renderingconditional-statementsexacttarget

Conditional rendering in exacttarget


Does anyone know if it is possible to execute conditional statements in Exacttarget?

For example, if x variable === y, render image 1.

if x variable === z, render image 2.

This is fairly out there and the docs doesn't cover it, so I'm just crossing my fingers here


Solution

  • It is, its called Ampscript. You can do all your basic rules and lookups with this. doc link

    %%[IF expression1 <comparison operator> expression2 THEN]%%
        [wrapped script or email content]
    %%[ELSEIF expression1 <comparison operator> expression3 THEN]%%
        [wrapped script or email content]
    %%[ELSE]%%
        [wrapped script or email content]
    %%[ENDIF]%%