AutoResponse#

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

my $AutoResponseID = $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

my $Success = $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:

.. code-block:: perl
my %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:

my %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:

my %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:

my %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 $Success = $AutoResponseObject->AutoResponseQueue(
    QueueID         => 1,
    AutoResponseIDs => [1,2,3],
    UserID          => 1,
);

_NameExistsCheck()#

return if another auto-response with this name already exits

$AutoResponseObject->_NameExistsCheck(
    Name => 'Some::AutoResponse',
    ID   => 1, # optional
);