Kernel::System::AutoResponse - auto response lib
All auto response functions. E. g. to add auto response or other functions.
create an object
my $AutoResponseObject = $Kernel::OM->Get('Kernel::System::AutoResponse');
add auto response with attributes
$AutoResponseObject->AutoResponseAdd( Name => 'Some::AutoResponse', ValidID => 1, Subject => 'Some Subject..', Response => 'Auto Response Test....', ContentType => 'text/plain', AddressID => 1, TypeID => 1, UserID => 123, );
get auto response with attributes
my %Data = $AutoResponseObject->AutoResponseGet( ID => 123, );
update auto response with attributes
$AutoResponseObject->AutoResponseUpdate( ID => 123, Name => 'Some::AutoResponse', ValidID => 1, Subject => 'Some Subject..', Response => 'Auto Response Test....', ContentType => 'text/plain', AddressID => 1, TypeID => 1, UserID => 123, );
get a hash with data from Auto Response and it's corresponding System Address
my %QueueAddressData = $AutoResponseObject->AutoResponseGetByTypeQueueID( QueueID => 3, Type => 'auto reply/new ticket', );
Return example:
%QueueAddressData( #Auto Response Data 'Text' => 'Your OTRS TeamOTRS! answered by a human asap.', 'Subject' => 'New ticket has been created! (RE: <OTRS_CUSTOMER_SUBJECT[24]>)', 'ContentType' => 'text/plain', 'SystemAddressID' => '1', 'AutoResponseID' => '1' #System Address Data 'ID' => '1', 'Name' => 'otrs@localhost', 'Address' => 'otrs@localhost', #Compatibility with OTRS 2.1 'Realname' => 'OTRS System', 'Comment' => 'Standard Address.', 'ValidID' => '1', 'QueueID' => '1', 'CreateTime' => '2010-03-16 21:24:03', 'ChangeTime' => '2010-03-16 21:24:03', );
get a list of the Queues that do not have Auto Response
my %AutoResponseWithoutQueue = $AutoResponseObject->AutoResponseWithoutQueue();
Return example:
%Queues = ( 1 => 'Some Name', 2 => 'Some Name', );
get a list of the Auto Responses
my %AutoResponse = $AutoResponseObject->AutoResponseList( Valid => 1, # (optional) default 1 TypeID => 1, # (optional) Auto Response type ID );
Return example:
%AutoResponse = ( '1' => 'default reply (after new ticket has been created)', '2' => 'default reject (after follow up and rejected of a closed ticket)', '3' => 'default follow up (after a ticket follow up has been added)', );
get a list of the Auto Response Types
my %AutoResponseType = $AutoResponseObject->AutoResponseTypeList( Valid => 1, # (optional) default 1 );
Return example:
%AutoResponseType = ( '1' => 'auto reply', '2' => 'auto reject', '3' => 'auto follow up', '4' => 'auto reply/new ticket', '5' => 'auto remove', );
assigns a list of auto-responses to a queue
my @AutoResponseIDs = (1,2,3); $AutoResponseObject->AutoResponseQueue ( QueueID => 1, AutoResponseIDs => \@AutoResponseIDs, UserID => 1, );
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.