Make Service Manager Customer-aware – Part 2

A while ago I have written an article about customizing Service Manager to make it customer-aware. This was just a simple example of how to assign incidents to different customers. Because this article was (and still is) very popular, I decided to write another one about customer-awareness. In this post I will show you how you can assign Configuration Items to customers which can be very important when you manage objects for several customers and different environments. I will show an example of assigning Windows Computer objects, but this can of course also be done with any CI Type.

First of all I have to create a new Management Pack and a new class that will store information about customers. I do this by using the Authoring Tool, create a new class and define some properties I need. For this example, I just defined two attributes, the Customer ID and the Customer Name, where the Customer ID is an autoincrementing key property. For a production environment, you can add more attributes as needed.

image

image

For more details about creating classes and attributes see this article –> http://blog.scsmfaq.ch/2011/01/24/make-service-manager-customer-aware/

For more details about automatically incrementing property values see this article –> http://blog.scsmfaq.ch/2011/06/04/autoincrement-property-ids/

Now, I have to create a new Relationship between the Customer Class and the Windows Computer class because I want to assign the Windows Computers to customers.

image

I call the new relationship “WindowsComputerBelongsToCustomer” and do some editing afterwards. I change the name to make it better readable and configure the relationship source and target – the source is the customer class, the target must be changed to “Windows Computer”. Because at the end a customer can own multiple Windows Computers, but a Windows Computer can only belong to one single customer, I have to change the cardinality (many-to-1/0).

image

image

Now as the data model is ready, I need to present the information on a form. Because we are talking about Windows Computers, the form “ComputerForm” has to be customized. The form can be found in the form browser of the Authoring Tool. Because this form is stored in a sealed Management Pack, an unsealed Management Pack must be chosen to save the customizations.

1. Search the form in the form browser.

image

2. View the form and customize it.

image

3. Select a Management Pack to store the form customizations.

image

Important: In this example I store classes, attributes and form customizations in the same Management Pack. For a production environment I would make more sense to separate the data model from the presentation layer. But this means that the Management Packs (at least one) has to be sealed because referencing to an unsealed Management Pack is not allowed.

Now, as I am able to change the Computer form, I have to put an Instance Picker to the form. I do this by adding an additional tab to the form and then place the control there. This is the easiest way to go because I don’t have to deal a lot with formating. Of course, it’s also possible to place the picker somewhere else.

1. Drag the “Tab Item” Control to the form. Make sure that the panel is marked before.

image

2. Show the details of the tab.

image

3. Change the color (not really needed) and content of the tab.

image

4. Switch over to the new tab, add a label and a single instance picker control.

image

5. Edit the label to change the content.

image

6. Edit the picker to change the data binding to the relationship property “WindowsComputerBelongsToCustomer”.

image

Done! After successfully importing the Management Pack, I create a new folder (called “Customer Information”) using the Service Manager Console and save it to the same Management Pack. This folder will be used for different views. The first view I create is the “All Customers” view wich will be used to create and view customer objects.

image

Now I’m gonna create some customer objects that are displayed in the new view.

image

The next view I create will show all Windows Computers that are not yet assigned to a customer. I select “Combination Classes” and choose the Type Projection that is stored in my Management Pack (called CustomForm_xxxxxx). Then i define the criteria so that only Windows Computers are displayed that to not have a value in the “WindowsComputerBelongsToCustomer” display name field.

image

This Type Projection was automatically generated by the Authoring Tool when I customized the computer form. The name of the Type Projection is not very good readable and makes not a lot of sense, so it would be good if it would be renamed directly in XML.

image

image

After successfully creating the view, I create a second view that shows all Windows Computers that are already assigned to a customer. The only thing that is different from the first view is the criteria.

image

Now I start assigning Windows Computers to customers (using the new tab) and check if they appear/disappear from the two views.

image

image

For the finish I want to do some cosmetics because both column names in the two views are “Display Name” which can be confusing. This can be changed directly in XML, so I export the Management Pack and search the view.

image

Both columns are referenced with an ID. If you check the ID in the LanguagePack part of the MP, you can rename the second “displayname” to “customer”.

image

After re-importing the Management Pack the view looks better.

image

With that I end this blog post, but I already have plans about other posts about making Service Manager customer-aware. This really seems to be a requirement for many companies and I will therefore invest more time in this.

regards
Marcel

This entry was posted in SCSM and tagged , , , , . Bookmark the permalink.

6 Responses to Make Service Manager Customer-aware – Part 2

  1. freemanru says:

    Some advertisment 🙂 For edit view (espessialy Display name of column) you can use advanced view editor

  2. Hi
    This indeed is a great tool. Thanks for the update.
    regards
    Marcel

  3. Anders Asp says:

    Hey Marcel,

    Nice post 🙂 What would the difference between this field and the custodian field be? Cause I always thought the custodian was the “owner” of the CI?

    Regards
    //Anders

    • Hey Anders

      Correct, I also tell my customers to use the custodian attribute for that – but OOB you can only assign User and Group CIs to that field. But there are times when you want to use SM for multiple customers and you might not have those CIs or just dont know who the “real” custodian (Person) is. For that, you could use the example I blogged about. If you already have customers in the CMDB, you could use the same customer objects for assigning all kinds of CIs (customer-aware configuration management) and if needed also WIs (e.g. Incidents). If needed, you could even give the customers access to the SM infrastructure. For that, you can group CIs (groups) and WIs (queues) and use those for defining granular controlled access by using user roles.

      Does that make sense? 🙂

      regards
      Marcel

  4. Olga says:

    Hi Marcel,
    I followed your instructions and got my “Customer aware” management pack. It went through importing to Service Manager. Everything worked fine… till I a closed the console. After re-opening there was no imported pack in the Service Manager. I tried importing several times: all the same. Do you have any ideas about how to fix the issue?

    Thank you, Olga

    • Hey Olga

      This is a strange behavior and has nothing to do with the MP itself. Try rebooting the Server, reimport again. After reimporting restart the console and you should be fine.

      Cheers
      Marcel

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s