Kernel::GenericInterface::Operation::CustomerUser::CustomerUserUpdate

NAME

Kernel::GenericInterface::Operation::CustomerUser::CustomerUserUpdate – GenericInterface Customer User Update Operation backend

PUBLIC INTERFACE

Run()

to update customer users

Perform CustomerUserUpdate Operation.

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

            ID                   => 'jsmith'                                    # required; the ID of the CustomerUser to be updated

            CustomerUserLogin    => 'some-customer-user-login',                 # optional
            UserFirstname        => 'John',                                     # optional
            UserLastname         => 'Smith',                                    # optional
            UserCustomerID       => 'C123',                                     # optional
            UserPassword         => 'some-pass',                                # optional
            UserEmail            => 'email@example.com',                        # optional

            ValidID              =>  1,                                         # optional; 1, 2 or 3

            DynamicField           => [                                         # optional
                {                                                               # - non-existing dynamic fields will be created
                    Name   => 'newDF',                                          # - existing dynamic fields will be updated
                    Value  => 'abc',
                },
                {
                    Name   => 'existDF',
                    Value  => 'xyz',
                },
                # ...
            ],

            UserPreferences => [                                                # optional
                {                                                               # - non-existing user preferences will be created
                    Key   => 'TimeZone',                                        # - existing user preferences will be updated
                    Value => 'Europe/Lisbon',
                },
                #...
            ],
        },
    );

    $Result = {
        Success         => 1,                                                   # 0 or 1
        ErrorMessage    => '',                                                  # in case of error
        Data    => {
            ID           => 'some user ID',
            CustomerUser => {
                UserID                 => 'some user ID',
                UserTitle              => 'some title',
                UserFirstname          => 'some first name',
                UserLastname           => 'some last name',
                UserFullname           => 'some full name,
                UserCountry            => 'some country',
                UserZip                => 'some ZIP',
                UserCity               => 'some city',
                UserStreet             => 'some street',
                UserMailString         => 'some address',
                UserPhone              => 'some phone',
                UserMobile             => 'some mobile',
                UserFax                => 'some fax',
                UserEmail              => 'some email',
                UserComment            => 'some comment',
                UserLanguage           => 'de',
                UserLogin              => 'some login',
                UserLastLogin          => 1666349274,
                UserLastLoginTimestamp => '2022-10-21 10:47:54',
                UserPassword           => 'some password hash',
                PasswordLastSet        => 2022-10-21 10:47:55,
                PasswordHistoryData    => [
                    'some password hash 1',
                    'some password hash 2',
                    'some password hash N',
                ],
                UserCustomerID         => 'some customer ID',
                CustomerID             => 'some customer ID',
                CustomerCompanyName    => 'some company name',
                CustomerCompanyCountry => 'some country',
                CustomerCompanyZIP     => 'some company ZIP,
                CustomerCompanyCity    => 'some company city',
                CustomerCompanyStreet  => 'some company street',
                CompanyString          => 'some company name',
                CustomerCompanyURL     => 'some URL',
                CustomerCompanyComment => 'some comment',
                CustomerCompanyValidID => 1,
                DynamicField_newDF     => 'abc',
                DynamicField_existDF   => 'xyz',
                UserTimeZone           => 'Europe/Lisbon',
                Source                 => 'CustomerUser',
                CreateBy               => 1,
                CreateTime             => '2022-10-21 10:47:54',
                ChangeBy               => 1,
                ChangeTime             => '2022-10-21 10:47:55',
                ValidID                => 1,
            },
            Error => {                                                          # in case of error
                ErrorCode    => 'ErrorCode',
                ErrorMessage => 'Error Description',
            },
        },
    };
Scroll to Top