WARNING: Always review "Precautions when creating ticket rules" before writing any rules.
*Created on K1000 v6.2.109329.This method for auto-creating tickets on a regular / scheduled / recurring basis requires creating a Custom Ticket Rule in a second queue (we'll call "Q2") to send an email to the queue we want the ticket created in (we'll call "Q1"). This is due to a previous K1000 update that restricts a Service Desk queue from emailing itself.
The email address you've configured for Q2 will need to be a valid submitter for Q1.
Pick one of the options below to make Q2 a valid submitter in Q1:
- Option 1: Set Q1 to "Allow all users as submitters" and "Accept email from unknown users"
- Option 2: Create a new user with Q2's email address. This removes the need to "Accept email from unknown users"
- Option 3: Create a new user with Q2's email address AND add that user to your submitter label for Q1. This removes the need to check "Accept email from unknown users" and "Allow all users as submitters."
Now that Q2 is allowed to submit tickets to Q1, we'll configure the Custom Ticket Rule to send an email to create the ticket. This rule must be created in Q2.
- Select Q2 from Service Desk > Configuration > Queues
- Scroll to the bottom of the page and click [Customize] next to "Custom Ticket Rules"
- Select Choose Action > New (SQL)
- Set the Name and Description (optional) as you like
- Copy the SQL below to the "Select SQL" box and replace "servicedesk" with the first part of Q1's Email Address (NOT the first part of Alternate Email Address) - the part of the Email Address before "@":
Queue Email Address for reference, continue below for SQL query:
SQL query and screenshot:
"servicedesk" as EMAILCOLUMN
- Check "Email each recipient in query result" and make sure no other boxes are checked except "Enabled"
- Enter a Subject for the email - this will become the Title for the generated ticket
- For "Column containing email addresses:" enter: "EMAILCOLUMN" (without quotes)
- For "Message:" the first line must be "@submitter=unassigned" to remove Q2 as the submitter of the ticket and avoid an email loop between the two queues. The lines after the first will be added as the first comment of the generated ticket. Here is a sample email:
This will be the initial comment on the created ticket.
This line will also be included in the initial comment on the created ticket as well as all lines following this one.
- Set the Frequency and Next Run to define how often, and when to create the recurring ticket (DO NOT select 'On Ticket save' or a new ticket will be created every time any change is made to any ticket! ).
- Click the Save button.
You may now go back in to the rule you just created to click the Run Now button to test.