/build/static/layout/Breadcrumb_cap_w.png

Create a rule for send an email to specific KACE administrator when a new ticket arrive to specific Queue

I would like create a rule for send an email to specific KACE administrator when a new ticket arrive to specific Queue, a mean, if any user send a new ticket from any source (portal or email) can receive an email to a specific user that in this case is an administrator of KACE


0 Comments   [ + ] Show comments

Answers (2)

Posted by: Hobbsy 2 months ago
Red Belt
0

You are probably best to run this as a ticket rule and run the rule every 15mins, as you can control the email content to the admin. As always, I suggest you use a custom field as a "switch field" so that you know only a single email is sent.

If you need help, build a simple ticket rule with the wizard and select a single field, so for example say if the status is Active then set the priority to Low.

Save the rule and then open the SQL, replace the "Status is Active" in the WHERE statement with SQL for if the ticket was created in the last 15 mins, something like

 ((TIMESTAMP(HD_TICKET.CREATED) <= NOW() 

AND TIMESTAMP(HD_TICKET.CREATED) > DATE_SUB(HD_TICKET.CREATED,INTERVAL 15 MINUTE)) AND

HD_TICKET.CUSTOM_FIELD_VALUE4 = 1

**HINT** You can get the correct SQL by creating a report with the wizard then viewing the SQL

And in the update SQL just set your switch field to value 2 

HD_TICKET.CUSTOM_FIELD_VALUE4 = 2

and configure the email to send to the Admin.

Here's another hint, set the Admin email address as the default value of a custom field, set to hidden.

You can then select the email address as a variable to use in the email

So in you SELECT Statement add in 

HD_TICKET.CUSTOM_FIELD_VALUE5 as ADMIN_EMAIL,

You can then use ADMIN_EMAIL as the variable in the email config.

Posted by: JordanNolan 2 months ago
10th Degree Black Belt
0

Depending on the load of your K1000, the every 15 min query might add a lot of load to the server if you have a lot of them. Instead of using the Wizard to create the Ticket Rule to run every 15 minutes, I would suggest just using New SQL rule to run on Ticket Save and check if the ticket created was created in the last 1 minute. To make sure you are not getting duplicates because someone added a quick comment, you can also check that there is only 1 change event which should be the Ticket Created event. 


Select

    HD_TICKET.ID,

    HD_TICKET.TITLE,

    HD_TICKET.SUMMARY,

    HD_TICKET.HD_PRIORITY_ID,

    HD_TICKET.HD_IMPACT_ID,

    HD_TICKET.CREATED

    'myemail@mydomain.com" as GROUPMAIL

From

    HD_TICKET Inner Join

    HD_TICKET_CHANGE On HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID

Where

    HD_TICKET.CREATED Between (Date_Sub(Now(), Interval 1 Minute)) And Now()

Group By

    HD_TICKET.ID,

    HD_TICKET.TITLE,

    HD_TICKET.SUMMARY,

    HD_TICKET.HD_PRIORITY_ID,

    HD_TICKET.HD_IMPACT_ID,

    HD_TICKET.CREATED

Having

    Count(HD_TICKET_CHANGE.ID) < 2


With that, you can use the option to "Email each recipient in query results". In the "Column containing email addresses" you would put "GROUPMAIL" from the query above to email the address(es) you specified in the query.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
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