TicketCreate#
NAME#
Kernel::System::ProcessManagement::TransitionAction::TicketCreate - A module to create a ticket
DESCRIPTION#
All TicketCreate functions.
PUBLIC INTERFACE#
new()#
Don’t use the constructor directly, use the ObjectManager instead:
my $TicketCreateObject = $Kernel::OM->Get('Kernel::System::ProcessManagement::TransitionAction::TicketCreate');
Run()#
Runs TransitionAction TicketCreate.
my $TicketCreateResult = $TicketCreateActionObject->Run(
UserID => 123,
# Ticket contains the result of TicketGet including dynamic fields
Ticket => \%Ticket, # required
ProcessEntityID => 'P123',
ActivityEntityID => 'A123',
TransitionEntityID => 'T123',
TransitionActionEntityID => 'TA123',
# Config is the hash stored in a Process::TransitionAction's config key
Config => {
# ticket required:
Title => 'Some Ticket Title',
Queue => 'Raw', # or QueueID => 123,
Lock => 'unlock',
Priority => '3 normal', # or PriorityID => 2,
State => 'new', # or StateID => 5,
CustomerID => '123465',
CustomerUser => 'customer@example.com',
Owner => 'someuserlogin', # or OwnerID => 123
# ticket optional:
TN => $TicketObject->TicketCreateNumber(), # optional
Type => 'Incident', # or TypeID => 1, not required
Service => 'Service A', # or ServiceID => 1, not required
SLA => 'SLA A', # or SLAID => 1, not required
ResponsibleID => 123, # not required
ArchiveFlag => 'y', # (y|n) not required
PendingTime => '2011-12-23 23:05:00', # optional (for pending states)
PendingTimeDiff => 123 , # optional (for pending states)
# article required: (if one of them is not present, article will not be created without any error message)
SenderType => 'agent', # agent|system|customer
IsVisibleForCustomer => 1, # required
CommunicationChannel => 'Internal', # Internal|Phone|Email|..., default: Internal
%DataPayload, # some parameters depending of each communication channel
# article optional:
TimeUnit => 123,
# Attachment optional:
Attachments => '1', # optional, 1|0
AttachmentsReuse => 1 # optional, 1|0 - Reuse of attachments stored in the dynamic field configured in Process::DynamicFieldProcessManagementAttachment.
# other:
DynamicField_NameX => $Value,
LinkAs => $LinkType, # Normal, Parent, Child, etc. (respective original ticket)
UserID => 123, # optional, to override the UserID from the logged user
}
);
Returns:
my $Success = 1; # 0