This week I have tested to import knowledge into Service Manager. Knowledge can be used for example as guides in the self service portal for end-users, system documentation for engineers or troubleshooting guides for service desk personnel. One of the ways to get knowledge into Service Manager is to use the CSV import feature. The CSV import feature allows you to bulk-import instances of any class type or projection type defined in the Service Manager Configuration Management Database (SMCMDB). More info about CSV import here.
I started to map the labels on the knowledge form with properties of the knowledge class. When you use the CSV import feature you have one XML file with the properties that you will write data to and in which order they are, then you have a CSV file with the data itself.
|Status||Status (top left corner of the form)|
|Tag||Flag article as|
|VendorArticleID||did not find this one|
|ExternalURLSource||did not find this one|
There are a couple of fields where you cant use normal display values, for example the status property, when you import knowledge articles you cant use “Draft” you will have to use “10F171DF-3AB1-648D-D151-D83A5171DD7B” in the CSV file. That is because the knowledge form use StringIds then there is a “translation table” in the database to translate the string into the correct work and language. So how do you get hold of these values?
They are all in the LocalizedText table in the Service Manager database. For example to get the StringID for draft status you can run the following query
FROM [ServiceManager].[dbo].[LocalizedText] WHERE ElementName LIKE '%knowledge%status%draft%'
It will give you a result like this
As you can see there are different values for different languages. When you need to get StringIds for your values you will need to check in this table. During my test I found that you need to do this for status, tag and category.
There are two other intresting properties, AnalystContent and EndUserContent. When you use these two with the CSV import feature is looking for files in the C:\Program Files\Microsoft System Center\Service Manager 2010 folder (default path). The content in these two files will be uploaded to the corresponding text field in the knowledge article form.
The following is a example of a CSV file and a XML file I used to import a knowledge article. If you save them to a folder and import them into Service Manager you will get a new knowledge article with some guidelines in each text field, so you easy can identify where to put your text.
and the XML file used with the CSV file
Travis Wright in the Service Manager product team has written a good post with more info about this.