Ticket

The following hooks are provided for Ticket related events.

AdminAreaViewTicketPage

Executes when an admin views a support ticket within the admin area.

Parameters

VariableTypeNotes
ticket_idintSupport Ticket ID which is being viewed

Response

Returned HTML will be output to the page.

Example Code

<?php
add_hook('AdminAreaViewTicketPage', 1, function($vars)
{
    $html = '<div class="alert alert-info" role="alert">You are watching this ticket</div>';
    return $html;
});

AdminSupportTicketPagePreTickets

Executes prior to aggregation and output of the support tickets listing page within the admin area.

Parameters

VariableTypeNotes
No input parameters for this hook point.

Response

Returned HTML will be output to the page.

Example Code

<?php
add_hook('AdminSupportTicketPagePreTickets', 1, function($vars)
{
    $html = 'Your Html text or Content here';
    return $html;
});

ClientAreaPageSubmitTicket

Executes on the client area ticket submission page and accepts a return of key/value pairs to be made available as additional Smarty template parameters. Input parameters include all currently defined template variables. The following is a list of template variables common to all pages. Additional variables will vary depending upon the page being rendered.

Parameters

VariableTypeNotes
No parameters supported

Response

A key/value pair array of additional template variables to define.

Example Code

<?php
add_hook('ClientAreaPageSubmitTicket', 1, function($vars)
{
   return ["key"=>"values"];
});

ClientAreaPageSupportTickets

Executes on the client area support tickets overview page and accepts a return of key/value pairs to be made available as additional Smarty template parameters. Input parameters include all currently defined template variables. The following is a list of template variables common to all pages. Additional variables will vary depending upon the page being rendered.

Parameters

VariableTypeNotes
No parameters supported

Response

A key/value pair array of additional template variables to define.

Example Code

<?php
add_hook('ClientAreaPageSupportTickets', 1, function($vars)
{
   return ["key"=>"values"];
});

ClientAreaPageViewTicket

Executes on the client area view ticket page and accepts a return of key/value pairs to be made available as additional Smarty template parameters. Input parameters include all currently defined template variables. The following is a list of template variables common to all pages. Additional variables will vary depending upon the page being rendered.

Parameters

VariableTypeNotes
No parameters supported

Response

A key/value pair array of additional template variables to define.

Example Code

<?php
add_hook('ClientAreaPageViewTicket', 1, function($vars)
{
   return ["key"=>"values"];
});

TicketAddNote

Executes when a ticket note is added.

Parameters

VariableTypeNotes
ticket_idintSupport Ticket ID
messagestringSupport Ticket Note Text
attachmentsstringNote attachment files
adminsarrayAdmins List as Array

Response

No Response Supported.

Example Code

<?php
add_hook('TicketAddNote', 1, function($vars)
{
});

TicketAdminReply

Executes when a reply is added to a ticket by an admin user.

Parameters

VariableTypeNotes
ticket_idintSupport Ticket ID
reply_idintReply Added ID
messagestringSupport Ticket Note Text

Response

No Response Supported.

Example Code

<?php
add_hook('TicketAdminReply', 1, function($vars)
{
});

TicketClose

Executes when a ticket is closed.

Parameters

VariableTypeNotes
ticket_idintSupport Ticket ID

Response

No Response Supported.

Example Code

<?php
add_hook('TicketClose', 1, function($vars)
{
});

TicketDelete

Executes when a ticket is deleted..

Parameters

VariableTypeNotes
ticket_idintSupport Ticket ID
admin_idintThe admin ID who initiated the action

Response

No Response Supported.

Example Code

<?php
add_hook('TicketDelete', 1, function($vars)
{
});

TicketDeleteReply

Executes when a ticket reply is deleted.

Parameters

VariableTypeNotes
reply_idintSupport Ticket Reply ID
admin_idintThe admin ID who initiated the action

Response

No Response Supported.

Example Code

<?php
add_hook('TicketDeleteReply', 1, function($vars)
{
});

TicketDepartmentChange

Executes as a ticket department is changed.

Parameters

VariableTypeNotes
ticket_idintSupport Ticket ID
dept_idintDepartment ID

Response

No Response Supported.

Example Code

<?php
add_hook('TicketDepartmentChange', 1, function($vars)
{
});

TicketFlagged

Executes as a ticket is flagged.

Parameters

VariableTypeNotes
ticket_idintSupport Ticket ID
admin_idintAdmin ID

Response

No Response Supported.

Example Code

