Overview

PLEASE NOTE - As of Kayako 4.65, this mod as been discontinued, as 4.65 added the ability to use custom variables within notifications
Custom Notifications makes it possible to customize the notification sent out using the staff notifications system. The "all in one" notification message is broken down into its unique elements which are then put into variables for use within the emailnotification_text and emailnotification_html templates.

Replace the default class.SWIFT_TicketNotification.php with the one in this project:
( Location 4.50.xx : __apps\tickets\library\Notification )
( Location: 4.0 - 4.40 : __modules\tickets\library\notification )

Then in the admin CP, templates, templates, emailnotification templates(emailnotification_text, emailnotification_html), you can remove the current stuff and replace with your own custom notification. The available variables are:

Post contents: <{$_noticationmessage}>
subject: <{$_subjectnot}>
ticketid:<{$_ticketidnot}>
ticketurl: <{$_ticketurlnot}>
fullname: <{$_fullnamenot}>
email: <{$_emailnot}>
phoneno: <{$_phonenonot}>
creator: <{$_creatornot}>
departmenttitle: <{$_departmenttitlenot}>
owner: <{$_ownernot}>
type: <{$_typenot}>
status: <{$_statusnot}>
priority: <{$_prioritynot}>
SLAPlanTitle: <{$_SLAPlanTitlenot}>
templategrouptitle: <{$_templategrouptitle}>
created: <{$_creatednot}>
updated: <{$_updatednot}>
resolutiondue: <{$_resolutionduenot}>
changedby: <{$_changedby}>
changes: <{$_changes}>
user organization: <{$_organizationnot}> ( for version 4.50.xx only )

Which should let you customise almost everything that used to be in the notification by default.

*Versions
Use version 1.0 for kayako builds 4.30.x - 4.40.833
Use version 1.1 for kayako build 4.40.954 - 4.40.1148
Use version 1.2 for kayako build 4.40.954 - 4.40.114
Use version 1.5 for kayako build 4.50.1636 - 4.51.1891
Use version 1.6 for kayako build 4.52.2234 - 4.56.0.3459
Use version 1.7 for Kayako build 4.57 - 4.61.4088
Use version 1.8 for Kayako build 4.64.1.4827 *

Version 1.2 addresses reported issues with the mod in relation to undefined index errors occuring in guest chats. A new variable has been added which allows fallback to the old template contents in the event an error has occured with the custom template variables.

e.g. if notifiactions system calls the template, new variables are available, if chat system calls the template, it falls back to default

The following code needs to be added to your text and html templates to take advantage of the detection

<{if $_notificationsystem == "true"}>
<{else}>
<{/if}>

For the html template, the code would look something like this:
<{if $_notificationsystem == "true" }>
New variables here, such as the below
subject: <{$_subjectnot}>
<{else}>
<font face="Candara, Verdana, Arial, Helvetica" size="3"><{$_notificationContentsHTML}>
<br />
<HR style="margin-bottom: 6px; height: 1px; BORDER: none; color: #cfcfcf; background-color: #cfcfcf;" />
<{$_language[notificationstaffcp]}> <a href="<{$_swiftPath}>staff" target="_blank"><{$_swiftPath}>staff</a><br />
</font>
<{/if}>

For the text template, the code would look something like this:

<{if $_notificationsystem == "true"}>
New variables here, such as below
subject: <{$_subjectnot}>
<{else}>
<{$_notificationContentsText}>

------------------------------------------------------
<{$_language[notificationstaffcp]}> <{$_swiftPath}>staff<{/if}>

Project Information

Issue tracking

View all issues

Members

Administrator: Gary Mcgrath

Latest news

Release 1.6 fully compatible with 4.56.0.3459
Release 1.6 fully compatible with 4.56.0.3459
Added by Gary Mcgrath about 4 years ago

Release 1.6 fully compatible with 4.53.2633
Release 1.6 fully compatible with 4.53.2633
Added by Gary Mcgrath over 4 years ago

Version 1.1 fully compatible with kayako 4.40.1148
Version 1.1 fully compatible with kayako 4.40.1148
Added by Gary Mcgrath over 5 years ago

Version 1.1 fully compatible with kayako 4.40.1079
Version 1.1 fully compatible with kayako 4.40.1079
Added by Gary Mcgrath over 5 years ago

Version 1.1 released
For build 4.40.959 - 4.40.986 of kayako
Added by Gary Mcgrath over 5 years ago

View all news