Ticket Email Templates

Summary

This article details the use of templates for ticket emails that are sent from EngageIP. Ticket templates allow you to customize the look of emails sent from the ticketing system to customers or other AdminPortal users.

Adding and Editing a Template

  1. Load the Setup page

  2. Click on Ticket Email Template

  3. Copy the code below into the text area OR update your existing template (by default, no template will appear and the system will use the default internal template)

  4. Click Save

  5. Confirm the proper template is in use by sending an email from the ticket system to your email address

Template Example

<html> <head> <style type="text/css"> body { background-color: #FFFFFF; margin-top: 2px; margin-left: 1px; margin-right: 1px; border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none; width: 95%; font-size: 10px; font-family: Arial; } .TicketHeader { margin: 0px; list-style-type: none; } .TicketDetailHeader { font-weight: bold; text-indent:5px; padding: 3px 3px 3px 3px; background-color:#EEEEEE; } .TicketDetail { font-weight: bold; text-indent:5px; padding: 3px 3px 3px 3px; background-color:#EEEEFF; } .TicketDetailBody { margin-left:15px; } .txtbox_label { font-weight: bold; padding-right: 5px; } </style> </head> <body> <a href="www.SimplePortal.com/ticket/edit.rails?id=$TemplateHelper.SimplePortalEncodeString($Ticket.ID.ToString())">$translator.Translate("Click here to view this ticket")</a><br /> <br /> <table> #foreach ($field in $editfields) <tr><td>$translator.Translate($TemplateHelper.GetLabel("Ticket", $field))</td><td>$TemplateHelper.GetFieldValue($Ticket, $field)</td></tr> #end </table> <h1>$translator.Translate("Ticket History")</h1> #foreach ($ticketdetail in $ticketDetails) #if($ticketdetail.Text.Trim() != "") <p> $TemplateHelper.ShowTicketDetailHeader($ticketdetail) </p> <p> <div> <p>$ticketdetail.Text</p> </div> </p> #end #if ($TemplateHelper.TicketDetailHasAttachment($ticketdetail)) #if ($ticketdetail.GetTicketDetailAttachment().Deleted) $translator.Translate("Attachment ({0}) deleted.", $ticketdetail.GetTicketDetailAttachment().Name) #else $ticketdetail.GetTicketDetailAttachment().Name #end #end #end </body> </html>

Sample Code / Fields

The below IF statement allows you to show individual fields instead of displaying all as by default. The labels to use in the if statement are the following:  "Title", "RelatedTo_User", "RelatedToParent_User", "User", "TicketGroup", "TicketStatus", "TicketCategory", "TicketPriority", "DueDate".

#foreach ($field in $editfields) <!--<tr><td>$translator.Translate($TemplateHelper.GetLabel("Ticket", $field))</td><td>$TemplateHelper.GetFieldValue($Ticket, $field)</td></tr>--> #if ($field == "User") <tr><td>$translator.Translate($TemplateHelper.GetLabel("Ticket", $field))</td><td>$TemplateHelper.GetFieldValue($Ticket, $field)</td></tr> #elseif ($field == "TicketStatus") <tr><td>$translator.Translate($TemplateHelper.GetLabel("Ticket", $field))</td><td>$TemplateHelper.GetFieldValue($Ticket, $field)</td></tr> #end #end