Twitter 2.0 for the Public Sector

I’ve commented numerous times in the past about public sector organizations using Twitter.

By and large, the use of Twitter by the public sector is unidirectional – from Government to citizen. This isn’t a bad thing – microblogging services like Twitter can be used to notify citizens of all kinds of useful things; traffic delays, school closures, emergency notifications, amber alerts, etc.

However, a growing number of private sector organizations are beginning to use Twitter in a bidirectional manner, interacting with individual customers to resolve problems. I’ve blogged before about Comcast Customer Service on Twitter – the NY Times now has an interesting piece about Bank of America’s use of Twitter. These companies join Starbucks, Southwest Airlines and others using Twitter to interact with individual customers.

So it seems logical to start asking questions about when governments will start to use Twitter as a way of interacting with individual citizens. I’m not aware of any governments doing this yet, even though a growing number are using Twitter to push information out to citizens. But in light of the financial challenges facing state and local governments, this might be an effective way to provide enhanced customer service without laying out huge bucks for new IT systems or hiring and training staff.

Thinking about how this could work for governments, it seems like hashtags would be an ideal mechanism for achieving this. In my home state of Delaware, the primary entry point for a large volume of citizen interactions with state government is through the Delaware Helpline. The Helpline maintains a staff of people to support phone lines that take calls from citizens with questions or problems.

Enabling citizen interaction with the Delaware Helpline via Twitter would be as easy as directing people to add the hashtag #DEHelp (or something similar) to their Tweets:

Where can I get tax forms to pay my 2008 personal income taxes? #DEHelp

What are the hours for DMV to get a car inspected? #DEHelp

Looking for some #DEHelp. Where do I bring my Christmas tree to recycle it?

Using the Twitter API (or popular tools like TweetDeck, Twhirl, etc.) would make aggregating and tracking #DEHelp Tweets easy.

The old adage about the adoption of new technology holds that there is a significant lag between private sector adoption of new technology and public sector adoption of the same technology. The growing number of public sector organizations using microblogging tools like Twitter appears to challenge this long held belief.

Perhaps public sector use of Twitter and other microblogging sites to interact with citizens is also not far behind…


Learning to Cook… From a Cell Phone

It’s not easy to find someone more obsessed with phones than me.

Still, even I was somewhat surprised to learn how important cell phones have become in the kitchen:

It has become the kitchen tool of choice for chefs and home cooks. They use it to keep grocery lists, find recipes, photograph their handiwork, look up the names of French cheeses, set timers for steak and soft-boiled eggs, and convert European or English measurements to American ones.

“It taught me to cook, really,” said Kelli Howell, a college sophomore in Chicago, of her Nokia phone.

Maybe that’s why everything I cook is so bad. I haven’t been using my phone. 😉

Extension Methods vs. Prototype

I had my first exposure recently to extension methods in C# (which I am still relatively new to):

Extension methods enable you to “add” methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type. Extension methods are a special kind of static method, but they are called as if they were instance methods on the extended type. For client code written in C#…there is no apparent difference between calling an extension method and the methods that are actually defined in a type.

This makes it easy to add functionality to existing types — this comes in pretty handy if you find yourself doing the same thing a number of times in your code. A good example of extension methods in action can be found here.

I use a similar approach to format telephone numbers for readback in TTS when I need to render VoiceXML using C#/ASP.NET. So, if I have a string representing a telephone number, it may be formatted as 555-111-3333, or (555) 111-3333, or 555.111.3333, etc. When I render a phone number in VoiceXML (using the SSML <say-as> tag) I like to use a string of numbers only, no special delimiters or other characters, to ensure it is read out properly by the TTS engine. Extension methods can help with this.

C# example:

public static class StringExtensionsClass
        public static string GetOnlyNumbers(this string s)
            MatchCollection col = Regex.Matches(s, "[0-9]");
            StringBuilder sb = new StringBuilder();
            foreach (Match m in col) 
            return sb.ToString();

In ASP.NET, you would invoke this extension method as if it were a built in method of String:

string telephoneString = "(555) 111-3333";
Response.Write("<say -as interpret-as="telephone">" + telephoneString.GetOnlyNumbers() + "</say-as>");

Extension methods remind me a lot of the prototype-based approach of extending classes in JavaScript.

JavaScript example:

String.prototype.getNumbersOnly = function()
var mySplitString = this.split("");
var myMatch = new RegExp("[0-9]");
var myNumberString = "";
  for(var i=0; i<mysplitstring.length; i++) {
    if(myMatch.test(mySplitString[i])) {
      myNumberString += mySplitString[i];
return myNumberString;

In your VoiceXML code, you would invoke this custom method of the JavaScript String Object like this:

<var name="telephoneString" expr="'(555) 111-3333'"/>
<say -as interpret-as="telephone"><value expr="telephoneString.getNumbersOnly()"/></say-as>

So, whether you need to modify your phone number string in your server-side code, or in your client-side code this approach can make the job easy and consistent.

Using Twitter to Respond to Natural Disasters

Dan York of Voxeo has posted a great interview with Martin Murray of Public Service of New Hampshire (PSNH) detailing the utility’s response to an ice storm last month that knocked out power to a significant number of customers.

PSNH is New Hampshire’s largest electric utility, serving more than 490,000 homes and businesses throughout the state. The utility made extensive use of Twitter, YouTube and other social networking tools during the recent ice storm to provide information to customers impacted by the storm. This is yet another example of a creative use of social networking tools by a utility company.

Governments take heed! In some parts of the country (including my home state of Delaware) local governments are also the local utility company. But more than that, the creative use of social networking tools by PSNH should stand as an example of the different ways governments can improve their communications with citizens using these tools.

What a great service it would be to find out how long the wait is at the local DMV, or to find out how long the wait in the automobile inspection lanes are via Twitter. Or how about getting Tweets when trash or recycling picks up change because of a holiday?

There is enormous potential for improving the interactions between citizens and their governments using these tools. Time for more governments to get with it

Wireless Carriers to Sing Inaugural Blues?

Interesting piece in the New York Times this morning about the steps being taken by wireless carriers to prepare for the inauguration. The industry is expecting throngs of young, text messaging, picture sending, status updating supporters of Barack Obama to show up and use wireless services at unprecedented levels:
Cell Tower in DC

The largest cellphone carriers, fearful that a communicative citizenry will overwhelm their networks, have taken the unusual step of asking people to limit their phone calls and to delay sending photos. The carriers are also spending millions of dollars to temporarily and substantially upgrade their networks in Washington.

It will be interesting to see how their last minute efforts to shore up their networks in the Washington DC area hold up to the anticipated volume.

Also expected to be hammered during the inaugural: Twitter, Facebook and Flickr. Should be an interesting day!

Customizing Caller ID with CiviCRM and trixbox

Recently, I had an opportunity to set up a CiviCRM site for a client to use to track contributors.

I think CiviCRM is a great piece of software that can be enormously useful to non-profit organizations, and I’m actually surprised that more don’t opt to use it. It’s powerful, robust, extensible and open source.

The site I set up is running a Red Hat-based LAMP stack with Drupal, CiviCRM and the CiviContribute module. I have the same set up mirrored in a local development environment that lets me test tweaks and upgrades to the site before they get pushed out into production. I also have an instance of trixbox CE running locally, and I decided to try and see if I could set up a trixbox PBX that uses CiviCRM as the data source for looking up caller information on inbound calls. This way, if a non-profit is using both CiviCRM and trixbox they could set their PBX to look up information about clients, donors, volunteers, etc. that call their offices and display this information in either a SIP client or in a screen pop.

The process of setting up trixbox to use CiviCRM as the data source for caller ID lookups couldn’t be easier (note, I used these steps on trixbox version

  1. Log into your trixbox and enter admin mode.
  2. From the toolbar, select PBX >> PBX Settings.
  3. From the FreePBX left-hand side menu (under “Inbound Call Control”), select CallerID Lookup Sources
  4. In the section entitled “Add Source”, enter the Source Description (CiviCRM), and Source Type (MySQL). Using Cache Results will cache the CID lookup in AstDB. Depending on your own set up, you may or may not feel the need to enable this setting.
  5. In the section entitled “MySQL” (appears after you designate the Source Type), enter the Host, Database, Username and Password to access your CiviCRM database.
  6. The section entitled Query is where you will enter the SQL query that will return the information you want to display about on incoming calls. I used the following SQL (you can modify this as you like to alter your display information – note, the special token ‘[NUMBER]’ is replaced with the caller ID of the incoming call):

  7. SELECT CONCAT('CiviCRM: ',display_name) FROM civicrm_contact WHERE id = (SELECT id FROM civicrm_phone WHERE REPLACE(phone, '-', '') = SUBSTRING('[NUMBER]',-10))

  8. Click Submit Changes.
  9. Navigate to Inbound Routes (also under the “Inbound Call Control” section of the FreePBX menu).
  10. Select the route that you would like to use CiviCRM as the data source for.
  11. In the section entitled “CID Lookup Source”, select CiviCRM from the drop down menu.
  12. Click Submit.
  13. Scroll to the top of the page and click on the orange bar that says Apply Configuration Changes and reload the settings.

Thats it!

Now on an inbound call, the name of the CiviCRM contributor in the format CiviCRM: John Doe is displayed in my SIP client whenever a successful lookup occurs. There are all sorts of options that can now be used to display the caller information to non-profit staff, send a screen pop, route the call to a specific destination, etc.

CiviCRM and trixbox are a potent combination. I hope this brief explanation of how to use the two together gets more non-profits excited about using them.

Spread the Love

Is YouYube getting preferential treatment from governments?

Frederic Lardinois, of ReadWriteWeb, argues that when it comes to posting videos online governments should spread the love:

Lately, there has been a trend for government agencies and elected officials to put their videos up on YouTube. While we commend them for doing so, we can’t help but wonder if this is, in the end, a positive trend. After all, while YouTube is definitely the most popular video sharing site, it is definitely not the only one.

He’s right. I’ve made this same argument about governments using Twitter. There are other microblogging sites out there, and governments need to make sure that their use of new channels to communicate with citizens (whether through video or microblogging) is not targeted to one specific company.

Some might argue that using multiple video sharing or microblogging sites is just adding work. Don’t underpayed and overburdened public employees have enough to do?

If this is the argument, then I’d respond by saying that the use of these services should be automated — almost all of them (certainly any of them worth using) have an API that makes it easy to develop scripts or applications that can significantly cut down the time and effort required to post content. YouTube has one. So does Twitter.

Social networking platforms are becoming the norm for government communication and outreach. Its time for governments to get smart about their use of these services.

Automate your processes. Use the APIs. Spread the love.