Customer Management

Moderator: crythias

Post Reply
Rmack09
Znuny newbie
Posts: 42
Joined: 28 Jan 2011, 15:37
Znuny Version: 3_1_3
Real Name: Mack

Customer Management

Post by Rmack09 »

I have configured a second customer DB backend. In the Customer Management, I can add customers to the second DB backend but I cannot see the recent add in the list. Is there a way to only show the customers from one source at a time?
You do not have the required permissions to view the files attached to this post.
OTRS Ver. 3.1.3 on Ubuntu 10.04 with MySQL database 5.1.49
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer Management

Post by crythias »

how did you configure the second backend?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Rmack09
Znuny newbie
Posts: 42
Joined: 28 Jan 2011, 15:37
Znuny Version: 3_1_3
Real Name: Mack

Re: Customer Management

Post by Rmack09 »

I duplicated the "customer_user" SQL Table and the entries in the Config.pm
OTRS Ver. 3.1.3 on Ubuntu 10.04 with MySQL database 5.1.49
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer Management

Post by crythias »

did you increment the index for CustomerUser?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Rmack09
Znuny newbie
Posts: 42
Joined: 28 Jan 2011, 15:37
Znuny Version: 3_1_3
Real Name: Mack

Re: Customer Management

Post by Rmack09 »

Yes I believe so. After I create a customer user, I am unable to see it in the customer management.

Code: Select all

mysql> describe customer_user2;
+-------------+--------------+------+-----+---------+----------------+
| Field       | Type         | Null | Key | Default | Extra          |
+-------------+--------------+------+-----+---------+----------------+
| id          | int(11)      | NO   | PRI | NULL    | auto_increment | 
| uid         | varchar(200) | NO   | UNI | NULL    |                | 
| email2      | varchar(150) | NO   |     | NULL    |                | 
| SBR_id      | varchar(150) | NO   |     | NULL    |                | 
| pw2         | varchar(64)  | YES  |     | NULL    |                | 
| title2      | varchar(50)  | YES  |     | NULL    |                | 
| first_name2 | varchar(100) | NO   |     | NULL    |                | 
| last_name2  | varchar(100) | NO   |     | NULL    |                | 
| phone2      | varchar(150) | YES  |     | NULL    |                | 
| fax2        | varchar(150) | YES  |     | NULL    |                | 
| mobile2     | varchar(150) | YES  |     | NULL    |                | 
| street2     | varchar(150) | YES  |     | NULL    |                | 
| zip2        | varchar(200) | YES  |     | NULL    |                | 
| city2       | varchar(200) | YES  |     | NULL    |                | 
| country2    | varchar(200) | YES  |     | NULL    |                | 
| comments2   | varchar(250) | YES  |     | NULL    |                | 
| valid_id2   | smallint(6)  | NO   | MUL | NULL    |                | 
| create_time | datetime     | NO   |     | NULL    |                | 
| create_by   | int(11)      | NO   | MUL | NULL    |                | 
| change_time | datetime     | NO   |     | NULL    |                | 
| change_by   | int(11)      | NO   | MUL | NULL    |                | 
| SBR_ids     | varchar(250) | YES  |     | NULL    |                | 
+-------------+--------------+------+-----+---------+----------------+
22 rows in set (0.00 sec)
OTRS Ver. 3.1.3 on Ubuntu 10.04 with MySQL database 5.1.49
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Customer Management

Post by jojo »

try delete the cache...

also 3.1.3 is very outdated, please update to the latest patch level
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Rmack09
Znuny newbie
Posts: 42
Joined: 28 Jan 2011, 15:37
Znuny Version: 3_1_3
Real Name: Mack

Re: Customer Management

Post by Rmack09 »

I have deleted the cache and it still not showing. Is there anything i am missing
OTRS Ver. 3.1.3 on Ubuntu 10.04 with MySQL database 5.1.49
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer Management

Post by crythias »

you didn't do this right.

If you want to create another table, create another table. You've only extended the current table.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Rmack09
Znuny newbie
Posts: 42
Joined: 28 Jan 2011, 15:37
Znuny Version: 3_1_3
Real Name: Mack

