Service Catalog: Automate CI selection/creation in a Catalog Task

General Add comments
by:

Having implemented Service-Now for several customers I noticed that quite often customers like the Service Catalog philosophy in Service Now. However some customers are missing some kind of intelligence when it comes down to ordering hardware (CIs). Imagine you’re a task performer/resolver. Somebody ordered a laptop and you would get a catalog task assigned to you. You probably begin with finding out which model is ordered. Then you would search for a CI that is in stock and when found, update its status to “Pending Installation” or “In Order”. If there is no stock you would probably manually create a new CI in the CMDB. In some cases a defined process could make your life a bit harder by having you create a change. Now let me show you how to make your life just a little bit easier J…..

Wouldn’t it be great if you could just click a button and a CI that is in stock is found and updated with the available information? Or when no stock is available an entry in the CMDB is created for you already?

Steps to perform:

  1. Remove the quantity field on the Catalog Item
  2. Add a reference variable
  3. Create a simple workflow on sc_req_item
  4. Make the product model table visible in the Configuration App
  5. Modify the product model table form
  6. Add number maintenance on CI tables
  7. Create UI Actions

Each step is detailed below.

To demonstrate this functionality I’m going to use the out of the box “Development Laptop” catalog item.

Remove the quantity field on the Catalog Item

Personalize the item (sc_cat_item) and personalize the form. Make the “No quantity” Boolean visible on the form and check it. Now the quantity is not available anymore, making sure that only one CI per requested item is used. A requested item can only handle one CI at a time (out of the box).

Add a reference variable

Add a variable with the type reference to the table model name [cmdb_model].

On the form it should look like this:

 

Create a simple workflow on sc_req_item

Create a simple and basic workflow on Request Item [sc_req_item]

Make your workflow look something like this:

 

Make the product model table visible in the Configuration App

Edit the configuration application:
Set the module “Product Models” active Boolean true.

The product model module should appear in the configuration item.

 

Modify the product model table form

Personalize the product model [cmdb_model] and place the CMDB CI Class field on the form.
Personalize the dictionary entry of the CMDB CI Class field:

Now you will see that the CMDB CI Class field contains the same classes as used in the CMDB_CI table.

Add number maintenance on CI tables

Make sure that number maintenance is set up for each table you will use. For now create an entry for cmdb_ci_computer. This is needed to populate the CIs and also to make sure that CI names are not the same.

Don’t forget to add a default value on the name field in the cmdb_ci table. The default value should be: javascript:getNextObjNumberPadded();

Create UI Actions

Create the UI action that searches for a suitable CI in stock.

Create the UI action that creates a new CI.

Do It Yourself

There is still one thing that needs to be done. It would be nice if the second catalog task marks the created/selected CI “Installed”.

Thoughts

Of course the description above is basic but is meant to help you on the way.
Things you might consider are:

  1. Use business rules instead of UI action to automate the “In stock” CI Selection and/or CI Creation. Or doing it in the workflow directly. The latter makes you more flexible.
  2. Combine UI actions into one for more automation. Keep in mind that you will have less control.

If you have any questions or comments, please don’t hesitate to contact me on: ritesh.autar@2e2.nl

Leave a Reply