Die Verarbeitung von Tickets erfordert häufig einen definierten Arbeitsablauf, bspw. „Wenn-dann“-Aktivitäten.
Wenn bestimmte Bedingungen übereinstimmen wie:
-
Ein Ticket ist von einem bestimmten Kunden.
-
Ein Ticket ist einer entsprechenden Queue zugeordnet.
-
Ein Ticket hat eine definierte Priorität.
-
Ein Ticket enthält definierte Schlüsselworte.
Umrissene Aktivitäten wie das Ändern der Ticketpriorität, das Verschieben des Tickets in eine andere Queue, das Zuweisen eines Services zu einem Ticket und vieles mehr müssen durchgeführt werden.
Es können auch zeit-basierte Aktivitäten benötigt werden, wie bspw. das Leeren der Spam-Queue einmal pro Woche.
OTRS unterstützt dies mit dem GenericAgent. Hier sind einfache oder zusammengesetzte zeit- und ereignisbasierte Aufgaben im OTRS-Frontend konfigurierbar, ohne dass eine Script-Sprache erlernt werden muss. Je nach Suchkriterien und Zeit- oder Ereigniskriterien werden Tickets automatisch bearbeitet.
Verwenden Sie diese Ansicht, um GenericAgent-Aufträge im System zu verwalten. Eine neue OTRS-Installation beinhaltet standardmäßig keine GenericAgent-Aufträge. Die Ansicht zur Verwaltung von GenericAgent-Aufträgen ist im Modul GenericAgent in der Gruppe Prozesse & Automation verfügbar.

GenericAgent-Aufträge verwalten
So erstellen Sie einen GenericAgent-Auftrag:
-
Klicken Sie in der linken Seitenleiste auf die Schaltfläche Auftrag hinzufügen.
-
Füllen Sie die Pflichtfelder aus.
-
Klicken Sie auf die Schaltfläche Speichern.

So bearbeiten Sie einen GenericAgent-Auftrag:
-
Klicken Sie auf einen. GenericAgent-Auftrag in der Liste mit den GenericAgent-Aufträgen.
-
Ändern Sie die Felder.
-
Klicken Sie auf die Schaltfläche Speichern oder Speichern und abschließen.

So löschen Sie einen GenericAgent-Auftrag:
-
Klicken Sie in der vierten Spalte der Übersichtstabelle auf das Papierkorb-Symbol.
-
Klicken Sie auf die Schaltfläche Bestätigen.

Bemerkung
Wenn dem System mehrere GenericAgent-Aufträge hinzugefügt wurden, verwenden Sie das Filterfeld, um einen bestimmten GenericAgent-Auftrag zu finden, indem Sie einfach den zu filternden Namen eingeben.
Warnung
Die maximale Anzahl von 30 gültigen generischen Agenten-Jobs sollte nicht überschritten werden. Das Überschreiten dieser Grenze kann die Systemleistung beeinträchtigen.
To test a generic agent job before enabling automatic execution:
-
Set the job to Valid and save it.
-
Click on Run this task in the job overview list.
-
Review the results screen to verify which tickets were affected and what changes were made.
-
Adjust the job settings if necessary before activating the schedule or event triggers.
Bemerkung
The Run this task link is only visible for jobs that are set to Valid.
GenericAgent-Auftrag – Einstellungen
Die folgenden Einstellungen sind verfügbar, wenn Sie diese Ressource hinzufügen oder bearbeiten. Die mit einem Sternchen gekennzeichneten Felder sind Pflichtfelder.
Allgemeine Einstellungen für den Auftrag

- Auftragsname *
-
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. A job can be renamed after creation.
- Gültigkeit
-
Setzt die Gültigkeit dieser Ressource. Jede Ressource kann nur in OTRS verwendet werden, wenn dieses Feld auf gültig gesetzt ist. Wenn Sie dieses Feld auf ungültig oder ungültig-temporär setzen, wird die Nutzung der Ressource deaktiviert.
Automatische Ausführung
Füllen Sie diesen Abschnitt aus, wenn Sie Zeiten für die automatische Ausführung des Auftrages bestimmen möchten.

