Does anybody know why this isn’t working in an email template? This is for the “Hi xxxx” part. If the contact is selected as the recipient in the pop-up email, then use the contact first name/id. Otherwise, if the customer is selected, use the company name. It generally works except for customer.companyname part. It’s always blank.
<#if contact.firstName?has_content>${contact.firstName}<#elseif contact.entityid?has_content>${contact.entityid}#else${customer.companyname}</#if>
What’s interesting is that the ${customer.companyname} works on its own but in that if else statement, it does not.