TicketCreate REST Api how to add send notification to CC address

Moderator: crythias

Locked
prevelikzalogaj
Znuny newbie
Posts: 3
Joined: 26 Oct 2015, 16:22
Znuny Version: 4.0.11

TicketCreate REST Api how to add send notification to CC address

Post by prevelikzalogaj »

Hi

I'm using OTRS API Rest interface on as entry point for creating ticket in OTRS system. It works ok for one agent and customer. Now I would like to add option to send Notifications on TiicketCreate and TicketUpdate event as CC email.

I looked at documentation for Perl Modules > Kernel::GenericInterface::Operation::Ticket::TicketCreate but I couldn't find anything useful (https://otrs.github.io/doc/api/otrs/4.0 ... te.pm.html).

CC option is supported in OTRS web interface. It also works if I hardcode Cc email to module Kernel::System::Ticket::Article into subroutine SendAgentNotification (parameter Cc => 'testemail.test.com). The question is how to pass CC value from JSON object received by OTRS Rest API to SendAgentNotification subroutine.

Hardcoded CC email.

Code: Select all

# send notify
    $Kernel::OM->Get('Kernel::System::Email')->Send(
        From => $ConfigObject->Get('NotificationSenderName') . ' <'
            . $ConfigObject->Get('NotificationSenderEmail') . '>',
        To       => $User{UserEmail},
        Cc		=> 'testemail.test.com,
        Subject  => $Notification{Subject},
        MimeType => $Notification{ContentType} || 'text/plain',
        Charset  => $Notification{Charset},
        Body     => $Notification{Body},
        Loop     => 1,
    );
Can anyone help me with this?

Regards,
OTRS 4.0.11 (private) on Linux with MySQL database
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: TicketCreate REST Api how to add send notification to CC address

Post by jojo »

the REST API currently does not support ArticleSend method
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
prevelikzalogaj
Znuny newbie
Posts: 3
Joined: 26 Oct 2015, 16:22
Znuny Version: 4.0.11

Re: TicketCreate REST Api how to add send notification to CC address

Post by prevelikzalogaj »

Do you maybe know a simple sollution for this? Do you maybe know for Git project that already covered this feature? I googled for this but wasn't succesful.

Is it possible to pass Cc value from JSON to SendAgentNotification subroutine?

Thank you for info.

Regards
OTRS 4.0.11 (private) on Linux with MySQL database
Locked