Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

FSM – CI does not link to Asset, Affected CI / Configuration Item not auto-populated (custom CI clas

ItayB
Tera Contributor

Hi everyone,

I’m working on a Field Service Management requirement and I’d really appreciate some guidance to understand the correct / recommended configuration for CI–Asset relationships and how they drive behavior in Work Orders and Work Order Tasks.


Business requirement (why I need CI ↔ Asset)

The business request from the maintenance team is:

For every equipment type or system (CI / CI Category), we want to have a dedicated checklist that technicians must complete before they can close the task.
The checklist should be automatically loaded on the Work Order Task based on the equipment (Configuration Item / Asset), and the task cannot be completed until all mandatory checklist items are checked.

So in short:

  • Each CI / CI category has its own checklist.

  • When a Work Order Task is created for that CI/Asset, the matching checklist is attached automatically.

  • Technicians must complete the checklist before closing the task.

Because of this, it’s very important for me that:

  1. The CI is correctly linked to the Asset.

  2. The Affected CI on the Work Order is populated automatically.

  3. The Configuration Item field on the Work Order Task is also populated automatically – so I can drive the checklist logic from it.


Current technical setup

I’ll attach screenshots, but here is what I have:

  1. I created several custom CI classes that extend cmdb_ci (for example: u_cmdb_ci_generator, u_cmdb_ci_ups, etc.).

    • In the Tables list they show Extends table = Configuration Item.

    • They appear as CMDB classes (child of cmdb_ci).

  2. I also have corresponding Assets (alm_asset) for these CIs.

    • Asset has the Configuration Item field (reference to cmdb_ci).

    • CI has the Asset field (reference to alm_asset).

  3. The OOTB Business Rule “Create asset on model change” on cmdb_ci is active.

    • For some OOTB CI classes (like computers) this works: when I create a CI with a model, an Asset is created and the Asset–CI link is maintained.

  4. I also checked Asset CI Field Mappings (alm_asset_ci_field_mapping) – the standard mappings between Asset fields and CI fields are there and active.

  5. On the Work Order (wm_order):

    • I select an Asset.

    • There is an Affected CI field (cmdb_ci).

  6. On the Work Order Task (wm_task):

    • I have Asset and Configuration Item fields.

    • There is also a Script Include (SMAJAX.getAssetDetail) + client script that, in other scenarios, can set cmdb_ci based on the Asset’s CI.


What works vs. what doesn’t

Scenario that works (OOTB example)

If I use an OOTB CI class (for example a laptop):

  • The CI is correctly linked to an Asset (CI.Asset is set, Asset.Configuration Item is set).

  • When I select this Asset on the Work Order, the Affected CI field is automatically populated.

  • From there, the CI can drive further logic.

Scenario that doesn’t work (my custom generator CI)

For my custom CI class (e.g. u_cmdb_ci_generator):

  • I created a CI record and an Asset record.

  • Even though the table extends cmdb_ci, the Asset is not automatically created/linked for this CI, and the CI’s Asset field remains empty.

  • As a result, the Asset’s Configuration Item field is also empty.

Because of that:

  1. When I select this Asset on a Work Order,
    Affected CI remains empty (it is not auto-populated).

  2. When I create a Work Order Task and select the Asset,
    → the client script that should set cmdb_ci based on Asset.ci has nothing to work with,
    → so the Configuration Item on the Work Order Task stays empty.

This breaks my checklist logic because I want to drive the checklist from the CI / CI class.


My questions to the community

  1. Why is my custom CI not linked to an Asset automatically, even though the table extends cmdb_ci?

    • Is there any additional configuration per CI class (in CMDB Class Manager) such as “Asset tracking” / “Asset required” that must be enabled?

    • Does the OOTB BR “Create asset on model change” require a specific condition (e.g. model_id must be set and change) for my custom class?

  2. What are the exact conditions for automatic Asset creation and CI–Asset synchronization for custom CI classes?

    • Do I need to define Models, Model Categories, or Asset Classes in a specific way?

    • Is there any limitation that OOTB Asset–CI sync works only for certain CI subclasses?

  3. Why doesn’t the Affected CI on Work Order get populated when I select my custom Asset?

    • Is this purely because Asset.Configuration Item is empty?

    • Or are there additional Work Order–specific conditions?

  4. Why doesn’t the Configuration Item on Work Order Task get populated automatically from the Asset?

    • Is there any standard FSM configuration that should map Asset → CI on wm_task similar to how it’s done on wm_order?

    • Or do I need to implement my own BR / client script to set cmdb_ci on wm_task?

  5. From a best-practice perspective:
    For FSM + CMDB, when each CI type needs its own checklist, is it recommended to rely on:

    • CI Class,

    • CI Category,

    • Asset Model,

    • or Model Category
      as the main driver?


Goal

My end goal is:

  • CI and Asset are always linked correctly for my custom CI classes.

  • When an Asset is selected on a Work Order, Affected CI is automatically filled.

  • When a Work Order Task is created for that Asset/CI, the Configuration Item on the task is auto-populated, so I can:

    • attach the correct checklist template, and

    • prevent task closure until all mandatory checklist items are completed.

Any guidance, examples, or documentation references on setting this up properly for custom CI classes in FSM would be greatly appreciated 🙏

Thanks in advance!

0 REPLIES 0