Re: Customer Management

Post by Rmack09 »

No thats the duplicate table (customer_user2).

Code: Select all

mysql> describe customer_user2;
+-------------+--------------+------+-----+---------+----------------+
| Field       | Type         | Null | Key | Default | Extra          |
+-------------+--------------+------+-----+---------+----------------+
| id          | int(11)      | NO   | PRI | NULL    | auto_increment | 
| uid         | varchar(200) | NO   | UNI | NULL    |                | 
| email2      | varchar(150) | NO   |     | NULL    |                | 
| SBR_id      | varchar(150) | NO   |     | NULL    |                | 
| pw2         | varchar(64)  | YES  |     | NULL    |                | 
| title2      | varchar(50)  | YES  |     | NULL    |                | 
| first_name2 | varchar(100) | NO   |     | NULL    |                | 
| last_name2  | varchar(100) | NO   |     | NULL    |                | 
| phone2      | varchar(150) | YES  |     | NULL    |                | 
| fax2        | varchar(150) | YES  |     | NULL    |                | 
| mobile2     | varchar(150) | YES  |     | NULL    |                | 
| street2     | varchar(150) | YES  |     | NULL    |                | 
| zip2        | varchar(200) | YES  |     | NULL    |                | 
| city2       | varchar(200) | YES  |     | NULL    |                | 
| country2    | varchar(200) | YES  |     | NULL    |                | 
| comments2   | varchar(250) | YES  |     | NULL    |                | 
| valid_id2   | smallint(6)  | NO   | MUL | NULL    |                | 
| create_time | datetime     | NO   |     | NULL    |                | 
| create_by   | int(11)      | NO   | MUL | NULL    |                | 
| change_time | datetime     | NO   |     | NULL    |                | 
| change_by   | int(11)      | NO   | MUL | NULL    |                | 
| SBR_ids     | varchar(250) | YES  |     | NULL    |                | 
+-------------+--------------+------+-----+---------+----------------+
22 rows in set (0.00 sec)

mysql> describe customer_user;
+--------------+--------------+------+-----+---------+----------------+
| Field        | Type         | Null | Key | Default | Extra          |
+--------------+--------------+------+-----+---------+----------------+
| id           | int(11)      | NO   | PRI | NULL    | auto_increment | 
| login        | varchar(200) | NO   | UNI | NULL    |                | 
| email        | varchar(150) | NO   |     | NULL    |                | 
| customer_id  | varchar(150) | NO   |     | NULL    |                | 
| pw           | varchar(64)  | YES  |     | NULL    |                | 
| title        | varchar(50)  | YES  |     | NULL    |                | 
| first_name   | varchar(100) | NO   |     | NULL    |                | 
| last_name    | varchar(100) | NO   |     | NULL    |                | 
| phone        | varchar(150) | YES  |     | NULL    |                | 
| fax          | varchar(150) | YES  |     | NULL    |                | 
| mobile       | varchar(150) | YES  |     | NULL    |                | 
| street       | varchar(150) | YES  |     | NULL    |                | 
| zip          | varchar(200) | YES  |     | NULL    |                | 
| city         | varchar(200) | YES  |     | NULL    |                | 
| country      | varchar(200) | YES  |     | NULL    |                | 
| comments     | varchar(250) | YES  |     | NULL    |                | 
| valid_id     | smallint(6)  | NO   | MUL | NULL    |                | 
| create_time  | datetime     | NO   |     | NULL    |                | 
| create_by    | int(11)      | NO   | MUL | NULL    |                | 
| change_time  | datetime     | NO   |     | NULL    |                | 
| change_by    | int(11)      | NO   | MUL | NULL    |                | 
| customer_ids | varchar(250) | YES  |     | NULL    |                | 
+--------------+--------------+------+-----+---------+----------------+
22 rows in set (0.00 sec)

OTRS Ver. 3.1.3 on Ubuntu 10.04 with MySQL database 5.1.49
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer Management

Post by crythias »

