Include variables in emails and PDFs

Sunday, Aug 17, 2014

Similar to a mail merge you can address emails and PDF files to those included on documents. Within email or PDF templates the variables appear within square brackets eg. [Documents:DocumentContent46] or [CourseDates:PriceCurrent]

When editing an email you can access fields from two places, the HTML edit menus have the Field Picker and to the right there is a Fields button that opens a popup. The Field Picker allows selection of general topics and then specific fields, for one-off insertion. The field popup remains on the screen allowing the addition of many fields to an email.

Field picker in the HTML edit menu

Fields menu


Variables for the documents and other forms like status forms (on process steps) and option forms are defined using the fieldID eg. [Documents:DocumentContent46]. Variables for course dates are defined by their name eg. [CourseDates:PriceCurrent], as these are set and controlled internally.

use with caution to include the name of the email template (for troubleshooting purposes) use this

[Email:TemplateName], hide as white text if you wish to have this on emails but not to be noticed:

<div style='color: rgb(255, 255, 255);'>[Email:TemplateName]</div>

Login roles

While the login is determined by which is associated to the course master or course date Roles fields can be specified by variables. As the role then the variable for each needs to be specified there is an extra level of selection in the Field Picker; Record Type (Login), Record (Role) and Value (eg Title), the Fields button popup lists all roles and their associated values.

Extranet links are available in the Field Picker and the Fields popup when a published form is associated to a process step on a process path. In the Field Picker selecting Record Types Course date or Document and typing “Extra” will display all the extranet links. It is possible to add further variables to the end of the extranet links, eg to add “&css=ccl.css&js=ccl.js” to the end will ensure that the extranet link uses the CSS and JS of the files specified.

Section content

Additional content is included in Training Company licenses and above. Gives access to Course Descriptions, Terms, Format Descriptions, Promotion, Residential description, Topic and Venue gives up to 6 additional sections. Access via the Field Picker or Fields.

Cached fields

There are some fields that are assumed to change infrequently. Organisation data is an example. When you update your Organisation license information (found in Setup>Organisation) the fields will not update for Email and PDFs until you log out and log back in again. The reason for this is to reduce load on the database and to therefore improve over all performance.