Lync/Skype4B Timed Presence Switcher

I have been meaning to figure out how I can use the Lync client SDK for a while now, and finally got the push I needed when a colleague of mine asked if Lync had a particular feature. That feature was the ability to set presence and personal notes based on the time of day. This wasn’t the only time I had heard that request, so thought I would make it a challenge to get me motivated!! Starting with my 2nd .Net/C# programming attempt, Customer Support Tool, I set out to add the requested functionality. At first there was lots of hair pulling (common throughout many of my IT side projects) while I tried to figure out how to use the Lync SDK. Thankfully another colleague of ours is a .Net developer, and was extremely helpful in getting me to where I am today! Anyway after a bunch of late nights I have a beta version to release in to the wild. The underlying application is stable, however I have only completed limited testing with the presence switching capability.

To make my life simple I will attempt to replace the words Lync or Skype for Business with UC Client. i.e. UC Client = Lync/Skype4B

Right, so before you kick off it would pay to first read up on the Customer Support Tool. This tool started as a way to make it easier for your customers to reach you, but now seems to be morphing in a direction focused on UC. I have a lot of ideas for this application, and not enough time! My vision is to build in functionality to extend the features of the UC client, improve user adoption by delivering managed learning, improve customer satisfaction and make administration of non-domain joined machines easier. In this article I will only discuss the functionality that has been added or changed for this application; ultimately the Customer Support Tool will be re-branded to reflect the change in focus – UC Extend is top of my list to date, but I’m open to feedback 🙂

Settings

The application settings file can be found at the below location. Majority of the settings can only be accessed by directly editing the Settings.xml file, however I am slowing moving some of this in to the settings menu.

XML Settings File
%LOCALAPPDATA%Andrew MorpethCustomer Support ToolSettings.xml

Settings Menu
Some settings can also be accessed from application settings by right clicking the task tray icon and selecting “Settings”:

You will be presented with the following settings window which pretty much exclusively relates to timed presence switching. As mentioned above, the ultimate goal is to have most, if not all settings available here.

The first 5 time of day options are processed from top down, with the last enabled and active time period being of higher precedence i.e if 2 time periods overlap and are both enabled, the one lower down the list take precedence. The application will only attempt to set presence once per day or when settings are updated. I figure it would annoy people if the application where to override a user initiated presence change, however I am considering a “force presence” option. Let me know what you think on this!

Set Me As options are processed in addition to the above mentioned settings and will always override the time of day settings for the period they are active. Currently both of these options revert presence back to “Available” when the conditions are no longer met and nothing else is active, however I am working on caching the previous state.

Ignore the Unanswered Calls stuff for now, but you get where I am going with that 🙂

Logs

Logging is currently VERY limited but you may find something helpful to troubleshoot issues if luck is on your side 🙂

%LOCALAPPDATA%Andrew MorpethCustomer Support ToolLogs

Requirements

  • Windows Vista+ (only tested on 8.1)
  • Lync 2013 or Skype for Business client (untested on Lync 2010)
  • .Net 4.5

Known Issues

  • Time durations that span days are not correctly matching e.g. 11pm – 1am (urgent – will be resolved in next build)
  • Set Me As options revert presence to “Available” when conditions are no longer met, this will be resolved in a later build
  • If the UC client is not started when the application starts, it will need to be restarted to successfully get a handle to the UC client (resolved in 1.4.5)
  • Sign-in/Sign-out button does not sign-in (resolved in 1.4.8)
  • Set Me As limited to 100 seconds (resolved in 1.4.8)
  • Some error conditions are not yet catered for and may cause the application to crash
  • Settings and input data validation
  • Not tested on Lync 2010
  • Process can be run multiple times
  • Switching profiles may break the handle on the Lync client

Feature Requests

  • Centralised management of application config
  • Managed content delivery, initially for the purpose of training
  • Presence override mode
  • Build out separate app which only includes presence switching function?
  • Add custom presence states to drop down list
  • Add option to run application after install
  • Add saved settings confirmation
  • Access settings directly from the UC Client
  • Improve logging
  • Separate user and application settings

Download

 
I am very keen to here your feedback! Please leave comments, feedback, feature requests and requests for assistance below.
Andrew Morpeth
Andrew Morpethhttps://ucgeek.co/author/amorpeth/
Andrew is a Modern Workplace Consultant specialising in Microsoft technologies based in Auckland, New Zealand; Andrew is a Director and Professional Services Manager at Lucidity Cloud Services and a Microsoft MVP.

Related Articles

6 COMMENTS

  1. Mate – glad to have been instrumental in motivating you to complete this!! I can finally be available from 7am-7pm and appear away outside of these hours… a simple automation request ; )

    Big fan of your work!

    Simon B

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Andrew Morpeth
Andrew Morpethhttps://ucgeek.co/author/amorpeth/
Andrew is a Modern Workplace Consultant specialising in Microsoft technologies based in Auckland, New Zealand; Andrew is a Director and Professional Services Manager at Lucidity Cloud Services and a Microsoft MVP.

Latest Articles