Processing tickets require often a workflow. Let’s say “if-then” activities.
If specific conditions match like:
-
A ticket is from one particular customer.
-
A ticket is assigned to an appropriate queue.
-
A ticket has a defined priority.
-
A ticket contains defined keywords.
Outlined activities must be performed like changing the ticket priority, moving the ticket to another group, assigning a service to a ticket, and many more.
Also time-based activities can be required like cleaning up the spam-queue once a week.
OTRS supports this with the Generic Agent. Here, simple or compound time and event-based tasks are configurable in the OTRS front end without the requirement to learn a scripting language. Depending on search criteria, and time or event criteria, tickets will automatically be acted upon.
Use this screen to manage generic agent jobs in the system. A fresh OTRS installation contains no generic agent jobs by default. The generic agent job management screen is available in the Generic Agent module of the Processes & Automation group.
Manage Generic Agent Jobs
To create a new generic agent job:
-
Click on the Add Job button in the left sidebar.
-
Fill in the required fields.
-
Click on the Save button.
To edit a generic agent job:
-
Click on a generic agent job in the list of generic agent jobs.
-
Modify the fields.
-
Click on the Save or Save and finish button.
To delete a generic agent job:
-
Click on the trash icon in the fourth column of the overview table.
-
Click on the Confirm button.
Note
If several generic agent jobs are added to the system, use the filter box to find a particular generic agent job by just typing the name to filter.
Warning
The maximum number of 30 valid generic agent jobs should not be exceeded. Exceeding this limit may affect the system performance.
Generic Agent Job Settings
The following settings are available when adding or editing this resource. The fields marked with an asterisk are mandatory.
General Job Settings
- Job Name *
-
The name of this resource. Any type of characters can be entered to this field including uppercase letters and spaces. The name will be displayed in the overview table.
- Validity
-
Set the validity of this resource. This resource can be used in OTRS only, if this field is set to Yes. Setting this field to No will disable the use of the resource.
Automatic Execution
Fill in this section to set the times for automatic execution of the job.
- Schedule minutes
-
Select the minutes in which the job has to be executed. For example if 10 is selected, the job will be executed in every hour in 00:10, 01:10, 02:10, etc.
Warning
The automatic execution should not be performed more than one per hour. Exceeding this limit may affect your system performance.
- Schedule hours
-
Select the hours in which the job has to be executed. For example if 10 is selected for minutes and 03 is selected for hours, the job will be executed in every day in 03:10.
- Schedule days
-
Select the days in which the job has to be executed. For example if 10 is selected for minutes, 03 is selected for hours and Fri is selected for days, the job will be executed in every week in Friday 03:10.
Note
Scheduled tasks are using the local system time provided by the operating system OTRS is running on.
Warning
Times scheduled during daylight saving time start and daylight saving time end can have unexpected effects. At daylight saving time start it can be skipped and at daylight saving time end it can be executed twice. It is highly not recommended to schedule times when the daylight saving time starts or ends according to the server timezone.
Event Based Execution
Fill in this section to set events that trigger the execution of the job.
- Event Triggers
-
This is a list of already added events. If no events are added yet, the list contains no elements. Elements can be deleted by clicking on the trash icon in the last column.
- Add Event Trigger
-
Select an object and a related event that will trigger the job.
Select Tickets
This section contains all the attributes, that you can use to select the affected tickets.
Dynamic fields of type attachment could be used only in this section. However, it is not updatable by generic agent and this type of dynamic fields are not listed in Update/Add Ticket Attributes section.
The fields are self-explanatory, so the individual fields are not explained here.
Extended search conditions can be used for some fields and the possible syntaxes are:
Syntax |
Description |
---|---|
|
exact search |
|
wildcard |
|
wildcard |
|
or |
|
and |
|
negation (not) |
Here are some examples for extended searches in the ticket title:
Entry in Title Field |
Search Result |
---|---|
|
Finds tickets where the title is foo. |
|
Finds tickets with exactly this string (including the space). |
|
Finds tickets where the title starts with foo. |
|
Finds tickets where the title ends with bar. |
|
Finds tickets where the title contains foo. |
|
Finds tickets where the title is foo or bar. |
|
Finds tickets where the title contains foo or bar. |
|
Finds tickets where the title contains foo and bar. |
|
Finds tickets where the title contains foo and not bar. |
|
Finds tickets where the title contains foo and it is not foobar. |
Update/Add Ticket Attributes
Fill in this section to update and/or add ticket attributes.
Dynamic fields of type date or date and time can be set to absolute, relative or no date. The values can be positive like +5 days or negative like -10 hours based on the current time.
Dynamic fields of type attachment are not listed in this section.
Fields are self-explained, so there is no additional explanation here.
Add Note
Fill in this section to add a note to tickets that are affected by job execution.
Execute Ticket Commands
Fill in this section, if you would like to make execute a custom command with the job.
- Send agent/customer notifications on changes
-
If Yes is selected, a notification will be sent to agents and customers about ticket changes.
- CMD
-
Enter a command here, that will be executed. ARG[0] will be the ticket number. ARG[1] the ticket ID. Use
::
as directory separator, if the value contains a path.See also
Commands to be run by OTRS are blocked by default due to security reasons. You have to add the command to the allow list as described in Allow Program Safe to Run chapter.
Note
This feature is only available to On-Premise customers. If you are a Managed customer, this feature is taken care of by the Customer Solutions Team in OTRS. Please contact us via support@otrs.com or in the OTRS Portal.
- Delete tickets
-
If Yes is selected, the generic agent job will delete the matched tickets.
Warning
All affected tickets will be removed from the database and cannot be restored!
Execute Custom Module
Note
This feature is only available to On-Premise customers. If you are a Managed customer, this feature is taken care of by the Customer Solutions Team in OTRS. Please contact us via support@otrs.com or in the OTRS Portal.
Fill in this section, if you would like to make execute a custom module with the job.
- Module
-
This is the path for the module to be executed.
Note
Use
::
as directory separator, if the value contains a path. - Param key
-
Enter the key of the parameter, that should be passed to the module.
- Param value
-
Enter the value of the parameter, that should be passed to the module.