The job fires at every combination of selected minutes, hours, and days. At least one value must be selected in each of the three fields for the automatic schedule to be active. If any field is left empty, a warning is displayed and the job will not run on a schedule.
- Ausführen zu Minute(n)
-
Wählen Sie die Minuten in denen der Auftrag ausgeführt werden soll. Zum Beispiel wenn 10 gewählt wird, dann wird der Auftrag jede Stunde um 00:10, 01:10, 02:10, etc. ausgeführt.
Warnung
Die automatische Ausführung sollte nicht öfter als einmal pro Stunde durchgeführt werden. Ein Überschreiten dieser Grenze kann die Systemleistung beeinträchtigen.
- Ausführen zu Stunde(n)
-
Wählen Sie die Stunden, in denen der Auftrag ausgeführt werden soll. Wenn zum Beispiel 10 für Minuten und 03 für Stunden gewählt wird, wird der Auftrag jeden Tag um 03:10 Uhr ausgeführt.
- Ausführen an Tag(en)
-
Wählen Sie die Tage, an denen der Auftrag ausgeführt werden soll. Wenn zum Beispiel 10 für Minuten, 03 für Stunden und Fri für Tage ausgewählt wird, wird der Auftrag jede Woche am Freitag um 03:10 Uhr ausgeführt.
Bemerkung
Geplante Aufgaben verwenden die lokale Systemzeit des Betriebssystems, auf dem OTRS läuft.
Warnung
Zeiten, die während des Beginns der Sommerzeit und des Endes der Sommerzeit geplant werden, können unerwartete Auswirkungen haben. Bei Beginn der Sommerzeit kann sie übersprungen werden und bei Ende der Sommerzeit kann sie zweimal ausgeführt werden. Es wird dringend davon abgeraten, Zeiten zu planen, bei denen die Sommerzeit entsprechend der Zeitzone des Servers beginnt oder endet.
Ereignisbasierte Ausführung
Fill in this section to set events that trigger the execution of the job. A job may have both a schedule and event triggers — they run independently of each other.
An event trigger watches for a specific change to a ticket, such as the ticket being moved to a different queue or a new article being added. When that change occurs, the job runs automatically.

