OTRS 8.0 API Reference Perl

Description manuals and libraries
OTRS 8.0 API Reference Perl > Perl Modules > Kernel::System::ProcessManagement::Modules::CustomerCompanyDataPull

NAME

Kernel::System::ProcessManagement::Modules::CustomerCompanyDataPull - A module to pull data from customer company map into current ticket.

DESCRIPTION

All CustomerCompanyDataPull functions.

PUBLIC INTERFACE

new()

Don't use the constructor directly, use the ObjectManager instead:

    my $CustomerCompanyDataPullObject = $Kernel::OM->Get(
        'Kernel::System::ProcessManagement::Modules::CustomerCompanyDataPull'
    );

Run()

    Run Data

    my $Success = $CustomerCompanyDataPullObject->Run(
        UserID                          => 123,
        Ticket                          => \%Ticket,   # required
        ProcessEntityID                 => 'P123',
        ActivityEntityID                => 'A123',
        SequenceFlowEntityID            => 'T123',
        SequenceFlowActionEntityID      => 'TA123',
        Config => {

            ConfigSearchKeyValueList {
                CustomerID          => 'example*',                                      # (optional)
                CustomerCompanyName => 'Name*',                                         # (optional)

                # array parameters are used with logical OR operator (all values are possible which
                are defined in the config selection hash for the field)
                CustomerCompanyCountry => 'Austria,Germany',                            # (optional)

                # DynamicFields (optional) as single or comma separated values.
                DynamicField_FieldNameA => 'Empty=1',
                DynamicField_FieldNameB => 'Equals=123,456',
                DynamicField_FieldNameC => 'Like=value*',
                DynamicField_FieldNameD => 'GreaterThan=2001-01-01 01:01:01',
                DynamicField_FieldNameE => 'GreaterThanEquals=2001-01-01 01:01:01',
                DynamicField_FieldNameF => 'SmallerThan=2002-02-02 02:02:02',
                DynamicField_FieldNameG => 'SmallerThanEquals=2002-02-02 02:02:02',

                OrderBy => 'CustomerID,CustomerCompanyCountry',                      # (optional)
                # default: 'CustomerID'
                # (all search fields possible which are defined in CustomerCompanySearchFields)

                # Additional information for OrderBy:
                # The OrderByDirection can be specified for each OrderBy attribute.
                # The pairing is made by the array indices.

                OrderByDirection => 'Down,Up',                                          # (optional)
                # (Down | Up) Default: 'Down'

                Limit => 100,                                                           # (optional)
            },

            ConfigDropdown => {
                Behavior => 'NoCopy',       #  'NoCopy', 'CopyFirstData' or 'CopyLastData' only
            },

            UserID => 123,         # optional, to override the UserID from the logged user

            # Value set:
            #   * Key is the attribute of the process ticket where the data will be set
            #   * Value is the value to be set, supporting smart tags <OTRS_CUSTOMER_DATA_*> from the resulting customer company
            #     after match and behavior filters e.g.
            #
            #   Example:
            #   * To set process ticket title to be exactly the linked customer company name:
            #     Title => '<OTRS_CUSTOMER_DATA_CustomerCompanyName',
            #   * To set the process ticket dynamic field NameX to an static value (not real pull):
            #     DynamicField_NameX => 'someValue',
        }
    );

    - `Ticket` contains the result of TicketGet including DynamicFields.