/build/static/layout/Breadcrumb_cap_w.png

Obtain all variable names for Kace emails notifications

Hi, 

We want to use the email notification feature to send ticket updates from our K1000.
The issue we are having is that Kace does not understand the SQL variables in email notification message field.
Variables from SQL like $comment & $submitter are coming out as typed, rather than being the variable value.

Does anybody understand how Kace generates these variables or where i can obtain a full list of variables?

Please see below examples of these variables;

$ticket_url, $ticket_fields_visible, $quoted_mail, $ticket_priority and $userui_url


0 Comments   [ + ] Show comments

Answers (3)

Answer Summary:
Posted by: chucksteel 9 years ago
Red Belt
2
For the system rules the variables can be found in the administrator guide. On the appliance browse to the Service Desk Email Notifications page (https://kace/adminui/queue_templates.php?ID=1), click the ? mark in the upper right for help, then click Email template variables.

Comments:
  • Hi Chuck,

    In version 6.3 the email notification page doesn't appear to have any obvious help or ? marks apart from the ones relating to the HTML/Markdown tick box - Joshy Boy 9 years ago
    • Sorry! I have now been able to access these using Google Chrome... For some reason you cannot see the help in ie11 - Joshy Boy 9 years ago
Posted by: MAXintosh 8 years ago
Senior Purple Belt
1
As of v6.4 here are the available tokens...

All Email Templates:
$helpdesk_email
$helpdesk_name
$userui_url

Ticket-Related Email Templates:
$change_desc
$last_attachment
$last_comment
$ticket_approver_email
$ticket_approver_name
$ticket_approver_phone_home
$ticket_approver_phone_mobile
$ticket_approver_phone_pager 
$ticket_approver_phone_work
$ticket_custom_X_label
$ticket_custom_X_value
$ticket_due_date
$ticket_escalation_minutes
$ticket_fields_visible
$ticket_history
$ticket_history_X
$ticket_id
$ticket_number
$ticket_owner_email
$ticket_owner_name
$ticket_owner_phone_home
$ticket_owner_phone_mobile
$ticket_owner_phone_pager
$ticket_owner_phone_work
$ticket_priority
$ticket_resolution
$ticket_status
$ticket_submitter_email
$ticket_submitter_name
$ticket_submitter_phone_home
$ticket_submitter_phone_mobile
$ticket_submitter_phone_pager
$ticket_submitter_phone_work
$ticket_title
$ticket_url
$ticket_http_url
$ticket_https_url
$userui_url

Error-Related Email Templates:
$error_text
$quoted_mail
$subject
Posted by: Hobbsy 9 years ago
Red Belt
0
Josh, 

We find that we have to make sure that the variable is selected within the select statement of the ticket rule. If you look through a default rule created by the wizard you will find various variables in as default, as below:

                        if ((LENGTH(U1.FULL_NAME) = 0), U1.USER_NAME, U1.FULL_NAME) as OWNER_NAME,
                        U1.FULL_NAME as OWNER_FULLNAME,
                        U1.EMAIL as OWNER_EMAIL,
                        if (U1.ID is null, 'z', concat('a', if ((LENGTH(U1.FULL_NAME) = 0), U1.USER_NAME, U1.FULL_NAME))) as SORT_OWNER_NAME,
                        if ((LENGTH(U2.FULL_NAME) = 0), U2.USER_NAME, U2.FULL_NAME) as SUBMITTER_NAME,
                        U2.FULL_NAME as SUBMITTER_FULLNAME,
                        U2.EMAIL as SUBMITTER_EMAIL,

So if you want to have additional data available either as a VARIABLE or $variable within your rule, you will probably need to add in to the select statement

HD_TICKET.CUSTOM_FIELD_VALUE3 as CHANGE_DATE

So that you can then use them in the email part of the rule

Comments:
  • Hi Hobbsy,

    Thank you for the response.

    Sorry i probably wasn't clear enough.
    We are trying to get away from using ticket rules to generate emails. Instead we hope to use the default "Email on Events" which, doesn't appear to have any SQL queries attached.

    It uses its own defined variables (listed above) which, do not appear in the wizard generated SQL query - Joshy Boy 9 years ago
    • I believe that KACE generates those variable in the same way, but as there is no way of cracking open the default rules you are stuffed! In a lot of engagements we do tend to find that emails can be better controlled if sent from within a ticket rule, you can also ensure that duplicates are not sent out and also that alerts are sent in the right order, which I know is a common complaint. - Hobbsy 9 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