NAME
Kernel::System::AutoResponse – auto response lib
DESCRIPTION
All auto response functions. E. g. to add auto response or other functions.
PUBLIC INTERFACE
new()
create an object
my $AutoResponseObject = $Kernel::OM->Get('Kernel::System::AutoResponse');
AutoResponseAdd()
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,
);
AutoResponseGet()
get auto response with attributes
my %Data = $AutoResponseObject->AutoResponseGet(
ID => 123,
);
AutoResponseUpdate()
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,
);
AutoResponseGetByTypeQueueID()
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',
);
AutoResponseWithoutQueue()
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',
);
AutoResponseList()
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)',
);
AutoResponseTypeList()
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',
);
AutoResponseQueue()
assigns a list of auto-responses to a queue
my @AutoResponseIDs = (1,2,3);
$AutoResponseObject->AutoResponseQueue (
QueueID => 1,
AutoResponseIDs => \@AutoResponseIDs,
UserID => 1,
);