What is an LGL Merge Field and how it is used?
In this article:
- What is an LGL Merge Field?
- How is an LGL Merge Field used?
- Basic tips for using LGL Merge Fields
- Custom LGL Merge Fields
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)
Angled brackets (DO NOT use this type of bracket)
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 Fields 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 event 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:
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:
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:
...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.
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]].
...merges to become this letter text: