Sync Customers from LDAP to DB, not using customer.pl

Moderator: crythias

Locked
antsar
Znuny newbie
Posts: 3
Joined: 27 Dec 2012, 23:45
Znuny Version: 3.1.8
Real Name: Anton Sarukhanov
Company: Rutgers, The State Univesity of New Jersey

Sync Customers from LDAP to DB, not using customer.pl

Post by antsar »

Hello OtterHub,

I'd be immensely grateful to anyone who can answer this question. I've spent the last two hours searching for an answer to no avail, so I apologize if it is already elsewhere on the forums/web.

I have already managed to get functioning LDAP authentication for both Customers and Agents, as well as using LDAP as a backend for Customer Lookup in the Agent interface. The problem is many of our users do not have accurate phone numbers listed in LDAP, so our Help Desk records a contact number for every call taken. Our current solution (which we are looking to replace with OTRS) solves this by searching LDAP for users, but requiring the user to be "added" to its internal DB before creating any tickets. In this process, Agents update the contact number and email, and save the correct set of data into the internal user database. The LDAP directory is HUGE and the majority of users will never need to contact the Help Desk, so I'd like to avoid having to clone/duplicate the entire thing into OTRS (the directory also gets updated at least once a day with new people). I also would not be able to write to the LDAP cluster even if there was a way to make OTRS do it, so updating the contact info there directly isn't possible either.

Many of these users will make their initial support requests by phone, so syncing their profiles from LDAP to OTRS upon login to customer.pl would also not be a great solution.

I'm sure someone somewhere must have faced a similar scenario, but I was surprised to find no answers online (or my Google-fu has been off).

EDIT: Some additional info: I'm running OTRS version 3.1.8. I'm also comfortable reading/tweaking code, so if anyone knows what changes I'd have to make and what the best way to go about it is, that would also be very helpful. Thanks, in advance, to anyone who has any advice.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Sync Customers from LDAP to DB, not using customer.pl

Post by crythias »

Please present your request in the form of a question.

so far, I understand you are able to authenticate ldap.
Your helpdesk records a phone number
You search ldap and add to the db for users ... I guess manually
You'd like to Sync customers from LDAP to DB (so your title says) but you don't want to do that because "I'd like to avoid having to clone duplicate the entire thing into OTRS"
You don't want to reverse write to LDAP.

... eh.. so what do you want to do?
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
antsar
Znuny newbie
Posts: 3
Joined: 27 Dec 2012, 23:45
Znuny Version: 3.1.8
Real Name: Anton Sarukhanov
Company: Rutgers, The State Univesity of New Jersey

Re: Sync Customers from LDAP to DB, not using customer.pl

Post by antsar »

Sorry, I'll try harder this time :)

I'd like to use LDAP as my primary source of customer data, but to be able to save additional info in OTRS about those same customers since I can't write to LDAP. I am OK with copying the customer into OTRS (just can't do this with the entire LDAP directory because its HUGE and most of those people will never call for support), but this needs to happen on a customer-by-customer basis, and from the Agent interface rather than by having the user login at customer.pl.

EDIT: I'll also clarify what our current solution is exactly, maybe it'll be helpful. Currently when someone calls in we use our ticketing system's search feature, which first looks in the internal DB and if the user isn't found finds them in LDAP and presents the same results except with an additional "Add to System" button which, when clicked, copies the customer from LDAP to the DB and allows us to make tickets for the user. Ideally this would be streamlined to happen automatically when the a ticket is created for the customer instead of having to "add" them first, but I can live without that.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Sync Customers from LDAP to DB, not using customer.pl

Post by crythias »

1) On occasion, I'll use a Ticket DynamicField to hold the current ticket's Phone number/Contact information. This seems to be sufficient for most purposes.
2) you may wish to prepopulate using otrs/scripts/tools/sync-ldap2db.pl
This script must be edited for your needs, as the script itself has internally hard coded values.

"But I don't want to do everyone"
so use an LDAPFilter.

One potential filter you may use is based upon whenChanged. See this.

in this manner, you may, in theory, schedule this ldap sync "daily" (say, at 11:59p) for changed "today".
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
antsar
Znuny newbie
Posts: 3
Joined: 27 Dec 2012, 23:45
Znuny Version: 3.1.8
Real Name: Anton Sarukhanov
Company: Rutgers, The State Univesity of New Jersey

Re: Sync Customers from LDAP to DB, not using customer.pl

Post by antsar »

Thanks crythias. I'll look into those options.
Locked