On Music and Using WCI as a Corporate Communication Tool

Portal by Brian Hak on April 8th, 2010 2 Comments

Since the age of 12 or so, I’ve had an on-going love affair with music. You know that scene in Almost Famous where William is going through the record collection his sister left him and is just blown away by the realization that all this music exists?

Yeah, I had one of those moments, except it was with my parents’ record collection, and the hippest LP they had was Bob Dylan’s Greatest Hits Vol. II. Still and all, I can remember exactly the time lying on my bed flipping through an Uncanny X-men, and listening to Bob Dylan’s scratchy voice on scratchy old vinyl: the windows were open, it was spring. Who knows, it’s entirely possible that I’m over-romanticizing the memory, but after that random afternoon, I was all about music. I took up the piano and guitar, with varying degrees of success, and did my best to find new songs to put on mix tapes for friends.

But that was all years ago. It’s rare that I play much music anymore, and when I do it usually involves breaking out the acoustic guitar much to the dismay of my wife and dog. These days I mostly stick to listening as often as practical and acting mildly condescending whenever the topic of music comes up with someone who isn’t “into it”. I do still look for new music and share it with friends though. It’s just that now I post links on Facebook instead of making a mix tape (which is a shame, making quality mix tapes is a lost art). In any case, as I was telling Facebook friends about the awesomeness that is the Clash’s cover of “Police and Thieves” the other day, I got to thinking about the power of one-to-many broadcast messaging systems, and how you can use your portal to broadcast corporate communications out to your staff.

The Clash – Police And Thieves

For instance, I was recently working with a client who needed everyone in their organization (14,000+ people) to sign-off on some compliance documents. Getting 14,000 people to do anything is tough…so how would you approach the problem? If you’re like most people, you probably start by sending out an e-mail to all-employees@mycompany.com and ask them to fill out some PDF document, digitally sign it, and then return via e-mail.  Shortly after hitting “send”, when 300 or so digitally signed PDFs hit your inbox, and you’re getting dangerously close to your mail quota, you likely get to thinking…”hmm….how am I going to track compliance, do I really want to manage this through e-mail and a big ol’ spreadsheet?” Then, after some more time passes, you realize that you really aren’t getting the response you’d hoped for, and that 70%+ of the workforce appears to have completely ignored your e-mail.

Time for plan B.

Enter your trusty intranet portal. Let’s assume that you have a relatively mature portal deployment that’s widely adopted as an employee intranet. The customer I was working with in this case, for instance, sets their portal as the default homepage for all employee browsers. As such, we know that the portal homepage gets very heavy traffic. Why not leverage all the eyes that are on that homepage to broadcast an important piece of corporate communication? And while we’re at it, why not just build a simple portlet that lets folks upload their signed documents, and enables management to run compliance reports? Sounds like a recipe for a pretty good portal use case. Let’s break down the components of the solution:

  • A reminder to non-compliant users that they need to upload a digitally signed document
  • A tool that allows users to upload completed documents
  • A tool that allows management to run compliance reports

In this post, I’m just going to dig into the details of implementing a user reminder, because it’s most relevant to the topic of using the Portal as a corporate communications tool.  Before we get wrapped up in actual implementation details though, let’s take a minute to consider why the portal is a particularly well-suited solution to this problem:

  • We have a destination that most/all employees visit regularly, so we know our message will get in front of the target audience
  • If we wanted to, we could target our message as specific groups of users (only HR employees, or just the Sales Team, for example)
  • By using portlet preferences, we can make sure a reminder is only displayed to employees who have not complied with our message
  • Users are authenticated into the portal. This makes it easy for us to:
    • Associate uploaded files with a particular employee
    • Know who has viewed our message and did not comply with the request
    • Know who has viewed our message and did comply with the request
    • Know how many times users view the message on average before they comply

Okey Dokey, now we know what we need to build, and we’ve convinced the people that need convincing that it makes sense to use the portal for the project, let’s dive get down to the nitty gritty implementation details.

Implementing A Reminder For Non-compliant Users
Look, I hate pop-ups as much as the next guy, but they have their place. And using a pop-up to nag people who haven’t acted on our company wide request seems fair enough.  So let’s look at implementing a modal pop-up window on the portal homepage. If you want to go all low-rent in your approach to the reminder, you could just add a little Javascript to your portal header like so and be done with it:

