Hi, I have a problem on the assignment of customer data from a second customer db. Sometimes a customer is several times in this db. It has the same basic data (name, title, ..., also multiple times with the same mail address) but different further data like a shop he is responsible for, and another, ... Every record has a unique id (not mail address). See structure below.
When there comes a ticket/mail of this (multiple existing) customer OTRS doesn't know which record to choose. This is ok for this case that the mail address is duplicated. Then the agent would choose the correct customer manually. If I take the unique id as CustomerKey the customer data will never be shown in ticket zoom (even if record/mail adress is unique in db). If I take email as CustomerKey the assignment is working on incomming tickets but if the agent searches for a different record of thsi customer he allways gets only one search result. Surely because OTRS takes CustomerKey as db primary key. The customer mySQL db looks like this (extract): # id, login, email, title, first_name, valid_id, shop, cluster, status '307880', 'i...@123.de', 'i...@123.de', NULL, 'Winrich', '1', '123.de', 'E', '21' '307881', 'mus...@abc.biz', 'mus...@abc.biz', NULL, 'Chris', '1', 'abc.biz', 'D', '21' '307884', 'mus...@567.com', 'mus...@567.com', NULL, 'Franziska', '1', ' 567890abc.de', 'E', '21' '307886', 'mus...@alpha-xyz.de', 'mus...@alpha-xyz.de', NULL, NULL, '1', ' musterurl.de', 'E', '21' '307887', 'kont...@alpha-xyz.de', 'kont...@alpha-xyz.de', NULL, NULL, '1', ' musterurl.de', 'E', '21' '307888', 'kont...@alpha-xyz.de', 'kont...@alpha-xyz.de', NULL, NULL, '1', ' musterurl-outlet.de', 'E', '21' The config looks like this (extract): $Self->{CustomerUser2} = { Name => 'ShopDB', Module => 'Kernel::System::CustomerUser::DB', Params => { DSN => 'DBI:mysql:database=otrs_customer_bla;host=localhost', User => 'isnich', Password => 'denkste', Table => 'customer', SourceCharset => 'utf-8', DestCharset => 'utf-8', CaseSensitive => 0, }, # customer unique id CustomerKey => 'id', # customer # CustomerID => 'id', CustomerValid => 'valid_id', CustomerUserListFields => ['first_name', 'last_name','shop', 'oracleid', 'email'], CustomerUserSearchFields => ['id', 'last_name', 'email', 'shop', 'oracleid', 'akquiseid'], CustomerUserSearchPrefix => '', CustomerUserSearchSuffix => '*', CustomerUserSearchListLimit => 250, CustomerUserPostMasterSearchFields => ['email'], CustomerUserNameFields => ['title','first_name','last_name'], 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 => 0, # # cache time to live in sec. - cache any database queries CustomerCompanySupport => 0, CacheTTL => 3600, # # 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 [ 'Shop', 'Shop', 'shop', 1, 0, 'var', '$Data{"ShopURL"}', 1 , "_blank"], [ 'ShopCluster', 'Shop-Cluster', 'cluster', 1, 1, 'var', '', 1 ], [ 'UserTechAccountManager','Tech Account Manager','tech_account_manager', 1, 0, 'var', '', 1 ], [ 'UserAccountManager', 'Account Manager','account_manager', 1, 0, 'var', '', 1 ], [ 'UserSalesManager', 'Sales Manager','sales_manager', 1, 0, 'var', '', 1 ], [ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 1 ], [ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var', '', 1 ], [ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', '', 1 ], [ 'UserLogin', 'Username', 'login', 0, 1, 'var', '', 1 ], # [ 'UserPassword', 'Password', 'pw', 0, 0, 'var', '', 0 ], [ 'UserEmail', 'Email', 'email', 0, 1, 'var', '', 1 ], [ 'ShopFax', 'Shop-Fax', 'shop_fax', 0, 0, 'var', '', 1 ], [ 'UserMobile', 'Mobile', 'mobile', 0, 0, 'var', '', 1 ], [ 'UserStreet', 'Street', 'street', 0, 0, 'var', '', 1 ], [ 'UserZip', 'Zip', 'zip', 0, 0, 'var', '', 1 ], [ 'UserCity', 'City', 'city', 0, 0, 'var', '', 1 ], [ 'UserCountry', 'Country', 'country', 0, 0, 'var', '', 1 ], [ 'UserComment', 'Comment', 'comments', 0, 0, 'var', '', 1 ], [ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 1 ], [ 'UserRole', 'Rolle', 'role', 1, 0, 'var', '', 1 ], ], # default selections Selections => { # UserTitle => { # 'Mr.' => 'Mr.', # 'Mrs.' => 'Mrs.', # }, }, }; So I need a way that on incoming mails the customer is identified (by mail address) but with the unique id as primary key and not the mail address. We use OTRS 3.3.6. Thanks, Stephan
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs