Response Template Tags

Summary

This article will provide guidance to Enterprise Service management (ESM) Application Administrators on how to use template tags within response templates.

Body

Overview

Response Templates within the Enterprise Service Management (ESM) system supports the use of Template Tag(s) which allows App Admins to insert helpful information for ticket update comments. All available fields for a ticket response template are accessible in the Insert Template Tag dropdown which will insert the selected template tag surrounded by curly braces (e.g. {{TechnicianFullName}} ). These template tags serve as placeholders which are replaced with the applicable value when a response template is used to update a ticket.

In this article:

Available Template Tags

The ESM system current supports the following Template Tags in Response Templates.

  • LastModifiedDate - Inserts the ticket's last modified date into the response in the format of "Thu 5/9/24 9:53 AM Alaskan Daylight Time."
  • RequestorFirstName - Inserts the ticket requestor's first name (e.g. Brad) into the response.
  • RequestorFullName - Inserts the ticket requestor's full name (e.g. Brad Minton) into the response.
  • RequestorLastName - Inserts the ticket requestor's last name (e.g. Minton) into the response.
  • TechnicianFirstname - Inserts first name (e.g. Andrea) of the individual/technician updating the ticket into the response.
  • TechnicianFullName - Inserts the full name (e.g. Andrea Fustoch) of the individual/technician updating the ticket into the response.
  • TechnicianFullNameWithNickname - Inserts the full name of the individual/technician updating the ticket, substituting the First Name for their Nickname if set (e.g. Annie Fustoch).
    Note
    Currently within the UA ESM system the Nickname field is not set, so it is recommend to not use this template tag.
  • TechnicianLastName - Inserts the last name (e.g. Fustoch) of the individual/technician updating the ticket into the response.
  • TechnicianNickOrFirstName - Inserts the first name or nickname of the individual/technician updating the ticket into the response.
    Note
    Currently within the UA ESM system the Nickname field is not set, so it is recommend to not use this template tag.
  • TechnicianSignature - Inserts the personalized signature, if set, of individual/technician updating the ticket into the response. See the Edit Your Enterprise Service Management Profile KB article for information on setting a personalized signature.
    Note
    Because the TechnicianSignature field contains HTML, the template tag uses the triple curly brace notation (e.g. {{{TechnicianSignature}}} ) instead of the normal double curly brace notation (e.g. {{TechnicianFullName}} ).
  • TicketID - Inserts the Ticket ID of the ticket being updated into the response.
    Note
    In almost all UA ESM ticketing applications, the Notification Templates already include the Ticket's ID so it is probably unnecessary and redundant to use this template tag. Review the Get Started with Notification Templates KB article for further details.

Conditional Tags

The Mustache markup language is considered logic-less because it contains no "if" statements, "else" clauses, or "for" loops. Instead there are only tags. We can use specially formatted tags to determine if a tag contains a value or not, and use that to control what information to display. In the example below we'll use the TechnicianSignature tag; however, the logic can be applied to any of the template tags.

Check if a Template Tag has a Value, and if so Display It

The Mustache markup language uses a section to render blocks of text. A section begins with a pound (#) and ends with a slash (/). That is, {{#TechnicianSignature}} begins a "TechnicianSignature" section while {{/TechnicianSignature}} ends it. If the template tag has a value of false, or is empty, the information between the pound and slash will not be displayed.

The following template markup will display a technician's personalized signature, if they have set one.

{{#TechnicianSignature}}{{{TechnicianSignature}}}{{/TechnicianSignature}}

An example output could be:

-- 
Andrea Fustoch
Enterprise Applications Engineer
Information Technology Services
University of Alaska Anchorage
Phone: (907) 786-0000
Fax: (907) 786-0001
Email: andrea.fustoch@alaska.edu

Check if a Template Tag Does Not have a Value

The Mustache markup language refers to this as an inverted section. An inverted section begins with a caret (^) and ends with a slash. That is {{^TechnicianSignature}} begins a TechnicianSignature inverted section while {{/TechnicianSignature}} ends it. If the template tag does not have a value, or is false, the information between the sections will be displayed.

The following template markup will display a generic signature line, if the technician does not have a personalized signature set.

{{^TechnicianSignature}}
Thanks,
{{TechnicianFullName}}
UAA IT Services
Phone: (907) 786-4646 option 1
Phone: (877) 633-3888 (outside Anchorage)
{{/TechnicianSignature}}

Display Personalized Signature if Set, Otherwise Display Generic Signature

Combining the two tags above can allow App Admins to customize their response templates to display an individual's personalized signature if set, and gracefully fall back to a generic department format if not set.

{{#TechnicianSignature}}{{{TechnicianSignature}}}{{/TechnicianSignature}}
{{^TechnicianSignature}}
Thanks,
{{TechnicianFullName}}
UAA IT Services
Phone: (907) 786-4646 option 1
Phone: (877) 633-3888 (outside Anchorage)
{{/TechnicianSignature}}

Will display one of the following in the response message:

If a personalized signature is set:

Sincerely,
Annie

-- 
Andrea Fustoch
Enterprise Applications Engineer
Information Technology Services
University of Alaska Anchorage
Phone: (907) 786-0000

If personalized signature is not set:

Thanks,
Andrea Fustoch
UAA IT Services
Phone: (907) 786-4646 option 1
Phone: (877) 633-3888 (outside Anchorage)

Is there any additional information I should know about?

The ESM templates use the Mustache template markup language. Additional information can be found in the Mustache Manual linked below.

Need additional help or have issues

For support, requests may be submitted anytime using the appropriate Enterprise Service Management form. Requests generate a Ticket which will be worked in order received and urgency by IT Employees with the knowledge and permissions to assist with the request.

For immediate assistance please review the Contact Us page for the appropriate support group.

Details

Details

Article ID: 1915
Created
Fri 5/10/24 2:11 PM
Modified
Thu 5/16/24 5:12 PM