<script type=”text/javascript”>
var redirect = confirm(“Howdy.  You might need to sign a document and upload. Go do it now?”);
if(redirect)
window.open(“http://some.portal.url”);
</script>
The result is something like this:
Not too pretty,  and doesn’t give us a way to track who’s seen our message and who hasn’t.  And besides,  those old Javascript pop-ups are so 1998.  How about a more elegant approach that uses a Javascript library?  There are a ton of libraries you can use to do a modal screen overlay, pick your favorite.  Here at Function1, we like extJs, so that’s what I’ll use for this example.  Basically, we just want a pretty screen overlay that displays our message to users.  Something like this:
Looking better, but we still don’t have a way to track who’s clicked through to comply with our message and who’s ignoring our request.  And we can’t yet figure out how to display our pop-up to just non-compliant users.  So how about if we wrap this pop-up in a portlet?  Then we can use portlet preferences to keep track of who’s clicked through to comply, who’s ignoring the message, and who’s asked to be reminded later.  Logically, our portlet should work as follows when figuring out when to display the pop-up message:
The trick now is to set a portlet preference based on how the user responds to our message.  Keep in mind that our pop-up is all Javascript driven (i.e. client-side logic), and we need to get back to the server in order to set a preference.  How do you figure we might accomplish such a feat?  With our friend AJAX of course.  ExtJS, and any other Javascript library worth it’s salt, provides a nice wrapper around XmlHttpRequest that makes it easy for us to do inline HTTP GETS/POSTS without having to refresh the entire portal page.  So what if we just make an AJAX post to a JSP that sets a portlet preference for us based on the users response to our message?  The logic would flow something like this:
OK, now we’re getting somewhere.  We now have the mechanisms in place to:
  • Display a pretty pop-up for our message
  • Log user response so management can report on it later
  • Set a flag (via portlet preference) that determines when to display our pop-up

The only thing left to do at this point is to include some logic in our portlet to check the portlet preference, and decide when to show the pop-up reminder. Here’s a simplified version of the code that you might include in your portlet:

<%

//Get a handle to the portlet context so we can check preferences

IPortletContext portletContext = PortletContextFactory.createPortletContext(request, response);

IPortletRequest portletRequest = portletContext.getRequest();

IPortletResponse portletResponse = portletContext.getResponse();

boolean showPopup = false;

//read the preference and decide whether we should show pop-up or not

String showPopupString =  portletRequest.getSettingValue(SettingType.Portlet, “showPopup”);

if(showPopupString != null && showPopupString.equalsIgnoreCase(“true”))

{

showPopup = true;

}

if(showPopup)

{

%>

<!– Javascript code to show pop-up here –>

<%

}

%>

And, viola, we’re done!  According to WordPress, it only took me 1315 words to explain how and why you might want to use a pop-up in your portal.  Let me now try to summarize a bit more succinctly, in the form of a Haiku:

Portal has many eyes.

Perfect for message broadcast,

and compliance stats.

I know, I’m a pretty good poet right?  I’m embarrassed to tell you how long it took for me to be sure that “compliance” was a three syllable word, so I won’t.  In any case, if you’re interested in tinkering around with this example, first go download extJS 3.2.0 and then grab the portlet code here:

  • popupPortlet.jsp – This is your portlet that displays the pop-up message and contains display logic.  Set your WebService to point at this file.
  • ignore.jsp – This page just sets a portlet preference in response to an AJAX post
  • later.jsp – This page just sets a portlet preference in response to an AJAX post
  • myApp.jsp – This is a place-holder page that sets a portlet preference and would presumably contain the application you want users to step through.

And that’s just about a wrap.  One more thing though.  Remember that customer I told you about earlier who had to get 14,000+ employees to comply with a company wide request?  Well, they started out managing the request process via e-mail, and after many weeks of repeated e-mails, their compliance was at about 15% of the workforce.  After we implemented the portal pop-up reminder, compliance jumped to 60%+ within 4 days.  Not too shabby.

Bah, I can’t resist putting up one more MP3 for you guys.  I’ve never been a huge rap fan, but you can’t deny good hip hop.  Enjoy this mash-up that let’s me pretend to have some indie rock cred while blasting the song that made Biggie a household name:

Notorious B.I.G vs. The XX – Juicy

Tags: , ,

2 Responses to “On Music and Using WCI as a Corporate Communication Tool”

  1. geoffgarcia says:

    Great article.
    I know it isn’t rocket science to develop, but I bet if you built out this full solution (popup portlet, data acquisition/back end, reporting) that you could sell a few of these as a product.

  2. Brian Hak says:

    Thanks for the kind words Geoff, and thanks for the suggestion. We’re already working on a project under the working title of “Form Builder” that will eventually be a Studio replacement, and will provide the data capture/reporting you mentioned. Tying in a pop-up option would be easy enough, so we’ll look into it. Know anybody who might be interested in such a tool? :)

Leave a Reply

You must be logged in to post a comment.