Kernel::GenericInterface::Operation::CustomerUser::CustomerUserCreate

NAME

Kernel::GenericInterface::Operation::CustomerUser::CustomerUserCreate – GenericInterface Customer User Create Operation backend

PUBLIC INTERFACE

Run()

Perform CustomerUserCreate Operation, to add new customer users.

    my $Result = $OperationObject->Run(
        Data => {
            UserLogin            => 'some customer user login',                 # UserLogin or AccessToken is required
            AccessToken          => 123,
            Password             => 'some password',                            # if UserLogin is sent then Password is required

            CustomerUserLogin    => 'johndoe',                                  # required; the desired login for the new user
            UserEmail            => 'jdoe@example.com',                         # required
            UserFirstname        => 'John',                                     # required
            UserLastname         => 'Doe',                                      # required
            UserCustomerID       => 'aglufth-01',                               # required; the user's CustomerCompany
            UserPassword         => 's3cr3t',                                   # optional

            Source               => 'SomeSource',                               # optional; default: 'CustomerUser'
            ValidID              =>  1,                                         # required; 1, 2 or 3

            DynamicField         => [                                           # optional
                {
                    Name  => DFa,
                    Value => 'DFa-Value',
                },
                # ...
            ],

            UserPreferences => [                                                # optional
                {
                    Key   => 'TimeZone',
                    Value => 'Europe/Lisbon',
                },
                #...
            ],
        },
    );

    $Result = {
        Success         => 1,                                                   # 0 or 1
        ErrorMessage    => '',                                                  # in case of error
        Data    => {
            UserLogin    => 'johndoe',
            CustomerUser => {
                UserLogin         => 'johndoe',
                Source            => 'CustomerUser',
                UserFirstname     => 'John',
                UserLastname      => 'Doe',
                UserFullname      => 'John Doe',
                UserCustomerID    => 'aglufth-01',
                CustomerUserLogin => 'johndoe',
                UserEmail         => 'jdoe@example.com',
                ValidID           => 1,
                #...
                DynamicField_DFa  => 'DFa-Value',
                UserTimeZone      => 'Europe/Lisbon',
            },
            Error => {                                                          # in case of error
                ErrorCode    => 'ErrorCode',
                ErrorMessage => 'Error Description',
            },
        },
    };
Scroll to Top