HAM - Resource category on model category

Bhargav Kishore
Giga Contributor

How can we add map a resource category to the custom model category?

 

We have created few custom model categories and we know that asset actions (from change, incident), normalization works only if we opt in for a specific resource category. Just wanted to know how we can link model categories with resource category. The resource category field on the model category is read only.

5 REPLIES 5

Scott Halverso1
Mega Guru
Mega Guru

Short answer is you can't.  ServiceNow put an acl on the cmdb_model_category.resource_category that prevents anyone from creating or updating.  With a little ingenuity you could work around this impediment, but since it involves the pricing model for the HAMP product I'd submit a case to ServiceNow and see if there is a proper way to gain the functionality you are after with Asset Actions and Model Normalization.   

 

TLDR:

Check out the field called License Opt In on the Hardware Model table and then the Business Rule called Populate License Opt in.

From there you'll end up at a script include called HAMHardwareNormalizationEngine that is marked as protected to keep non-ServiceNow employees from seeing the magic.
From there the magic calls HAMUtils.getLicenseOptinStatusForModelCategoryList().  Which ServiceNow has deemed not secret intellectual property.  From there you'll see there is a field on the Model Category table called resource_category.

Which brings it full circle.  The HAM Resource Category table entries are related to Model Categories. Coming up from the Asset side of the house Assets are related to Models, Models are related to Model Categories.

 

find_real_file.png

bvlo
Tera Expert

I am experiencing the same issue. Bhargav how did you end up addressing this use case? 

Here is what our Asset Manager got back from HI support:

There is a field in the Model Categories called Parent Categories.

Selecting a HAM enabled existing category that you select as the parent of your custom category will allow its assets to use HAM functionality

Example:

1. Navigate to: HAM Resource Categories
Note not all of these categories can be used as a parent to enable HAM functionality
Printers and consumables are still eligible for HAM features, but they're children are not.
Only Resource Categories with Opt in = true will allow HAM functionality.

2. Navigate to a custom model category
Update the Parent Category to network gear or appropriate Resource Category
It is possible to have a tree of model categories
CustomCatA is child of CustomCatB is child of Network Gear.

As long as the final parent is HAM enabled it should recursively all the children.

3. Wait 24 hours there are scheduled jobs that will update the changes

4. Now check assets that are in those custom categories.


My understanding is this worked, however I did not implement the solution so I can't really speak to it. I do hope this helps. 

Oh, nice. I do see the parent is not set to the general "Network Equipment" model category, so I've made that change and see what happens tomorrow.