- Ereignisauslöser
-
Das ist eine Liste bereits hinzugefügter Ereignisse. Wenn noch keine Ereignisse hinzugefügt wurden, beinhaltet die Liste keine Elemente. Elemente können gelöscht werden, wenn Sie auf das Papierkorb-Symbol in der letzten Spalte klicken.
Each event trigger has an All Tickets checkbox:
-
When unchecked (default), the job acts only on the specific ticket that fired the event.
-
When checked, the job ignores the triggering ticket and instead runs the Select Tickets filter, processing all matching tickets — the same behavior as a scheduled run, but initiated by the event.
-
- Ereignisauslöser hinzufügen
-
Select an object and a related event that will trigger the job. Available event types include Ticket, Article, and Session. Additional types may be present depending on which features are active in the system.
Common ticket events:
Ereignis
When it fires
TicketCreateA new ticket is created.
TicketQueueUpdateA ticket is moved to a different queue.
TicketStateUpdateA ticket’s state changes.
TicketPriorityUpdateA ticket’s priority changes.
TicketOwnerUpdateA ticket’s owner changes.
TicketLockUpdateA ticket is locked or unlocked.
ArticleCreateA new article (email, note, phone call, etc.) is added.
- Event execution
-
Controls whether the job runs immediately or in the background when an event fires.
- Instant (may block screen)
-
The job runs synchronously as part of the same action that triggered the event. The agent’s screen may be briefly delayed while the job completes. This is the default.
- Daemon
-
The job is handed off to the OTRS background service and runs asynchronously. The agent’s screen responds immediately without waiting.
Use Daemon when the job could match a large number of tickets, or when the job performs heavy processing such as Ticket Allocation calculations.
Bemerkung
When the same event fires for several tickets at once, each ticket gets its own separate background task. Tasks for different tickets can run in parallel, but at most one task per job and ticket combination is queued at any time. The order in which tasks for different tickets run is not guaranteed.
- Prevent infinite loops
-
An infinite loop can occur when a job’s action re-fires the same event that triggered it. For example: a job that listens to queue changed and then moves the ticket to a different queue will re-fire queue changed, which would trigger the job again.
- No
-
No protection. If the job’s action re-fires its own trigger event, the job will run again. This is the default for backward compatibility.
- Yes
-
The system records that this job is already processing this ticket and event combination. If the same combination is seen again before the current run finishes, the second execution is silently skipped.
Enable this setting for any event-triggered job whose actions could re-fire the same event on the same ticket. The protection record expires after 10 minutes. This protection works for both Instant and Daemon execution modes.
Bemerkung
This protection is per job. Two different jobs listening to the same event can each still run once — they do not block each other.
Warnung
Misconfiguration of event-triggered jobs, especially when Prevent infinite loops is set to No, can lead to repeated or infinite execution loops that degrade system performance.
Tickets auswählen
This section contains all the attributes that you can use to select the affected tickets. All fields are optional. Leaving all fields empty matches all tickets in the system, subject to the processing limit.
Multiple values selected within one field match tickets that have any of those values (OR). Using multiple fields requires a ticket to match all of them (AND).
Warnung
A single job run will process at most 4000 tickets by default. If the filter matches more tickets, the remaining tickets are skipped in that run. A warning is shown on the results screen when this limit is reached. The limit can be changed via the Ticket::GenericAgentRunLimit system configuration setting.
Dynamische Felder vom Typ Anhang können nur in diesem Abschnitt verwendet werden. Sie sind jedoch nicht durch den generischen Agenten aktualisierbar, und diese Art von dynamischen Feldern ist im Abschnitt Ticketattribute aktualisieren/hinzufügen nicht aufgeführt.
Erweiterte Suchbedingungen können für einige Felder verwendet werden und die möglichen Syntaxen sind:
|
Syntax |
Beschreibung |
|---|---|
|
|
exakte Suche |
|
|
Platzhalter |
|
|
Platzhalter |
|
|
oder |
|
|
und |
|
|
Negation (nicht) |
Hier sind einige Beispiele für erweiterte Suchen im Ticket-Titel:
|
Eintrag im Feld Titel |
Suchergebnis |
|---|---|
|
|
Findet Tickets mit dem Titel foo. |
|
|
Findet Tickets mit genau dieser Zeichenfolge (einschließlich des Leerzeichens). |
|
|
Findet Tickets, deren Titel mit foo beginnt. |
|
|
Findet Tickets, deren Titel mit bar endet. |
|
|
Findet Tickets, deren Titel foo enthält. |
|
|
Findet Tickets, deren Titel foo oder bar ist. |
|
|
Findet Tickets, deren Titel foo oder bar enthält. |
|
|
Findet Tickets, deren Titel foo und bar enthält. |
|
|
Findet Tickets, deren Titel foo und nicht bar enthält. |
|
|
Findet Tickets, deren Titel foo enthält und nicht foobar ist. |
The time filter fields (Create times, Last changed times, Change times, Last close times, Close times, Pending times, Escalation times) each offer three options:
-
No settings — this dimension is not used as a filter.
-
Relative time window — matches tickets where the event falls within a window relative to now. Set a direction (within the last, within the next, or more than … ago), a number (1–60), and a unit (minutes, hours, days, weeks, months, or years).
-
Between two dates — matches tickets where the event falls between two specific dates.
Ticket-Attribute aktualisieren/hinzufügen
Fill in this section to update and/or add ticket attributes. All fields are optional — leave a field empty to leave that attribute unchanged.
Dynamische Felder vom Typ Datum oder Datum und Uhrzeit können auf absolut, relativ oder kein Datum eingestellt werden. Die Werte können positiv sein wie +5 Tage oder negativ wie -10 Stunden, basierend auf der aktuellen Zeit.
Dynamische Felder vom Typ Anlage sind in diesem Abschnitt nicht aufgeführt.

- Pending date
-
Sets a pending reminder time relative to the moment the job runs. Enter a number and select a unit (minutes, hours, days, months, or years). For example, entering 2 with day(s) sets the reminder to 2 days from now.
Bemerkung
The pending time is only applied when the new state set by this job is a pending state, or — if no new state is configured — when the ticket is already in a pending state. If neither condition is true, this field has no effect.
All other fields in this section are self-explanatory.
Notiz hinzufügen
Füllen Sie diesen Abschnitt aus, um eine Notiz zu den Tickets hinzuzufügen, die durch die Auftragsausführung betroffen sind.

Bemerkung
A note is only created when the Text field contains content. Filling in From or Subject without providing a body text will not create a note.
- From
-
The sender name shown in the note. Defaults to GenericAgent if left empty.
- Betreff
-
The note subject line. Defaults to Note if left empty.
- Text
-
The note body. This field must be filled for the note to be created. Maximum 200 characters.
- Visible to customer
-
When unchecked (default), the note is internal and only visible to agents. When checked, the note is visible to the customer.
- Zeiteinheiten
-
Time to book against the ticket for time accounting purposes.
Ticket-Befehle ausführen
Fill in this section, if you would like to execute a command or delete tickets with the job.

