What if I told you.. you could make a direct link to a knowledge article that is attached to an Incident (or other workitems) and present it in an email template to a user.

Scenario:

 

1) The supporter gets a new Incident from an end-user:

IncidentForm

2) Instead of writing the same message over and over, he or she decides to attach a knowledge article related to the issue and send a little message along to the end-user:

IR-formWithKA

newmessage

3) The end-user then receives a new email triggered from the SendEmail worklfow

email

4) He can then click on the link and receive the knowledge article:

link

word

 

Requirements and limitations:

  • Service Manager Portal in use and reachable from the client computer
  • You can only attach 1 knowledge article for the link to work.
  • Knowledge articles you attach needs to be in published status

How to:

Basically all you need to know is how to make the URL to the knowledge article. You can then use that in any email template you like and in any kind of workflow.

The URL consists of a SMPortal URL and a GUID to the knowledge article

Find the URL to the portal:

Every knowledge article you publish can be found on the SMPortal. And the URL looks like this:

http://<yourservicemanagerportal>:<port>/ContentHost/ClientBin/KnowledgeArticleViewer.aspx?ArticleId=<GUID to KA>

Example:

http://servicemanager:8080/ContentHost/ClientBin/KnowledgeArticleViewer.aspx?ArticleId=1d8dc63c-eb92-d605-20a8-8a391a92a747

I have retrieved the url via a firefox extension called firebug. But alot of tools out there can probably do the same. This was needed as I couldn’t see urls via silverlight pages.

Find the GUID:

Now we just need to insert the GUID after the =.

The property is not available in the property selector, even though there are many candidates (About Config Item or Relates to Config Item etc.) But after some powershell digging via the get-scsmrelationshipclass cmdlet. I found the following relation:System.EntityLinksToKnowledgeDocument that is found in the System Knowledge Library management pack.

Entity is parent to the workitem class that is a parent to a troubleticket and parent to an incident. So you should be able to use the relation with all workitems and configitems.

The property then looks like this:

$Context/Path[Relationship=’CustomSystem_Knowledge_Library!System.EntityLinksToKnowledgeDocument’ TypeConstraint=’CustomSystem_Knowledge_Library!System.Knowledge.Article’]$?$Id$?

Where CustomSystem_Knowledge_Library refers to:

<Reference Alias="CustomSystem_Knowledge_Library">
 <ID>System.Knowledge.Library</ID> 
<Version>7.5.2905.0</Version> 
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>

This reference is needed. When you make the email template, you can select the following property from the property selector and then hit OK. This wil create the reference. You can then delete that property again and the reference still stays.

property

Source: Incident class

So here is the complete URL you need:

http://<yourservicemanagerportal>:<port>/ContentHost/ClientBin/KnowledgeArticleViewer.aspx?ArticleId=$Context/Path[Relationship=’CustomSystem_Knowledge_Library!System.EntityLinksToKnowledgeDocument’ TypeConstraint=’CustomSystem_Knowledge_Library!System.Knowledge.Article’]$?$Id$?

Example URL with Knowledge Article Title:

<a href="http://servicemanager:8080/ContentHost/ClientBin/KnowledgeArticleViewer.aspx?ArticleId=$Context/Path[Relationship=’CustomSystem_Knowledge_Library!System.EntityLinksToKnowledgeDocument’ TypeConstraint=’CustomSystem_Knowledge_Library!System.Knowledge.Article’]$?$Id$?">$Context/Path[Relationship=’CustomSystem_Knowledge_Library!System.EntityLinksToKnowledgeDocument’ TypeConstraint=’CustomSystem_Knowledge_Library!System.Knowledge.Article’]/Property[Type=’CustomSystem_Knowledge_Library!System.Knowledge.Article’]/Title$</a>

 

And that’s it. Please leave a comment or write me an email if you have any questions or issues regarding this.