NAME
Kernel::GenericInterface::Operation::SolMan::Common – common operation functions
PUBLIC INTERFACE
new()
usually, you want to create an instance of this by using Kernel::GenericInterface::Operation->new();
TicketSync()
Create/Update a local ticket.
my $Result = $OperationObject->TicketSync(
Data => {
Ticket => {
Title => 'some ticket title',
Queue => 'some queue name',
Lock => 'some lock name', # optional
Type => 'some type name', # optional
Service => 'some service name', # optional
SLA => 'some SLA name', # optional
State => 'some state name',
Priority => 'some priority name',
Owner => 'some user login', # optional
Responsible => 'some user login', # optional
CustomerUser => 'some customer user login',
PendingTime { # optional
Year => 2011,
Month => 12
Day => 03,
Hour => 23,
Minute => 05,
},
Article => {
SenderType => 'some sender type name', # optional
AutoResponseType => 'some auto response type', # optional
From => 'some from string', # optional
Subject => 'some subject',
Body => 'some body'
ContentType => 'some content type', # ContentType or MimeType and Charset is requieed
MimeType => 'some mime type',
Charset => 'some charset',
TimeUnit => 123, # optional
DynamicField => [ # optional
{
Name => 'some name',
Value => 'Value', # value type depends on the dynamic field
},
# ...
],
},
DynamicField => [ # optional
{
Name => 'some name',
Value => 'Value', # value type depends on the dynamic field
},
# ...
],
},
Attachment => [
{
Content => 'content' # base64 encoded
ContentType => 'some content type'
Filename => 'some fine name'
},
# ...
],
# Data specificly for SolMan - all data above is taken from OTRSTicketInvoker->PrepareRequest()
SolMan => {
IncidentId => '20170101410000001',
IncidentGuid => '20170101410000001',
LocalSystemGuid => '123ABC123ABC123ABC123ABC123ABC12',
RemoteSystemGuid => 'ABC123ABC123ABC123ABC123ABC123AB',
Person => [
{
Meta => {
ID => '1', # person id in OTRS (UserID for agents, UserLogin for customers)
ExternalID => '123', # person id in SolMan
Type => 'Agent' # or 'Owner' or 'CustomerUser'
},
UserEmail => 'mail address',
UserFirstname => 'first name',
UserLastname => 'last name',
# ...
},
# ...
],
},
},
);
$Result = {
IncidentId => '20170101410000001',
Persons => { ... }, # or [ { ... }, { ... }, ... ]
Success => 1,
ErrorMessage => '1: asdf',
Error => {
ErrorCode => '1',
ErrorMessage => 'asdf',
},
}
};
GetRemoteSystemGuid()
Tries to read SolMan system guid from web service configuration. If the system guid is not stored, reads it synchronously via a web service request and stores it. Then it returns system guid.
my $RemoteSystemGuid = $SolManCommonObject->GetRemoteSystemGuid();
$RemoteSystemGuid = '123ABC123ABC123ABC123ABC123ABC12'; # or undef in case of a problem
GetLocalSystemGuid()
Creates local system guid for SolMan communication, based on OTRS SystemID.
my $SystemGuid = $SolManCommonObject->GetLocalSystemGuid();
$SystemGuid = '123ABC123ABC123ABC123ABC123ABC12';
SetSystemGuid()
Stores local and/or remote system guid in system configuration.
my $Success = $SolManCommonObject->SetSystemGuid(
LocalSystemGuid => '123ABC123ABC123ABC123ABC123ABC12', # optional
RemoteSystemGuid => 'ABC123ABC123ABC123ABC123ABC123AB', # optional
);