oh... kay...? Then why did you index the column names?
Show your Config.pm please?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Rmack09
Znuny newbie
Posts: 42
Joined: 28 Jan 2011, 15:37
Znuny Version: 3_1_3
Real Name: Mack

Re: Customer Management

Post by Rmack09 »

Here it is

Code: Select all

# --
# Kernel/Config.pm - Config file for OTRS kernel
# Copyright (C) 2001-2010 xxx, http://otrs.org/
# --
# $Id: Config.pm.dist,v 1.23 2010/01/13 22:25:00 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
#  Note:
#
#  -->> OTRS does have a lot of config settings. For more settings
#       (Notifications, Ticket::ViewAccelerator, Ticket::NumberGenerator,
#       LDAP, PostMaster, Session, Preferences, ...) see
#       Kernel/Config/Defaults.pm and copy your wanted lines into "this"
#       config file. This file will not be changed on update!
#
# --

package Kernel::Config;

sub Load {
    my $Self = shift;
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #         Start of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #

    # ---------------------------------------------------- #
    # database settings                                    #
    # ---------------------------------------------------- #
    # DatabaseHost
    # (The database host.)
    $Self->{'DatabaseHost'} = 'localhost';
    # Database
    # (The database name.)
    $Self->{'Database'} = 'otrs';
    # DatabaseUser
    # (The database user.)
    $Self->{'DatabaseUser'} = 'root';
    # DatabasePw
    # (The password of database user. You also can use bin/otrs.CryptPassword.pl
    # for crypted passwords.)
    $Self->{'DatabasePw'} = '*********';
    # DatabaseDSN
    # (The database DSN for MySQL ==> more: "man DBD::mysql")
    $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";

    # (The database DSN for PostgreSQL ==> more: "man DBD::Pg")
    # if you want to use a local socket connection
#    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
    # if you want to use a tcpip connection
#    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";

    # ---------------------------------------------------- #
    # fs root directory
    # ---------------------------------------------------- #
    $Self->{Home} = '/opt/otrs';

    # ---------------------------------------------------- #
    # insert your own config settings "here"               #
    # config settings taken from Kernel/Config/Defaults.pm #
    # ---------------------------------------------------- #
    # $Self->{SessionUseCookie} = 0;
    # $Self->{CheckMXRecord} = 0;


    # ---------------------------------------------------- #

    # ---------------------------------------------------- #
    # data inserted by installer                           #
    # ---------------------------------------------------- #
    # $DIBI$
     $Self->{'SystemID'} = 10;
    $Self->{'SecureMode'} = 1;
    $Self->{'Organization'} = 'Ticket Center';
    $Self->{'LogModule::LogFile'} = '/var/log/otrs.log';
    $Self->{'LogModule'} = 'Kernel::System::Log::SysLog';
    $Self->{'FQDN'} = 'ticketcenter.com';
    $Self->{'DefaultLanguage'} = 'en';
    $Self->{'AdminEmail'} = 'TAC@ticketcenter.com';
    $Self->{'DefaultCharset'} = 'utf-8';
    $Self->{DefaultTheme} = 'Standard';
    $Self->{CustomerGroupSupport} = 1;


    # --------------------------------------------------- #
    #                                                     #
    #             Start of config options!!!              #
    #                 CustomerUser stuff                  #
    #                                                     #
    # --------------------------------------------------- #


    # CustomerUser
    # (customer user database backend and settings)
    $Self->{CustomerUser} = {
        Name   => 'Database Backend',
        Module => 'Kernel::System::CustomerUser::DB',
        Params => {
            # if you want to use an external database, add the
            # required settings
#            DSN => 'DBI:odbc:yourdsn',
#            DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
#            User => '',
#            Password => '',
            Table => 'customer_user',
            # if your frontend is unicode and the charset of your
            # customer database server is iso-8859-1, use these options.
#           SourceCharset => 'iso-8859-1',
#           DestCharset => 'utf-8',

            # CaseSensitive will control if the SQL statements need LOWER()
            #   function calls to work case insensitively. Setting this to
            #   1 will improve performance dramatically on large databases.
            CaseSensitive => 0,
        },

        # customer unique id
        CustomerKey => 'login',

        # customer #
        CustomerID             => 'customer_id',
        CustomerValid          => 'valid_id',
        CustomerUserListFields => [ 'first_name', 'last_name', 'email' ],

#        CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'],
        CustomerUserSearchFields           => [ 'login', 'first_name', 'last_name', 'customer_id' ],
        CustomerUserSearchPrefix           => '*',
        CustomerUserSearchSuffix           => '*',
        CustomerUserSearchListLimit        => 250,
        CustomerUserPostMasterSearchFields => ['email'],
        CustomerUserNameFields     => [ 'title', 'first_name', 'last_name' ],
        CustomerUserEmailUniqCheck => 1,

#        # show now own tickets in customer panel, CompanyTickets
#        CustomerUserExcludePrimaryCustomerID => 0,
#        # generate auto logins
#        AutoLoginCreation => 0,
#        # generate auto login prefix
#        AutoLoginCreationPrefix => 'auto',
#        # admin can change customer preferences
#        AdminSetPreferences => 1,
#        # use customer company support (reference to company, See CustomerCompany settings)
#        CustomerCompanySupport => 1,
#        # cache time to live in sec. - cache any database queries
#        CacheTTL => 0,
#        # just a read only source
#        ReadOnly => 1,
        Map => [

            # note: Login, Email and CustomerID needed!
            # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target
            [ 'UserTitle',      'Title',      'title',      1, 0, 'var', '', 0 ],
            [ 'UserFirstname',  'Firstname',  'first_name', 1, 1, 'var', '', 0 ],
            [ 'UserLastname',   'Lastname',   'last_name',  1, 1, 'var', '', 0 ],
            [ 'UserLogin',      'Username',   'login',      1, 1, 'var', '', 0 ],
            [ 'UserPassword',   'Password',   'pw',         0, 0, 'var', '', 0 ],
            [ 'UserEmail',      'Email',      'email',      1, 1, 'var', '', 0 ],

#            [ 'UserEmail',      'Email', 'email',           1, 1, 'var', '$Env{"CGIHandle"}?Action=AgentTicketCompose&ResponseID=1&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}', 0 ],
            [ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],

            [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
            [ 'UserPhone',        'Phone',       'phone',        1, 0, 'var', '', 0 ],
            [ 'UserFax',          'Fax',         'fax',          1, 0, 'var', '', 0 ],
            [ 'UserMobile',       'Mobile',      'mobile',       1, 0, 'var', '', 0 ],
            [ 'UserStreet',       'Street',      'street',       1, 0, 'var', '', 0 ],
            [ 'UserZip',          'Zip',         'zip',          1, 0, 'var', '', 0 ],
            [ 'UserCity',         'City',        'city',         1, 0, 'var', '', 0 ],
            [ 'UserCountry',      'Country',     'country',      1, 0, 'var', '', 0 ],
            [ 'UserComment',      'Comment',     'comments',     1, 0, 'var', '', 0 ],
            [ 'ValidID',          'Valid',       'valid_id',     0, 1, 'int', '', 0 ],
        ],

        # default selections
        Selections => {

#            UserTitle => {
#                'Mr.' => 'Mr.',
#                'Mrs.' => 'Mrs.',
#            },
        },
    };

# 2. Customer user backend: DB
# (customer database backend and settings)
$Self->{CustomerUser2} = {
    Name => 'Database Backend II',
    Module => 'Kernel::System::CustomerUser::DB',
    Params => {
        # if you want to use an external database, add the
        # required settings
#        DSN => 'DBI:odbc:yourdsn',
#        DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
#        User => '',
#        Password => '',
        Table => 'customer_user2',
	    # if your frontend is unicode and the charset of your
            # customer database server is iso-8859-1, use these options.
#           SourceCharset => 'iso-8859-1',
#           DestCharset => 'utf-8',

            # CaseSensitive will control if the SQL statements need LOWER()
            #   function calls to work case insensitively. Setting this to
            #   1 will improve performance dramatically on large databases.
            CaseSensitive => 0,
    },

  
      # customer unique id
      CustomerKey => 'uid',

    # customer #
    CustomerID => 'SBR_id',
    CustomerValid => 'valid_id2',
    CustomerUserListFields => ['first_name2', 'last_name2', 'email2'],
    CustomerUserSearchFields => ['uid', 'last_name2', 'SBR_id'],
    CustomerUserSearchPrefix => 'ITS_SBR',
    CustomerUserSearchSuffix => '',
    CustomerUserSearchListLimit => 250,
    CustomerUserPostMasterSearchFields => ['email2'],
    CustomerUserNameFields => ['title2','first_name2','last_name2'],
    CustomerUserEmailUniqCheck => 1,
#    # show not own tickets in customer panel, CompanyTickets
#    CustomerUserExcludePrimaryCustomerID => 0,
#    # generate auto logins
#    AutoLoginCreation => 0,
#    AutoLoginCreationPrefix => 'auto',
#    # admin can change customer preferences
     AdminSetPreferences => 1,
#    # cache time to live in sec. - cache any database queries
#    CacheTTL => 0,
#    # just a read only source
#    ReadOnly => 1,
    Map => [

        # note: Login, Email and CustomerID needed!
        # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target
        [ 'UserTitle',      'Title',      'title2',        1, 0, 'var', '', 0 ],
        [ 'UserFirstname',  'Firstname',  'first_name2',   1, 1, 'var', '', 0 ],
        [ 'UserLastname',   'Lastname',   'last_name2',    1, 1, 'var', '', 0 ],
        [ 'UserLogin',      'Username',   'uid',        1, 1, 'var', '', 0 ],
        [ 'UserPassword',   'Password',   'pw2',           0, 0, 'var', '', 0 ],
        [ 'UserEmail',      'Email',      'email2',        1, 1, 'var', '', 0 ],
        [ 'UserCustomerID', 'CustomerID', 'SBR_id',  0, 1, 'var', '', 0 ],
        [ 'UserCustomerIDs', 'CustomerIDs', 'SBR_ids', 1, 0, 'var', '', 0 ],
        [ 'UserPhone',      'Phone',      'phone2',        1, 0, 'var', '', 0 ],
        [ 'UserFax',        'Fax',        'fax2',          1, 0, 'var', '', 0 ],
        [ 'UserMobile',     'Mobile',     'mobile2',       1, 0, 'var', '', 0 ],
        [ 'UserStreet',     'Street',     'street2',       1, 0, 'var', '', 0 ],
        [ 'UserZip',        'Zip',        'zip2',          1, 0, 'var', '', 0 ],
        [ 'UserCity',       'City',       'city2',         1, 0, 'var', '', 0 ],
        [ 'ValidID',        'Valid',      'valid_id2',     0, 1, 'int', '', 0 ],
    ],
    # default selections
    Selections => {
        UserTitle => {
            'Mr.' => 'Mr.',
            'Mrs.' => 'Mrs.',
        },
    },
};
    # ---------------------------------------------------- #
    # Ticket ACL configuration - Customer Interface
    # ---------------------------------------------------- #

    $Self->{TicketAcl}->{'30010-ACL-Customer Interface'} = {
        Properties => {
            Frontend => {
                Action => ['CustomerTicketMessage'],
            },
        },
        Possible => {
            Ticket => {
                Type => ['Trouble / Incident', 'Quarterly Review', 'Turn-Up', 'Project Related'],
            },
        },
    };
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #           End of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
}

# ---------------------------------------------------- #
# needed system stuff (don't edit this)                #
# ---------------------------------------------------- #
use strict;
use warnings;

use vars qw(@ISA $VERSION);
$VERSION = qw($Revision: 1.23 $)[1];

use Kernel::Config::Defaults;
push (@ISA, 'Kernel::Config::Defaults');

# -----------------------------------------------------#

1;
OTRS Ver. 3.1.3 on Ubuntu 10.04 with MySQL database 5.1.49
Post Reply