Kernel::System::Queue - queue lib
All queue functions. E. g. to add queue or other functions.
Don't use the constructor directly, use the ObjectManager instead:
my $QueueObject = $Kernel::OM->Get('Kernel::System::Queue');
get a queue system email address as hash (Email, RealName)
my %Address = $QueueObject->GetSystemAddress( QueueID => 123, );
get a queue signature
my $Signature = $QueueObject->GetSignature(QueueID => 123);
to add a template to a queue
my $Success = $QueueObject->QueueStandardTemplateMemberAdd( QueueID => 123, StandardTemplateID => 123, Active => 1, # to set/confirm (1) or remove (0) the relation UserID => 123, );
get standard responses of a queue
my %Templates = $QueueObject->QueueStandardTemplateMemberList( QueueID => 123 );
Returns: %Templates = ( 1 => 'Some Name', 2 => 'Some Name', );
my %Responses = $QueueObject->QueueStandardTemplateMemberList( QueueID => 123, TemplateTypes => 1, );
Returns: %Responses = ( Answer => { 1 => 'Some Name', 2 => 'Some Name', }, # ... );
my %Queues = $QueueObject->QueueStandardTemplateMemberList( StandardTemplateID => 123 );
Returns: %Queues = ( 1 => 'Some Name', 2 => 'Some Name', );
get all valid system queues
my %Queues = $QueueObject->GetAllQueues();
get all system queues of a user with permission type (e. g. ro
, move_into
, rw
, ...)
my %Queues = $QueueObject->GetAllQueues( UserID => 123, Type => 'ro' );
get all custom queues of one user
my @Queues = $QueueObject->GetAllCustomQueues( UserID => 123 );
get id or name for queue
my $Queue = $QueueObject->QueueLookup( QueueID => $QueueID ); my $QueueID = $QueueObject->QueueLookup( Queue => $Queue );
get FollowUpOption for the given QueueID
my $FollowUpOption = $QueueObject->GetFollowUpOption( QueueID => $QueueID );
returns any of 'possible', 'reject', 'new ticket'.
get Follow-Up Option list
my %FollowUpOptionList = $QueueObject->GetFollowUpOptionList( Valid => 0, # (optional) default 1 );
Return:
%FollowUpOptionList = ( '1' => 'possible', '3' => 'new ticket', '2' => 'reject' )
get FollowUpLockOption for the given QueueID
my $FollowUpLockOption = $QueueObject->GetFollowUpLockOption( QueueID => $QueueID );
returns '1' if ticket should be locked after a follow up, '0' if not.
get GroupID defined for the given QueueID.
my $GroupID = $QueueObject->GetQueueGroupID( QueueID => $QueueID );
add queue with attributes
my $QueueID = $QueueObject->QueueAdd( Name => 'Some::Queue', ValidID => 1, GroupID => 1, Calendar => '1', # (optional) FirstResponseTime => 120, # (optional) FirstResponseNotify => 60, # (optional, notify agent if first response escalation is 60% reached) UpdateTime => 180, # (optional) UpdateNotify => 80, # (optional, notify agent if update escalation is 80% reached) SolutionTime => 580, # (optional) SolutionNotify => 80, # (optional, notify agent if solution escalation is 80% reached) UnlockTimeout => 480, # (optional) FollowUpID => 3, # possible (1), reject (2) or new ticket (3) (optional, default 0) FollowUpLock => 0, # yes (1) or no (0) (optional, default 0) DefaultSignKey => 'key name', # (optional) SystemAddressID => 1, SalutationID => 1, SignatureID => 1, Comment => 'Some comment', UserID => 123, );
get queue attributes
my %Queue = $QueueObject->QueueGet( ID => 123, ); my %Queue = $QueueObject->QueueGet( Name => 'Some::Queue', );
update queue attributes
my $Success = $QueueObject->QueueUpdate( QueueID => 123, Name => 'Some::Queue', ValidID => 1, GroupID => 1, Calendar => '1', # (optional) default '' FirstResponseTime => 120, # (optional) FirstResponseNotify => 60, # (optional, notify agent if first response escalation is 60% reached) UpdateTime => 180, # (optional) UpdateNotify => 80, # (optional, notify agent if update escalation is 80% reached) SolutionTime => 580, # (optional) SolutionNotify => 80, # (optional, notify agent if solution escalation is 80% reached) SystemAddressID => 1, SalutationID => 1, SignatureID => 1, UserID => 123, FollowUpID => 1, Comment => 'Some Comment2', DefaultSignKey => '' UnlockTimeOut => '' FollowUpLock => 1, ParentQueueID => '', );
get all queues
my %Queues = $QueueObject->QueueList(); my %Queues = $QueueObject->QueueList( Valid => 1 );
set queue preferences
$QueueObject->QueuePreferencesSet( QueueID => 123, Key => 'UserComment', Value => 'some comment', UserID => 123, );
get queue preferences
my %Preferences = $QueueObject->QueuePreferencesGet( QueueID => 123, UserID => 123, );
return 1 if another queue with this name already exists
$Exist = $QueueObject->NameExistsCheck( Name => 'Some::Queue', ID => 1, # optional );
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.