SYSTOPIA Extension of the Month #4: More Greetings

Published
2024-04-24 01:03
Written by

At SYSTOPIA, we have developed a large set of CiviCRM extensions, Drupal modules and other tools over the years. Currently, we are actively maintaining or co-maintaining over 60 repositories. Unfortunately, sharing knowledge about all the goodness with the community has notoriously fallen short. With this series of blog posts, we want to change that a little. Thanks for reading on!

What is this extension about?

Out of the box, CiviCRM automatically generates greetings for each contact based on the associated contact name fields for email or postal address. Different formats can be selected for each contact and there is also an option to enter individual greetings by hand.

More Greetings extends the possibilities around this topic in CiviCRM considerably: With the help of this extension the number of possible greeting fields can be significantly increased up to nine.

You can, of course, assign a meaningful nice individual name to these new greeting fields as you wish and define and specify your own rules or formulas. The extension provides a user-friendly runner to apply your logic to all contacts.

The underlying fields are larger than the core fields for greeting logic allowing you to define very complex and hence long logic. In other languages than English, and considering gender, titles etc., it is quite possible that a greeting logic exceeds the size of the core field.

For instance, if you want to generate a greeting field that takes into account the associated contact type (household, organization or individual) of the respective contact, simply integrate a check condition in your formula and then define the logic according to your needs: The desired greeting form field will be generated automatically later on for all your contacts.

How do you use it?

Once installed, you can enter the number of the desired new greeting fields and in the next step define your own formulas.

However, you still need to write your logic in Smarty syntax (which you will likely already have encountered as a CiviCRM user). Smarty is a template language that is relatively easy to understand and flexible. It allows you to use variables, comments, conditions, functions etc. in your own formulas.

Have a look at this: Example of a user-defined greeting field created with Smarty

You will find an illustrative, simple and well-documented example of how to define a new field with More Greetings and Smarty. 

More Greetings fields

Who is it for?

Communication professionals are often looking for additional options to personalize their greetings with a more complex logic to target their messages to specific audiences or to adapt to special linguistic requirements. The automatic creation of individual greeting formulas makes their work much easier and saves them a lot of time, as it automates the process of inserting the appropriate greeting formula for each contact for a large number of contacts.

A little hack on the side...

The greeting formula fields can not only be used in connection with greeting formulas. You can apply data logic with all data fields in CiviCRM with this technique. This allows you to create new custom fields based on existing data and new field tokens to be used in mailings or documents.

Any last words?

If you are interested in tools to enhance CiviCRM’s communication capabilities, this is not the only SYSTOPIA extension worth looking at. As extensions of the month, we already presented CiviOffice and Custom Event Communication so be sure to read up on those if you haven’t already.

Last but not least: This is free software, and it's hard and often unpaid work to develop and maintain it. If you find it useful, please consider making a financial contribution. You can reach us at info@systopia.de.

Thanks for reading. Feel free to get in touch with us for any questions or feedback.

Links

Filed under