Live Feed – Person Tagging

Live Feed has a serious flaw compared to social networks like Yammer, and Facebook. You cannot currently use the @ symbol to “tag” someone. This update set is a first attempt at building this functionality into Dublin/Eureka.

ServiceNow People Tagging

Warnings

  • The user search currently is not guaranteed to respect ACLs or domain separation.
  • In order to implement this functionality, one key best practice was violated – DOM Manipulation. Service-Now as a rule should never be customized using JavaScript that uses html id’s, classes, and the like to be implemented. However, since the code to the live_feed is not customizable by users, JQuery was used to create the desired outcome.

Tested on

  1. Dublin + Google Chrome 32.0.1700.107
  2. Dublin + Firefox 27

Download Here

How It Works

From a User Perspective

  1. When using the Live Feed in the browser, a user can type “@” and then start typing a user’s first or last name.
  2. If the system finds some users, it displays them below the message box, and the user can click on one of the names to “tag” that user.
  3. Many users can be tagged in a single message.
  4. When a user is tagged, their user name will replace their name during message composition.
  5. Once submitted, the user’s name will once again replace the user name.
    1. Note: This switch, while confusing, is done to enforce unique tagging.
  6. If a user is tagged in a message, they will receive a notification with the message text and a link.

ServiceNow People Tagging #2

From a System Admin’s Perspective

  1. In the left hand navigation menu, there’s a hidden module called “Social Injection”.
    1. This item pulls in it’s own JQuery instance, and then uses that to monitor the primary frame and make the necessary modifications to the Live Feed.
  2. When the @ symbol occurs, AJAX queries are sent for every keypress, to look for users, until the query returns nothing – then it waits for a backspace event or another “@” symbol to start looking again.
  3. When a message is submitted, a before business rule handles swapping the user names back to the names and firing off an event, which triggers a notification.

ServiceNow People Tagging #3

Installation Instructions

  1. Import, Preview, and Commit the update set “2014-02-11 – Social Feed Enhancements v0.1- GG”.

Future Enhancements

  1. This functionality currently only works on the standard ITIL view with the left hand navigation showing.
    1. Would like to improve this to make it work from all views.
  1. Currently only works in the top message box.
    1. Would like to make this work in every reply box on the page.
  2. Test and certify in all Service-Now browsers.
  3. Test and certify on Berlin + Calgary.

ServiceNow People Tagging  Notification

Changes Involved

  1. Business Rules:
    1. “PeopleTagging”
      1. Contains the code to fire events/notifications after a user is tagged in a message.
  2. Application Menu Modules:
    1. Social IT -> Social Injection (hidden)
      1. Contains the client side code to enable the tagging functionality.
  3. Script Includes:
    1. “PeopleTag”
      1. Contains the server-side AJAX code to perform a user search and return the results to the browser.
  4. Events
    1. live_message_peopletag
      1. Fired once for every user tagged in a message. Triggers the notification.
  5. Notifications
    1. Live Message – Person Tagged
      1. Sends out an email notification alerting a user that they’ve been tagged in a Live Feed message.


Categories: Developers

Tags: , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

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

Facebook photo

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

Connecting to %s

%d bloggers like this: