We want to send emails within an automation that appears to come from one of our sales managers. Each manager is designated as an owner in the contact’s record. I want to create a Message variable that displays the right signature based on the value of the owner field from the contact record.
To illustrate:
%IF $owner == ‘Bob’%
Show Bob’s signature
%IF $owner – ‘Jane’%
show Jane’s signature
%IF $owner – ‘Bill’%
show Bill’s signature
%ELSE%
Company name
%/IF%
(That doesn’t work)
Is it possible to have multiple “If” clauses within a single IF/ELSE? If so, what is the syntax?
You can nest the IF Else’s, like so:
%IF $owner == ‘Bob’%
Show Bob’s signature
%ELSE%
%IF $owner – ‘Jane’%
show Jane’s signature
%ELSE%
%IF $owner – ‘Bill’%
show Bill’s signature
%ELSE%
Company name
%/IF%
%/IF%
%/IF%
1 Like
Did this actually work for anyone?
Yep, worked for me.
I recently used something like
%IF $SALUTATION_FIELD == 'Mrs'%
Dear %SALUTATION_FIELD% %LASTNAME%,
%ELSE%
%IF $SALUTATION_FIELD == 'Mr'%
Dear %SALUTATION_FIELD% %LASTNAME%,
%ELSE%
Dear reader,
%/IF%
%/IF%
There seems to be no documentation available regarding those if/else statements and their syntax. However, the easiest way to create those is by creating a custom variable and use the ‘personalization’ button there.