Notifications for generic agent

Moderator: crythias

Locked
creator
Znuny newbie
Posts: 5
Joined: 15 Sep 2011, 11:22
Znuny Version: 3.0.8
Real Name: Stefano Coletta
Company: Unidata

Notifications for generic agent

Post by creator »

Hello,
I need to send an e-mail to an arbitrary e-mail address when a generic agent has relevant tickets regarding the filter I've set.

In the past I've used the Ticket Commands CMD field to execute a simple bash script to make a simple notification:

Code: Select all

#!/bin/sh
logfile=/var/log/otrs/notifications.log

msg="https://helpdesk.domain.com/otrs/index.pl?Action=AgentTicketZoom;TicketID=$2"
echo $msg >> $logfile
echo $msg | /bin/mail -s "Ticket $1 is blah blah" email@domain.com
I would like to avoid using one script per type of notification and rather use a Custom Module to implement the same behaviour with the aid of the (Param key, Param value) couple of options from OTRS interface in the Execute Custom Module screen.

I've found no example on how a custom module for a generic agent could be written nor how parameters are handled.

Please, could you help?

Thanks,
Stefano Coletta
Locked