Ticket Create Notifications in perl (otrs6)

Moderator: crythias

Locked
steeman
Znuny newbie
Posts: 67
Joined: 22 May 2013, 11:35
Znuny Version: 3.3.2
Real Name: Philip Steeman
Company: VIVES

Ticket Create Notifications in perl (otrs6)

Post by steeman »

I created a new ticket with an article in the correct queue. Everything seems to work, but the agents that are subscribed to this queue do not get any notification. Do I have to call an extra module?
My code:

Code: Select all

   # create new ticket
    $NewTicketID = $TicketObject->TicketCreate(
        Title         => 'Uitleen door ' . $naam . " ($account)",
        Queue         => 'Brugge::Uitleen',
        Lock          => 'unlock',
        Priority      => '3 normal',
        State         => 'new',
        CustomerID    => 1,
        OwnerID       => 1,
        UserID        => 1,
    );

    # change client
    $Success = $TicketObject->TicketCustomerSet(
        No       => $account,
        User     => $account,
        TicketID => $NewTicketID,
        UserID   => 1,
    );

    $NewArticleBackendObject = Kernel::OM->Get('Kernel::System::Ticket::Article')->BackendForChannel(ChannelName => 'Email');

    $subject = 'Uitleen door ' . $naam . " ($account)";

    $NewArticleID = $NewArticleBackendObject->ArticleCreate(
        TicketID             => $NewTicketID,
        SenderType           => 'customer',
        IsVisibleForCustomer => 1,
        UserID               => 1,
        From        => $naam . " <" . $email .">",
        To          => 'Servicedesk <servicedesk@mydomain>',
        Subject     => $subject,
        Body        => $body2,
        Charset     => 'iso-8859-15',
        MimeType    => 'text/plain',
        HistoryType    => 'NewTicket',
        HistoryComment => 'Aangemaakt via uitleenformulier',
        NoAgentNotify  => 0,
    );

Thanks for all your answers.

Philip
zzz
Znuny superhero
Posts: 914
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: Ticket Create Notifications in perl (otrs6)

Post by zzz »

Hello Philip,

Check your code, especially this part =)

Code: Select all

        HistoryType    => 'NewTicket',
        HistoryComment => 'Aangemaakt via uitleenformulier',
        NoAgentNotify  => 0,
    );
Best regards
Emin
Professional Znuny and OTRS services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
steeman
Znuny newbie
Posts: 67
Joined: 22 May 2013, 11:35
Znuny Version: 3.3.2
Real Name: Philip Steeman
Company: VIVES

Re: Ticket Create Notifications in perl (otrs6)

Post by steeman »

Sorry, but I don't get it
should it be NoAgentNotify => 1 ? This doesn't help (and doesn't sound correct).
zzz
Znuny superhero
Posts: 914
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: Ticket Create Notifications in perl (otrs6)

Post by zzz »

You're obviously right. Sorry for the confusion :lol:

Try to set HistoryType to 'EmailCustomer'.

Best regards
Emin
Professional Znuny and OTRS services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
steeman
Znuny newbie
Posts: 67
Joined: 22 May 2013, 11:35
Znuny Version: 3.3.2
Real Name: Philip Steeman
Company: VIVES

Re: Ticket Create Notifications in perl (otrs6)

Post by steeman »

This works, thanks. Not so simple (I'm not a OTRS specialist, but I do my best)

Philip
Locked