What is an LGL merge field and how is it used?

In this article:


What is an LGL merge field?

An LGL merge field is a placeholder for a specific value from your database. 

How is an LGL merge field used?

Merge fields are used in LGL letter or acknowledgment templates in place of such data values as date, salutation, and gift amount.

Your completed letter template is added to your mailing * as you are creating it, and the data you have identified using the merge fields is pulled in as the mailing is generated.

All LGL merge fields are listed in a PDF that you can open from your Mailings > Templates page:

The Merge Field Reference contains all available LGL merge fields. No matter which merge field you use, you need to make sure that it matches what is shown in the Merge Field Reference character for character. If it doesn’t match, the data will not be pulled into your letter because LGL will not recognize the field name.

* Merge fields are available elsewhere in LGL, for example, in LGL emails, but using them in that case involves clicking on the merge field to add it to your email content. In that scenario, the merge field works in the same way, by pulling specific data from your constituent or gift records into the email.

Basic tips for using LGL merge fields

1) Make sure you are using square brackets, not angled ones:

Square brackets (use this type of bracket)

[[address_block]]

Angled brackets (DO NOT use this type of bracket)

<<address_block>>

2) Whenever you type merge fields into a Microsoft Word document template, make sure you type them exactly as they appear in the Merge Field Reference (this includes using lowercase letters, using square rather than angled brackets, not using any capitalized letters, etc). If possible, copy the merge fields directly from the Merge Field Reference, making sure to include all characters and all brackets, into your letter or email template.

Custom LGL merge fields

In addition to the LGL merge fields included in your Merge Field Reference, it is also possible to use a number of custom merge fields derived from custom fields in an LGL appeal or in an LGL event, as well as from LGL relationship types.

Custom LGL merge fields for an appeal

As long as your LGL mailing, acknowledgment (the gift you are acknowledging needs to be tied to the appeal), or email is connected to the appeal where your custom category or attribute exists, you'll be able to use LGL merge fields to include data from custom appeal fields. 

You can use this syntax for a custom LGL merge field using a custom category or a custom attribute from an appeal:

[[appeal.Name of Field]]

For example, if your appeal category is “Bidding code”, the custom merge field would look like this:

[[appeal.Bidding code]]

NOTE: The name of the custom appeal category or attribute, when added to the LGL merge field, must match the name of the custom category or attribute in your LGL appeal character for character.

Custom LGL merge fields for an event

As long as your LGL mailing, acknowledgment (the gift you are acknowledging needs to be tied to the event), or email is connected to the event where your custom category or attribute exists, you'll be able to use LGL merge fields to include data from custom event fields. 

You can use this syntax for a custom LGL merge field using a custom category or a custom attribute from an event:

[[invitation.Name of Field]]

If, for example, you've created a category or attribute named “Meal Type”, the format would be:

[invitation.Meal Type]]

NOTE: The name of the custom event category or attribute when added to the LGL merge field must match the name of the custom category or attribute in your LGL event character for character

Custom "relationship"-type LGL merge fields

These four "relationship"-type merge fields are available to use in LGL mailings, acknowledgments, or emails:

[[relations.relationship-type.birthdate]]

[[relations.relationship-type.first_name]]

[[relations.relationship-type.names]]

[[relations.relationship-type.org_name]]

...where “relationship-type” is the name of the relationship, such as child, spouse, employee, and so on.

NOTE: 

  • The name of the relationship type, when added to the LGL merge field, must be in all lowercase letters, regardless of the way it has been saved in LGL. 
  • If the name of the relationship type contains multiple words, such as "significant other", the space between the words must be preserved. 

Example of how to set up the custom merge fields

Constituent A is a sponsor, and Constituent B has a relationship of "Sponsoree" to Constituent A.

In a letter to constituent A, you could use this text:

************

As a reminder, [[relations.sponsoree.first_name]] has a birthday coming up on [[relations.sponsoree.birthdate]].

************

This example:

0457528884adf2069f16d3039ebd9d94.png

...merges to become this letter text:

459674485712b8f2a6e8aaa7a53baf87.png

Where to access tribute-specific LGL merge fields

To access tribute-specific LGL merge fields, go to Fundraising > Tributes > Notification Templates, and click the "Merge Field Reference" button, as shown here: