Kernel::System::ProcessManagement::TransitionAction::TicketArticleCreate - A module to create an article
All TicketArticleCreate functions.
Don't use the constructor directly, use the ObjectManager instead:
my $TicketArticleCreateObject = $Kernel::OM->Get('Kernel::System::ProcessManagement::TransitionAction::TicketArticleCreate');
Run Data my $TicketArticleCreateResult = $TicketArticleCreateActionObject->Run( UserID => 123, Ticket => \%Ticket, # required ProcessEntityID => 'P123', ActivityEntityID => 'A123', TransitionEntityID => 'T123', TransitionActionEntityID => 'TA123', Config => { SenderType => 'agent', # (required) agent|system|customer IsVisibleForCustomer => 1, # 0 or 1 CommunicationChannel => 'Internal', # Internal|Phone|Email|..., default: Internal %DataPayload, # some parameters depending of each communication channel, please check ArticleCreate() on each # communication channel for the full list of optional and mandatory parameters TimeUnit => 123, # optional, to set the accounting time UserID => 123, # optional, to override the UserID from the logged user }, ); Ticket contains the result of TicketGet including DynamicFields Config is the Config Hash stored in a Process::TransitionAction's Config key Returns: $TicketArticleCreateResult = 1; # 0 Internal article example: my $TicketArticleCreateResult = $TicketArticleCreateActionObject->Run( UserID => 123, Ticket => { TicketNumber => '20101027000001', Title => 'some title', TicketID => 123, State => 'some state', # ... (all ticket properties) }, ProcessEntityID => 'P123', ActivityEntityID => 'A123', TransitionEntityID => 'T123', TransitionActionEntityID => 'TA123', Config => { SenderType => 'agent', IsVisibleForCustomer => 1, CommunicationChannel => 'Internal', # Internal article data payload. From => 'Some Agent <email@example.com>', To => 'Some Customer A <customer-a@example.com>', Subject => 'some short description', Body => 'the message text', Charset => 'ISO-8859-15', MimeType => 'text/plain', HistoryType => 'OwnerUpdate', HistoryComment => 'Some free text!', UnlockOnAway => 1, }, ); Email article example: my $TicketArticleCreateResult = $TicketArticleCreateActionObject->Run( UserID => 123, Ticket => { TicketNumber => '20101027000001', Title => 'some title', TicketID => 123, State => 'some state', # ... (all ticket properties, as the result from Kernel::System::Ticket::TicketGet) }, ProcessEntityID => 'P123', ActivityEntityID => 'A123', TransitionEntityID => 'T123', TransitionActionEntityID => 'TA123', Config => { SenderType => 'agent', IsVisibleForCustomer => 1, CommunicationChannel => 'Email', # Email article data payload. From => 'Some Agent <email@example.com>', To => 'Some Customer A <customer-a@example.com>', Subject => 'some short description', Body => 'the message text', Charset => 'ISO-8859-15', MimeType => 'text/plain', HistoryType => 'EmailAgent', HistoryComment => 'Some free text!', UnlockOnAway => 1, }, ); Chat article example: my $TicketArticleCreateResult = $TicketArticleCreateActionObject->Run( UserID => 123, Ticket => { TicketNumber => '20101027000001', Title => 'some title', TicketID => 123, State => 'some state', # ... (all ticket properties, as the result from Kernel::System::Ticket::TicketGet) }, ProcessEntityID => 'P123', ActivityEntityID => 'A123', SequenceFlowEntityID => 'T123', SequenceFlowActionEntityID => 'TA123', Config => { SenderType => 'agent', IsVisibleForCustomer => 1, CommunicationChannel => 'Chat', # Chat article data payload. ChatMessageList => [ { ID => 1, MessageText => 'My chat message', CreateTime => '2014-04-04 10:10:10', SystemGenerated => 0, ChatterID => '123', ChatterType => 'User', ChatterName => 'John Doe', }, # ... ], HistoryType => 'Misc', HistoryComment => 'Some free text!', }, );
This software is part of the OTRS project (https://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (GPL). If you did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.