Customer contacts database with Drupal

Posted: April 16, 2010 in Technology
Tags:

I got the idea for this project as a result of a freelance job my wife recently completed. She conducted telephone interviews of customers of an instrumentation manufacturer based in Europe. The customers were in Thailand and as a native Thai speaker and local she was hired to do the surveys. A list of customer contacts was sent to her and she began calling. And what she found was that around 40% of the contacts were bad – the person had left the company, their number had changed, or the number was not in service. This reminded me of my personal experience at a field sales office where I used to work.

Each year we had the dreaded customer database update exercise. It was a terrible pain. The first couple years it was done by emailing around Excel spreasheets to all of the regional offices. What a mess trying to do revision control and maintain consistency when more than one office had the same contact. Later the customer contacts were maintained in the company’s enormous SAP-like database. To get the customer contact list out and to put updates in meant going through the database programmers. It was awful. The end result was similar to my wife’s experience. The customer contact database was full of errors and often out of date.

Back then we all used to get beat up by management for being lazy or not paying attention to details. It wasn’t about that. It was just such a pain to keep the contacts up to date using the company tools. All the sales managers had up to date information in their laptops and PDAs. What was needed was a globally accessible contacts management tool that was simple and easy to use. Yes, I know there is commercially available software for that and it is probably worth the gignormous price for a large company like that one where I was working. But I’m rolling my own because it isn’t really so complex, it can be developed for next to nothing, and it is pretty fun.

And after some research I decided to go with Drupal. My first stop is always WordPress because of how easy it is to install and setup. But after searching for hours I could not find a plugin or hack that would enable me to do something that is very important to this project. Maybe I missed something but I can’t find a way to do it with WordPress while it is a snap with Drupal.

The requirement is that I need fine grain access control over each contact record, giving read or edit permission for each record based on the user’s role. For example, the CEO can access and edit all records while Region 1 Sales Director can access all records but edit only Region 1 records and Region 1 Sales Manager can access and edit only Region 1 records. Simple example but it demonstrates the point.

How can I do that in WordPress? I never figured it out. In Drupal it is pretty straightforward. Define roles for each of different positions who need access. Define a taxonomy with categories for each region. Create a new content type I call customer_contact that uses the new taxonomy. And then use a neat little plugin called Taxonomy Access Control to assign permissions for which role has what permissions for each category (region).

In use it goes like this: User logs in and if they have create/edit permission they create a new record, enter the contact’s information, and check one or more category boxes. Once the record is saved any other user with permission to access or update that record can do so. It is very simple to use and there should be no more excuses for the contacts database being out of date.

I’m still working on it and need to add a few features. I want to add a csv export and although I have found a way to do that with Views it is a feed that anybody can access. I need the csv export to only be accessible to logged in users and only export the records for which they have permission. So some work remains.

Advertisements
Comments
  1. waldenwebworks says:

    Hello! I found this post by doing a search for creating a contacts database in Drupal. I’ve visited the landing page of your customer contacts database site and it looks exactly like the kind of thing our organization could use!

    I’m wondering if you do contract work for setting something like this up for other organizations and/or if you would be willing to direct me to which modules need to be installed, etc. Thanks in advance for your help!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s