Formulas such as {!If(xxxxx)} cannot be used for merge fields. Create a formula field in Salesforce and set the formula field as a merge field.
Merge Field
Formulas such as {!If(xxxxx)} cannot be used for merge fields. Create a formula field in Salesforce and set the formula field as a merge field.