What is the best approach to add a CI to the cmdb table thru a catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 03:30 PM
We have a request to add to the cmdb table after a mobile device request from a catalog item is completed.
What is the best approach to do this? Is it better to create an after insert business rule that will insert every record accepted/approved? Thanks!
- Labels:
-
Data Acquisition
-
Data Foundations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 04:38 PM
No, you should not do this with a business rule. You should define a Workflow or ideally a Flow in Flow Designer and map out the logic for your mobile device request, and then include a scripted action or other appropriate activity in your flow to create the CI at the appropriate logical point in the workflow.
The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 05:36 AM
Hi Paul,
Thanks for the response, I am new to handling the cmdb table so I'm looking for ways to add a CI thru requests. Do you mean I need to create a separate flow but connected in the flow designer of my catalog mobile device or I can add a script in my flow of catalog mobile devices to automatically create a CI? Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 10:59 AM
The short answer is that you can just add the script to your existing flow and should not need a new flow. But a longer answer is probably justified here:
First, you should make sure to consult your CMDB owner to determine the appropriate steps here, if applicable. Creating a new CI might actually not be what is called for, depending on your processes and implementation of asset management and CMDB. It could very well be the case that there is already an asset and/or CI created for the device that was requested, in which case you are better off having a task to select an existing asset or CI and then update the existing record accordingly (assign it to the user, etc.) Or if the request might bring about the purchase and delivery of a new device, likewise you will want to have a task to receive the new device and create it at the point of receipt, and then update the record after that. In either, case it is important to make sure that what you are doing in the catalog is in alignment with your asset and configuration management processes.
Second, I should add based on your wording of "cmdb table" to clarify that you should NOT be populating the "cmdb" table directly, if you are intending that statement to read that you are populating the table with the name "cmdb". This table is the root table of all CI classes and should never be populated directly. Rather, you will need to choose the right class from the 900+ CI classes that may be available to you. No one can tell you definitively which class is correct for your organization except your configuration manager or CMDB owner. That said, what should be the best class to use for mobile devices is generally either "cmdb_ci_comm_hardware" or "cmdb_ci_handheld_computing" depending on your use case. Both of these classes are only available by installing the free CMDB CI Class Models plugin.
The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 02:31 PM
Thanks for the response Paul, this is a new requirement so theres still no record for the mobile devices raised in the cmdb table. cmdb_ci_comm_hardware is already in the model categories in the hardware asset so I think I will start on that first and then fill out the necessary details. Thank you!