Monday, January 9, 2012

IBM Connections Profiles & Company's Location

IBM Connections is a powerful social software for business that lets you access everyone in your professional network, including your colleagues, customers, and partners.
IBM Connections is based a several modules like Community, Blog, Wiki...

One of these modules, Profiles, helps you to quickly find the people you need by searching across your organization using tags to identify expertise, current projects, and responsibilities.
In some organizations, in addition to employee profile, it could be useful to include informations about company's locations like address, telephone numbers, but also to share informations or tips between employees about that location...

IBM Connections provides customization capabilities in order to implement that feature :
- Profile Types
- Custom Widgets
- Custom extension attributes for Profiles

Profile Types is usually used to define employee types like Contractor and display specific informations, disclaimers per profile types. For example, IBM has added a widget "Disclaimer" in all profiles of contractors.
For demo-purpose, I have defined a new Profile types named "Sites".
In my case, Profile types will be used to configure the layout of the main Profiles page and the layout of the widgets used in Profiles.

To enable multiple profile types, you need set the EMPLOYEE.PROF_TYPE database table column for each user. Otherwise the default profile type is used.



Page Layout and Widgets:

After that, you have to modify the widget layout of the Profile page. The strategy is to remove unnecessary widgets like "Things in Common", "Report-to-Chain", remove unnecessary fields in "Contact Information" and add new widgets like "Map" or "Foursquare".

In order to customize the widget layout, you have to modify the file widgets-config.xml, as explained in the url.

Personaly, I have also added two new widget definition :
<widgetDef defId="Map" url="{contextRoot}/widget-catalog/map.xml?version={version}" modes="view fullpage" />
<widgetDef defId="Foursquare" url="{contextRoot}/widget-catalog/foursquare.xml?version={version}" modes="view fullpage" />

I have created simple widgets. If you want to deepen your knowledge of iwidgets, check that url.
Widgets become more and more important, I strongly encourage you to improve your skills on Widget technology and especially on OpenSocial Widget (http://docs.opensocial.org/display/OS/Home)

And, I have also added a new "layout resourceSubType" named "Sites" as described in the below picture :



In that layout, I have specified the two new widgets (previously defined) : "Map" which displayed a google map of the location and "Foursquare" which displayed the Foursquare site of the location and commented widget instances of unnecessary widgets.

Custom fields in Profile:

The Profiles application provides a set of default attributes (telephone number, Job Title...). Because every organization's directory structure is unique, the Profiles application also provides the ability to add additional custom extension attributes.
In our situation, it could interesting to add additional fields to define specific information regarding company's location.

In my example, I have added a new field to define "Location Code". In the Profiles-config.xml, you have to enable that attribute as described here.

To define the extension attribute, add it to the <profileExtensionAttributes> element under <profileDataModels> as follows:



To display the extension attribute, you need to associate it with a profile type, in our case, the "Site" Profile Type.



To finalize the deployment of a new attribut, you have to create a properties file containing the strings as described here.



End-User perspective:

After all these modification, the result is :


Main Page of the Site "IBM Ecully" 

Google Map Widget 

Foursquare Widget 


Location Code