- Agenten-/Kunden-Benachrichtigung bei Änderungen senden
-
If Yes is selected (default), notifications are sent to agents and customers about ticket changes according to the configured notification rules. If No is selected, all notifications for changes made by this job are suppressed.
- CMD
-
Geben Sie hier einen Befehl ein, der ausgeführt werden soll. ARG[0] ist die Ticketnummer und ARG[1] die Ticket-ID. Verwenden Sie
::als Verzeichnis-Trennzeichen, wenn der Wert einen Pfad enthält.Siehe auch
Befehle, die von OTRS ausgeführt werden sollen, sind aus Sicherheitsgründen standardmäßig blockiert. Sie müssen den Befehl zur Liste der erlaubten Befehle hinzufügen, wie im Kapitel Sichere Ausführung des Programms zulassen beschrieben.
Bemerkung
Diese Funktion ist nur für On-Premise-Kunden verfügbar. Wenn Sie ein Managed-Kunde sind, wird diese Funktion vom Customer Solutions Team in OTRS betreut. Bitte kontaktieren Sie uns über support@otrs.com oder im OTRS Portal.
- Tickets löschen
-
Wenn Ja ausgewählt ist, werden übereinstimmende Tickets durch den GenericAgent-Auftrag gelöscht.
Warnung
Alle betroffenen Tickets werden aus der Datenbank entfernt und können nicht wiederhergestellt werden!
Execute Custom Modules
Bemerkung
Diese Funktion ist nur für On-Premise-Kunden verfügbar. Wenn Sie ein Managed-Kunde sind, wird diese Funktion vom Customer Solutions Team in OTRS betreut. Bitte kontaktieren Sie uns über support@otrs.com oder im OTRS Portal.
Fill in this section to execute a custom module with the job, or to use a specialized ordering or pre-action module.

- Order module
-
A module that receives the full list of matched tickets and returns them in a custom processing order. The job then processes tickets in that order. If the module returns no result, the job falls back to processing tickets in ascending ticket ID order and logs an error.
This module runs for both scheduled and event-triggered job executions.
The built-in option Ticket Allocation sorts tickets according to Ticket Allocation priority rules (queue priorities, service-time constraints, maximum tickets per queue) so that the most urgent tickets are processed first. Leave this field empty if you are not using Ticket Allocation.
- Pre action module
-
A module that runs once per matched ticket, before the configured ticket actions are applied. It can modify which actions are taken on that specific ticket — for example, dynamically determining which agent should be assigned based on current workload. If the module returns no result or encounters an error, the original configured actions are used unchanged as a fallback and an error is logged.
This module runs for both scheduled and event-triggered job executions.
Warnung
Ticket actions configured in this job may be overwritten by this module.
The built-in option Ticket Allocation automatically determines the right agent for each ticket based on availability, workload, group permissions, and optionally agent competences. Leave this field empty if you are not using Ticket Allocation.
- Modul
-
This is the path for a custom module to be executed once per matched ticket, after all other ticket attribute changes have been applied.
Bemerkung
Benutzen Sie
::um Verzeichnisse zu trennen, wenn der Wert einen Pfad enthält. - Parameter-Schlüssel
-
Enter the key of the parameter that should be passed to the module.
- Parameter-Wert
-
Enter the value of the parameter that should be passed to the module. Up to six key/value parameter pairs can be defined. These parameters are injected into the job configuration before the module runs and will not overwrite any built-in job settings.
Execution Order Within a Job Run
When a job processes a ticket, actions are applied in the following sequence. This matters when combining multiple actions — for example, the note is created before the state changes, so it reflects the ticket state prior to any state update made by this job.
-
Pre action module (if configured).
-
Move to new queue.
-
Add note (if text body is set).
-
Change state and set pending time.
-
Set customer user / customer ID.
-
Change title.
-
Change type / service / SLA / priority.
-
Change owner / responsible / lock.
-
Update dynamic fields.
-
Apply archive flag.
-
Run custom module (Module field).
-
Run shell command (CMD field).
-
Delete ticket (if enabled — always last).
