Browseable collection of plugins for the popular ticket system software Znuny and ((OTRS)) Community Edition.
This is a library with additional GenericInterface operations.
Those operations include
You can use this as a drop-in replacement for TicketGet. Additionally you can write filters to change the returned values.
For our GroupRestrictedDynamicFields addon, we wrote a filter to remove the dynamic fields for those users who do not have the permission to see them.
Those filters are simple Perl modules. You have to activate them via system configuration:
<Setting Name="GIExtension::TicketFilter###001-MyFilter" Required="0" Valid="1">
<Description Translatable="1">A filter for GIExtensions.</Description>
<Navigation>GenericInterface::Filter</Navigation>
<Value>
<Hash>
<Item Key="Module">Kernel::GenericInterface::Filter::MyFilter</Item>
</Hash>
</Value>
</Setting>
And the module looks like:
package Kernel::GenericInterface::Filter::MyFilter;
use strict;
use warnings;
our @ObjectDependencies = qw(
Kernel::System::Log
);
sub new {
my ($Type, %Param) = @_;
my $Self = bless {}, $Type;
return $Self;
}
sub Run {
my ($Self, %Param) = @_;
# maybe remove some fields from $Param{Ticket}
# %Param has the return values you can see for
# the TicketGet operation
return $Param{Ticket};
}
1;
Similar to the CustomerUser::DynamicFieldUpdate operation, but for customers.
Allows agents to add new customer users
The JSON should look like
{
"UserLogin": "an_agent",
"Password": "agents_password",
"CustomerCompany" : {
"UserFirstname" : "Huber",
"UserLastname" : "Manfred",
"UserLogin" : "mhuber",
"UserCustomerID" : "12345",
"UserPassword" : "some-pass",
"UserEmail" : "email@example.com",
"ValidID" : 1
}
}
Which fields are available depends on your system configuration.
Allows agents to add new customer users
The JSON should look like
{
"UserLogin": "an_agent",
"Password": "agents_password",
"CustomerCompanyID": 123,
"CustomerCompany" : {
"UserFirstname" : "Huber",
"UserLastname" : "Manfred",
"UserLogin" : "mhuber",
"UserCustomerID" : "12345",
"UserPassword" : "some-pass",
"UserEmail" : "email@example.com",
"ValidID" : 1
}
}
Which fields are available depends on your system configuration.
Searches for customer users and returns a list of customer user IDs.
{
"UserLogin": "an_agent",
"Password": "agents_password",
"CustomerCompany" : {
"UserLogin" : "example*",
"UserFirstname" : "Firstn*",
"CustomerCompanySearchCustomerIDs" : [
"example.com"
],
"ExcludeUserLogins" : [
"example", "doejohn"
],
"UserCountry" : [
"Austria", "Germany"
],
"DynamicField_FieldNameX" : {
"Equals" : 123,
"Like" : "value*",
"GreaterThan" : "2001-01-01 01:01:01",
"GreaterThanEquals" : "2001-01-01 01:01:01",
"SmallerThan" : "2002-02-02 02:02:02",
"SmallerThanEquals" : "2002-02-02 02:02:02"
}
"OrderBy" : [ "UserLogin", "UserCustomerID" ]
}
}
See SysConfig option CustomerCompany::EnhancedSearchFields for a list of fields that can be searched.
Similar to the core Ticket::TicketGet operation.
Allows agents to update a dynamic field for a customer user
To use it, select this operation as a controller for the GenericInterface provider. Then configure the provider and use e.g. /CustomerUser/:CustomerUserID for the route mapping.
Then you can send this JSON to your OTRS:
{
"UserLogin": "an_agent",
"Password": "agents_password",
"DynamicField": [{
"Name": "my_dynamic_field",
"Value": "new_value"
}]
}
Allows agents to add new customer users
The JSON should look like
{
"UserLogin": "an_agent",
"Password": "agents_password",
"CustomerUser" : {
"UserFirstname" : "Huber",
"UserLastname" : "Manfred",
"UserLogin" : "mhuber",
"UserCustomerID" : "12345",
"UserPassword" : "some-pass",
"UserEmail" : "email@example.com",
"ValidID" : 1
}
}
Which fields are available depends on your system configuration.
Allows agents to add new customer users
The JSON should look like
{
"UserLogin": "an_agent",
"Password": "agents_password",
"CustomerUser" : {
"UserFirstname" : "Huber",
"UserLastname" : "Manfred",
"UserLogin" : "mhuber",
"UserCustomerID" : "12345",
"UserPassword" : "some-pass",
"UserEmail" : "email@example.com",
"ValidID" : 1
}
}
Which fields are available depends on your system configuration.
Searches for customer users and returns a list of customer user IDs.
{
"UserLogin": "an_agent",
"Password": "agents_password",
"CustomerUser" : {
"UserLogin" : "example*",
"UserFirstname" : "Firstn*",
"CustomerCompanySearchCustomerIDs" : [
"example.com"
],
"ExcludeUserLogins" : [
"example", "doejohn"
],
"UserCountry" : [
"Austria", "Germany"
],
"DynamicField_FieldNameX" : {
"Equals" : 123,
"Like" : "value*",
"GreaterThan" : "2001-01-01 01:01:01",
"GreaterThanEquals" : "2001-01-01 01:01:01",
"SmallerThan" : "2002-02-02 02:02:02",
"SmallerThanEquals" : "2002-02-02 02:02:02"
}
"OrderBy" : [ "UserLogin", "UserCustomerID" ]
}
}
See SysConfig option CustomerUser::EnhancedSearchFields for a list of fields that can be searched.
Similar to the core Ticket::TicketGet operation.
Allows agents to create new agents. Of course the permissions are checked.
The JSON should look like
{
"UserLogin": "an_agent",
"Password": "agents_password",
"User" : {
"UserFirstname" : "Huber",
"UserLastname" : "Manfred",
"UserLogin" : "mhuber",
"UserPassword" : "some-pass",
"UserEmail" : "email@example.com",
"ValidID" : 1
}
}
Allows agents to update agents. Of course the permissions are checked.
The JSON should look like
{
"UserLogin": "an_agent",
"Password": "agents_password",
"User" : {
"UserFirstname" : "Huber",
"UserLastname" : "Manfred",
"UserLogin" : "mhuber",
"UserPassword" : "some-pass",
"UserEmail" : "email@example.com",
"ValidID" : 1
}
}
Checks only if the given session id is valid. In contrast to the core Session::SessionGet operation, this operation does not return any session details.
Deletes a session. Needs only the session id as a parameter. Before the session is deleted, it is validated.