Home Community Uploads

Cireson Partners, Customers and Community members share your customizations and examples here to help benefit the community as a whole to earn Kudos and badges.


All files and projects located here are provided and come "as-is" and without any warranty or support. Use at your own risk. Your use of Community Uploads is subject to our Terms of Use.

Cireson does not and will not support or maintain these enhancements, extensions, and scripts.

For Team Cireson uploads click here.

Portal Grid Task - Enable "Instant Message Affected User"

Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
edited June 2017 in Community Uploads
I really liked @Martin_Blomgren's Assign to Me from Grid View and wanted to take this up a notch by adding the ability to Instant Message the Affected User from a Grid View.

This task is 99% Martin's code, but changes the name of some of his functions, updates to use the Skype icon, and adds the ability to perform this from My Work, Team Work, or Active Work views. With that said and done, this task simply builds a URL like task like "SIP: UserPrincipalName" to Grid Views as originally described by @Jerry_Veldhuis in his request. I'd ultimately like to address @Jonathan_Boles request as well, so I hope this at least gets that discussion started.

Finally, you'll notice 3 other icons in the directory. Call it future planning.


  • Adrian_MataiszAdrian_Mataisz Customer Advanced IT Monkey ✭✭✭
    Wow. Thanks, Adam. How can we also make a Task out of it?  You would IM a user more from the Work Items itself, not from the grid.
  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    I have that code written for Incidents and Service Requests. Will upload shortly to a v0.2
  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    edited May 2017
    New version attached which adds a Task on Incident and Service Request forms only when the Affected User exists on the Work Item.

    To @Adrian_Mataisz and other onlookers, my initial thoughts on placing this on the grid view was the following scenario:

    "I'm an analyst, I'm looking at all the work assigned to me or my team. I want to pick up an Incident but before even going into the Incident I want to know if the Affected User is available."

    It's this line of thinking that leads me to "I really need to get the javascript call to lync/skype on the local PC to pull the Affected User's status." Obviously, in the interim I'm just going with a static placeholder for the Skype/Lync icon.

    Finally, if you are leveraging @Martin_Blomgren's Hover Work Item task to get a quick glimpse of a work item assigned to a team member, it would further lend itself to work from the grid view on the portal.
  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    Still testing and hardcoded my own account into this. I was expecting to see all Affected User columns change simultaneously, however it only updates the first one (as seen below). Also the caveat to all of this is that it only works in Internet Explorer due to the need to leverage an ActiveX control to call the locally installed Skype/Lync. So the future development of this will mean other browsers would continue on seeing the Skype Logo instead of the Presence indicator. :(

    Also - Before anyone asks, Yes! This really does flip status when I change mine in Lync/Skype. No Photoshop here. If anyone thinks they can expedite this solution, let's get in touch!

  • Adrian_MataiszAdrian_Mataisz Customer Advanced IT Monkey ✭✭✭
    I hope you get it working Adam. I wish I could help. Thank you for your great effort.
  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    edited May 2017
    After a little research there appears to be a lot of discussion on updating multiple statues on a single HTML page, so needless to say it'll require some more investigation. Whichever the case, that means showing it for a single user should be relatively simple based on the above experience of mine. So building upon @Adrian_Mataisz's request, I've managed to get Presence working from a Work Item for the Affected User. Then, entirely leveraging @john_doyle 's code for Send Outlook Email to Affected user, I've modified it ever so slightly so Presence is established just to the right of the label for "Affected User", in this way it shouldn't interfere with his solution in the event you're using it.

    As mentioned previously, presence is established by leveraging an ActiveX control which means this solution will only work in Internet Explorer (but it's entirely possible there is another way to do this that I haven't stumbled across yet). So this new "(Skype)" link will still be present across browsers, but the Presence will be conditional.

    Given the new found position of this Skype link, having an associated Task on the right seems to make little sense (contextually speaking). So if no one minds, I was going to nix it in the next version of this. Would anyone be terribly hurt by this?
  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    Still working on this, but started leveraging the associated *.png instead of my temporary CSS border color seen above. Here's some screenshots between the Cireson Portal and my local Skype/Lync client.

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    edited May 2017

    It looks like the only way this could have been performed via Chrome (and the rest of the other browsers; this would include Edge I believe) has since been deprecated entirely (NPAPI plugins) as of 2013!

    As such, even attempting to load the plugins required just simply doesn't work. I really want to be wrong about this but if what I'm reading is correct, it would only stand to reason that Cireson probably doesn't have a high incentive to build a feature that would only work on a single browser as it would introduce the first contradiction to their SCSM Portal's selling points:

    • The portal works across all browsers leveraging HTML5

    So I think however awesome we find this little feature, it feels as though it would be the unfortunate first step in fragmenting the overall portal's agnostic browser approach. Again, assuming what I'm reading is true the only hope of this happening across all browsers is for Microsoft to update their code bases for Lync/Skype for Business so that they don't rely exclusively on ActiveX to call through a browser.

  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    I invite corrections from those more knowledgeable, but my understanding is that yes, the NameCtrl plug-in is dead, but are newer APIs (yes, plural) from Microsoft.  Pros: cross-browser compatibility.  Cons: You cannot use the OOB name card--you have to write your own if you want that functionality.

    Unified Communications Web API 2.0
    Skype Web SDK
    Skype for Business App SDK -- seems geared more toward enabling chat between customers and internal users (license considerations???)

    And others....  You have options, but they appear to need a little more work than the solution you were building off of.

    This is an AWESOME idea, so I hope that perhaps we can attack this as a group and make shorter work of it, now that you have a prototype out there for everyone to refer to.
  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
  • Kristoffer_StormarkKristoffer_Stormark Customer IT Monkey ✭
    Did you work more on this ? 
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    I implemented a small part of this in my dev environment after realizing how easy it is, and plan to roll it out.  Interacting with the SfB server to get presence, etc. requires a lot of work (on both sides) but opening the chat window is very simple:

    <a href="sip:[email protected]">Person's Name</a>

    You would need to write this link to the page somewhere, of course, replacing the "[email protected]" with this person's actual SIP address.  For me, I am writing their details to a toast notification already, so I just wrapped their name in a link that looks like this.

    I believe this only works if you have the SfB client installed locally, are using the same SfB environment as the person for whom you wish to open a chat window, etc.  If you use the portal on an internal company network, this is perfect.

    Using the UCWA mentioned above is still the right approach for getting presence and for traversing some of these boundaries.  I have not spent a single moment looking at this.  Maybe @Adam_Dzyacky has, while taking a break from making the PowerShell Exchange Connector more awesome?
  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    Ha... @Tom_Hendricks is mostly correct on his assumption. Within the last 2 weeks for reasons entirely related to the PS Exchange Connector I was re-visiting this addon.

    So to directly answer the question "did you work more on this?" - With whatever free time I've had, I have tried to improve on this. To Tom's observation, the work on both sides feels rather involved but I'm a bit stubborn on these kind of things so I'm still trying to get presence working in a grid view in an easily packageable way. That said, I unfortunately don't have something I could publish/share yet.
  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    Two updates. The second one I feel changes the direction of this somewhat entirely -

    1. Still struggling to get Presence working on Internet Explorer. While this single browser probably isn't our ideal endgame at the very least I just want to push the needle ever so slightly forward. Then again, it begs the question how bad do we collectively want this in that this will currently only work within Internet Explorer? Whichever the the case, here's an open ended dev question -
    • On the left in Chrome since the NameCtrl plugin can't be loaded, the static Skype icon is set. This preserves/mimics current v0.2 functionality.
    • On the right in Internet Explorer (development v0.3), for debugging I used a different colored Skype icon as proof that we are in fact iterating through the grid and dynamically setting the *.png for current status. However the issue is only a single contact's Lync status is returned.
    • In both cases, you can click the icon and open up a local IM window to that Affected User.
    What is interesting is if you sort the Affected User column (whited out in the screenshot), the nameCtrl.GetStatus() function shifts to pulling different Affected User's Presence based on the sort. Sometimes it's the first, the second, etc. What's more, this only occurs if the nameCtrl.onStatusChange() function receives no parameters. If you pass it the parameters as per MSFT documentation - a single status is pulled but it will always be "Offline." This makes me feel as though I'm overlooking some nuance of the NameCtrl and/or ActiveX itself.

    I'm hoping a fresh set of eyes may right me and in turn this function. If anyone is interested in taking a crack at this I'll gladly PM it to you.

    2. Microsoft announced this morning at Ignite 2017 that SfB will be getting phased out in favor of Teams. From what I can tell, no similar functions exist (yet) to establish presence via any type of Teams API. I don't think there is any date announced, just that SfB will be getting phased out in favor of Teams.
  • Kristoffer_StormarkKristoffer_Stormark Customer IT Monkey ✭
    @Adam_Dzyacky SfB to teams is slate to be completed by late 2018.

    But is rolling out to testers already 
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    One of the press releases indicated that SfB and Teams share the same infrastructure.  I am taking this with a grain of salt since that is one of the most detailed statements in the whole release, but that could mean good news for the API.
  • Jens_LüerJens_Lüer Partner IT Monkey ✭
    edited October 2017
    First of thank you very much for this custom script, it is exactly what we are looking for.
  • Steve_ClarkeSteve_Clarke Customer Adept IT Monkey ✭✭
    Hope you get this working. This would be really useful for us.
  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    Recently received several PMs about "Where is the version that puts the Skype link to the right of the Affected User?" When I do get a chance to come back and work on this, I'm so focused trying to understand how to get presence established on the grid views that I never published the version I cite in several screenshots from above! That said here it is and to recap previous versions to now -

    v0.3 does:
    • Skype icons on grid views
    • Skype link is established to the right of "Affected User" label on Incidents/Service Requests (new)
    • Skype Presence is established to the right of the aforementioned "(Skype)" link when using Internet Explorer (new)
    • The previously created IR/SR task has been removed in favor of the aforementioned new link (new)

    If you were on the webinar, this is the identical version seen there. This version also includes an expanded switch statement and additional icons if you're up to trying to tackle presence in grid views yourself.
  • Steve_ClarkeSteve_Clarke Customer Adept IT Monkey ✭✭
    Awesome stuff. Thanks for sharing Adam :smile:
  • Brian_WinterBrian_Winter Customer Advanced IT Monkey ✭✭✭
    Sweet!!  Now if only I could one-click copy the Skype conversation back to the Action Log! :wink:
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    For anyone running an org that the upn and sip account domains are different.
    Update line 125 for the grid link
    window.location.href = "sip:" + newData.RequestedWorkItem.UserName + "@domain.com"
  • Brad_McKennaBrad_McKenna Customer Advanced IT Monkey ✭✭✭
    edited January 2018
    Thought I would share an alternative for folks, modeled after Adam's v0.2, while adding in the hyperlinks from v0.3. In our environment, we wanted the hyperlinks without the presence (and no time to work toward development). Therefore we have these quick and easy hyperlinks added.

    Note, we also had to update our AddMailTo feature as the targeting was too general and was invoking the MailTo address when we clicked the Skype hyperlink.
    I added our changes to the AddMailTo thread: https://community.cireson.com/discussion/192/portal-tip-adding-an-email-link-for-the-affected-user-to-the-incident-form#latest

    Also...Nice job once again @Adam_Dzyacky!!!!!!!!! :)
  • Bryan_McCartneyBryan_McCartney Customer Adept IT Monkey ✭✭

    Are there any updates from the comment posted by @Adam_Dzyacky above?:

    2. Microsoft announced this morning at Ignite 2017 that SfB will be getting phased out in favor of Teams. From what I can tell, no similar functions exist (yet) to establish presence via any type of Teams API. I don't think there is any date announced, just that SfB will be getting phased out in favor of Teams.

    Our organization is already starting to move away from Skype in favor of Teams.

    Thanks in advance!

  • Brian_WinterBrian_Winter Customer Advanced IT Monkey ✭✭✭

    On the lines that have the "href = sip:", change it to :

    var instantMessageToSip = " <a href='https://teams.microsoft.com/l/chat/0/0?users=" + instantMessageTo + "' target='_blank'>" + "(Instant Message)" + "</a>";   

    where the "instantMessageTo" is the UPN.

  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭

    This was about displaying the user's presence, rather than sending messages, IIRC. UCWA might still be the way to go for that....?

Sign In or Register to comment.