How to get an alternative text if the firstName
of the recipient is not captured in the subject line of the Dynamic code?
For example:
Subject: <` %= recipient.firstName %`>
, please check our offer.
In case the firstName
is filled, it will return: recipient.firstName, please check our offer.
In case the firstName
is empty (Not filled), it will return: Hey, please check our offer.
You can use the below conditional content in the subject of the delivery:
<` % if ( recipient.firstName != '' ) { %`>` `<` %= recipient.firstName %`>` , please check our offer. `<` % } else { %`>` Hey, please check our offer. `<` % } %`>
When the firstName
is filled, it will return:
recipient.firstName, please check our offer.
else
When the firstName
is empty (Not filled), it will return:
Hey, please check our offer.