<?php
add_hook('TicketFlagged', 1, function($vars)
{
});

TicketMerge

Executes when tickets are merged into each other.

Parameters

VariableTypeNotes
masterTicketIdintSupport Ticket ID
mergedTicketsintMergeable Tickets ID

Response

No Response Supported.

Example Code

<?php
add_hook('TicketMerge', 1, function($vars)
{
});

TicketOpen

Executes when a ticket is opened by an end user.

Parameters

VariableTypeNotes
ticket_idintSupport Ticket ID
ticket_nostringTicket Number
user_idintClient ID who is created ticket
namestringClient Name
emailstringClient Email address
entry_datestringTicket Creation date
autoclose_datestringTicket Auto Close Date
statusstringTicket status
prioritystringTicket Priority
department_idintTicket Department ID
isAdminboolIf Ticket created by Admin then True else False
subjectstringTicket Subject
messagestringTicket Message
attachmentsstringTicket Attachments
cc_mailsstringTicket CC Emails

Response

No Response Supported.

Example Code

<?php
add_hook('TicketOpen', 1, function($vars)
{
});

TicketOpenAdmin

Executes when a ticket is opened by an admin user.

Parameters

VariableTypeNotes
ticket_idintSupport Ticket ID
ticket_nostringTicket Number
user_idintClient ID who is created ticket
namestringClient Name
emailstringClient Email address
entry_datestringTicket Creation date
autoclose_datestringTicket Auto Close Date
statusstringTicket status
prioritystringTicket Priority
department_idintTicket Department ID
isAdminboolIf Ticket created by Admin then True else False
subjectstringTicket Subject
messagestringTicket Message
attachmentsstringTicket Attachments
cc_mailsstringTicket CC Emails

Response

No Response Supported.

Example Code

<?php
add_hook('TicketOpenAdmin', 1, function($vars)
{
});

TicketOpenValidation

Executes when an end user provides data for a new ticket submission.

Parameters

VariableTypeNotes
ticket_nostringTicket Number
user_idintClient ID who is created ticket
namestringClient Name
emailstringClient Email address
entry_datestringTicket Creation date
autoclose_datestringTicket Auto Close Date
statusstringTicket status
prioritystringTicket Priority
department_idintTicket Department ID
isAdminboolIf Ticket created by Admin then True else False
subjectstringTicket Subject
messagestringTicket Message
attachmentsstringTicket Attachments
cc_mailsstringTicket CC Emails

Response

A key/value pair array to used as a singular Validation Error.

Example Code

<?php
add_hook('TicketOpenValidation', 1, function($vars)
{
    return ["status"=>"error","message"=>"Your validation Error Text here"];
});

TicketPiping

Executes when a ticket is being imported via email.

Parameters

VariableTypeNotes
tostring
ccstring
namestring
emailstring
subjectstring
bodystring
attachmentsstring

Response

Return $skipProcessing=true to abort importing of the given email.

Example Code

<?php
add_hook('TicketPiping', 1, function($vars)
{
    return ["skipProcessing"=>true];
});

TicketPriorityChange

Executes when a ticket priority is changed

Parameters

VariableTypeNotes
ticket_idint
prioritystring

Response

No response supported

Example Code

<?php
add_hook('TicketPriorityChange', 1, function($vars)
{
});

TicketStatusChange

Executes as a ticket status is changed manually by an admin.

Parameters

VariableTypeNotes
ticket_idint
admin_idint
statusstring

Response

No response supported

Example Code

<?php
add_hook('TicketStatusChange', 1, function($vars)
{
});

TicketSubjectChange

Executes when a ticket subject is changed. The ‘subject’ variable now contains the new subject.

Parameters

VariableTypeNotes
ticket_idint
subjectstring

Response

No response supported

Example Code

<?php
add_hook('TicketSubjectChange', 1, function($vars)
{
});

TicketUserReply

Executes when a reply is added to a ticket by an end user.

Parameters

VariableTypeNotes
ticket_idint
reply_idint
messagestring

Response

No response supported

Example Code

<?php
add_hook('TicketUserReply', 1, function($vars)
{
});

TransliterateTicketText

Invoked when a ticket is imported from email.

Parameters

VariableTypeNotes
subjectstring
messagestring

Response

Override the global variables $subject and $message to manipulate.

Example Code

<?php
add_hook('TransliterateTicketText', 1, function($vars)
{
   return ['subject'=>'Override Subject here','message'=>'Override message here'];
});