Can anyone assist with System Ticket Rule Detail?
Hello - I am hoping someone could please point me in the right direction. I need to edit the built-in System Ticket Rule Detail on my KACE SMA Service Desk\Configuration. I only need to verify that my manager receives email messages whenever a Service Desk ticket is closed, which seems simple enough, but the SQL query info is a bit intimidating. I would deeply appreciate any guidance.
Thanks!
Answers (1)
So from my experience I suggest the following, you need to step outside of the standard email alerting a build a quick rule that does what you need it to.
To do this you need to do a number of things:
1. Add in custom field as a text field to your ticket layout and set the default value of that field in the custom field area to 1, this means that every time you create a ticket a field will be displayed with a number 1 populated in it. We will use that field to make sure that only a single email is sent and we will hide it later in the process.
2. Add in a custom field with the email address of your manager as the default value, as above this means every time you create a ticket a field will contain your manager's email address and like the first field we will hide it later in the process.
3. Create a wizard based rule with the following select criteria:
- When the ticket status is equal to "Closed" (or whatever status you need it to be to send the email)
- When the first custom field you created has a value of 1
4. Complete the update statement field as follows:
- Set the first custom field you created to a value of 2
5. Edit the ticket rule SQL
When you get into the Ticket rule edit screen you will need to add the following SQL to the select statement. You will probably have SQL a bit like this....
Select HD_TICKET.*,
HD_STATUS.NAME AS STATUS_NAME,
HD_STATUS.ORDINAL as STATUS_ORDINAL,
HD_IMPACT.ORDINAL as IMPACT_ORDINAL,
HD_CATEGORY.ORDINAL as CATEGORY_ORDINAL,
HD_PRIORITY.ORDINAL as PRIORITY_NUMBER,
Having made a note of which custom field number has the 1 populated, let's say its custom field 10, that will be HD_TICKET.CUSTOM_FIELD_VALUE9 in the database so you need to make your SQL look something like this:
Select HD_TICKET.*,
HD_STATUS.NAME AS STATUS_NAME,
HD_STATUS.ORDINAL as STATUS_ORDINAL,
HD_IMPACT.ORDINAL as IMPACT_ORDINAL,
HD_CATEGORY.ORDINAL as CATEGORY_ORDINAL,
HD_TICKET.CUSTOM_FIELD_VALUE9 as MANAGER_EMAIL, <------ Note this line added
HD_PRIORITY.ORDINAL as PRIORITY_NUMBER,
6. Setup the Email content
Now scroll down the rule page and tick the box marked "Email each recipient in query result"
Email Forms will appear.
In the box "Column Containing Email Address" add in MANAGER_EMAIL , that is the variable we added to the Select statement earlier
Add in a Subject, for example "Ticket ID: $tick Closed
And add some text into the message field.
Finally set the rule to run "On Ticket Save" in the schedule section and make sure the rule is enabled.
7. Save and test your rule
So now what will happen is when you have logged a ticket, so that default values are in place, when you close that ticket a single email will be sent to your manager.
8.Hide the custom fields
Once you have tested that, and you know it is working, you finally have to go back into the Queue configuration and set your two custom fields to Hidden and you are good to go.