Contacts have an 'email greeting' field which can be customised on a per-contact basis, and takes its default from a pattern like Dear {contact.first_name} docs link

Is it possible to enter a pattern that will show "Supporter" if there is no first name?

2 Answers 2


You can use Smarty conditionals in greetings in CiviCRM 4.5+.

So the correct pattern would be:

{capture assign=first_name}{contact.first_name}{/capture}Dear {$first_name|default:Supporter},
  • This is a good answer as it does not require any PHP coding or installing extensions. Commented Feb 28, 2019 at 17:51

I don't think you can do just by configuring that pattern, but you could write your own token.

  • Thanks @Aidan I made this (which one day would be good to merge with the Fancy Tokens extension) Commented Feb 28, 2019 at 17:51
  • 1
    That's a nice bit of work! @artfulrobot
    – Aidan
    Commented Feb 28, 2019 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.