Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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 admin users.

Adding and Editing a Template

  1. Click Setup tab

  2. Click '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 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

Redirection from Login to Tickets Tab

Add the following to your link to the customerportal to redirect the user automatically to the tickets tab rather then the default screen on customerportal login:'?ReturnUrl=/CustomerPortal/AddTicket.aspx?Ticket_ID=$Ticket.ID.ToString()'

  • No labels