Endpoint Insights

How to Customize SCCM Data in the ServiceNow CMDB

Topics: Endpoint Insights

This is the last post in a 5-blog post set about how to integrate SCCM data with ServiceNow. In this post, I’ll show you how to customize SCCM data in the ServiceNow CMDB (Configuration Management Database) by covering steps 16 through 19 in the list below.

Steps to Integrate SCCM Data with ServiceNow

The sequence of activities, at a high level, that I took to set up a development environment in order to integrate SCCM with ServiceNow are as follows:
1. Create an Account with ServiceNow.
2. Request a ServiceNow Developer Instance.
3. Logon to the ServiceNow Instance.
4. Activate the SCCM Plugin.
5. Create the User Account for the ServiceNow MID Server.
6. Install a ServiceNow MID Server in Your Organization.
7. Validate Communication Between the ServiceNow MID Server and ServiceNow.
8. Create a SQL Server Account for the ServiceNow Data Source.
9. Use the Integration SCCM 2016 Plugin to Import Data to the ServiceNow CMDB.
10. Schedule the Import of SCCM Data.
11. Clean Out the Default “Sample” Data.
12. Create the Data Source to Import Custom SCCM Data.
13. Import Custom SCCM Data.
14. Confirm the Custom SCCM Data in ServiceNow.
15. View Imported Data from SCCM.
16. Create a Transform for Warranty Information Reporting’s Data.
17. Run the Transform.
18. Confirm Computers Are Linked to Their Warranty Data.
19. Edit the Form Layout.

Customize SCCM Data in the ServiceNow CMDB

Unlike the previous posts that were more general, this one will specifically demonstrate how we customized the Warranty Information Reporting (WIR) warranty data that was imported from SCCM into the ServiceNow CMDB. These steps, however, are transferable no matter what other custom data you may be importing from SCCM to the ServiceNow CMDB.
In this post, How to Customize SCCM Data in the ServiceNow CMDB, I’ll show you how to create and run a transform for the warranty data, how to make sure that this data is applied to computer objects, and finally, how to modify the way ServiceNow displays this data (Steps 16-19).
To review past steps, please see, How to Import Custom SCCM Data into ServiceNow, for steps 12 through 15. In order to review steps eight through eleven, please see the post, How to Integrate SCCM Data with ServiceNow, for steps five through seven, please see, How to Setup a ServiceNow MID Server for Use with SCCM, and for steps one through four, please see the post, How to Request a ServiceNow Developer Instance to Integrate with SCCM.

Creating a Transform for Warranty Information Reporting’s Data

In ServiceNow a transform is needed in order for the CMDB to handle custom fields imported from SCCM. It is also required in order to associate this data with specific computers.
As I explained earlier, the steps are shown specifically for Enhansoft’s Warranty Information Reporting (WIR) warranty data, but you can apply them to any other custom data source.
Customize SCCM Data in the ServiceNow CMDB - Data Source
Under Integration-Microsoft SCCM 2016 select Data Sources. Click on the data source Enhansoft Warranty Info.
Customize SCCM Data in the ServiceNow CMDB - New Button
In the Transforms section, you might need to scroll down to see it, click on the New button.
Customize SCCM Data in the ServiceNow CMDB - Mapping Assist
Provide a name for the transform in the Name field. In my case it’s, “ES Warranty Transform.” Leave the Source table field populated with the data source table. In the Target table field, click on the drop-down and select Computer (cmdb_ci_computer).
Note: Taking these steps connects the data with a specific computer, so we’ll be able to see Enhansoft’s Warranty Information Reporting (WIR) warranty data associated with a computer CI object in the ServiceNow CMDB.
Under Related Links, click on Mapping Assist.
Customize SCCM Data in the ServiceNow CMDB - Tables
In the Source table, near the top of the screen, (in my case it’s Enhansoft Warranty Info), perform the following steps:
Locate HWStartDateTime0. Click Add.
Locate HWEndDateTime0. Click Add.

In the Target table, on the right-hand side of the screen, (in all cases it should be Computer), perform the following steps:
Locate Purchased. Click Add.
Locate Warranty expiration. Click Add.
Note: These items will populate the Field Map. In other scenarios (i.e. not customizing WIR’s warranty data) your selected items will vary from mine.
Click Save.
Customize SCCM Data in the ServiceNow CMDB - Field Maps
Beside Field Maps, click on the New button.
Customize SCCM Data in the ServiceNow CMDB - Use Source Script
In the Source field box, click on the drop-down and select ResourceID. The Source field box will be hidden after the next step. Ensure that the box next to Use source script is selected.
Customize SCCM Data in the ServiceNow CMDB - Source Script
Replace the existing text by pasting the following text into the Source Script area:
answer = SCCMHelper.findComputer(source.u_resourceid);
In the Target field box, click on the drop-down and select Sys ID. Ensure that the box next to Coalesce is selected before clicking on either of the Submit buttons.
Customize SCCM Data in the ServiceNow CMDB - Update
Click Update.
Customize SCCM Data in the ServiceNow CMDB - Data Sources - Update
Lastly, back on Data Sources, click on the Update button, located near the top of the page. You finished creating the transform!

Running the Transform

In order to ensure that everything is okay, we need to test the transform by running it.

Customize SCCM Data in the ServiceNow CMDB - New Transform
Still on Data Sources, click on the Enhansoft Warranty Info data source. In the Transforms section, click on the newly created transform. In my case it’s ES Warranty Transform.
Customize SCCM Data in the ServiceNow CMDB - Related Links - Transform
Under Related Links, click on Transform.
Customize SCCM Data in the ServiceNow CMDB - Transform Button
Click on the Transform button.
Customize SCCM Data in the ServiceNow CMDB - Success
Ensure that the Completion code says Success. Click on the link next to Go to the import set.
Customize SCCM Data in the ServiceNow CMDB - State Column
In the table above, notice that under the State column it says, “Inserted.” This means that a record was inserted into the database, with a record type of Computer, using the ES Warranty Transform as the mapping method.
The information in this table confirms that the transform worked.

How to Confirm Computers Are Linked to Their Warranty Data

I’ll perform the same test as I did in my previous blog post, How to Import Custom SCCM Data into ServiceNow. In that post I showed you the results for my workstation before I created the transform. Now let’s take a look at the same PC after the transform was created and the warranty data was added.
Customize SCCM Data in the ServiceNow CMDB - Set Link
Under Integration – Microsoft SCCM 2016 expand Import Set Data and select Computer Identity. Beside the Go to field, click on the drop-down and select Name. Type the first few characters of a computer name, in my example it’s caot*, and then press Enter.
I’ll select the Set link beside CAOTTANT-LEN with the most recently created date.
Customize SCCM Data in the ServiceNow CMDB - Import Set Rows
Under Import Set Rows, I’ll choose Computer: CAOTTANT-LEN.
Customize SCCM Data in the ServiceNow CMDB - Form
Why doesn’t the warranty data appear here? I’ll review the XML file.
Customize SCCM Data in the ServiceNow CMDB - Export - XML
On the left-hand side of Computer CAOTTANT-LEN near the top of the screen, click on the additional actions button. Select Export->XML (This Record).
Customize SCCM Data in the ServiceNow CMDB - Open Button
Click Open.
Here is the pertinent area of the XML code:
Customize SCCM Data in the ServiceNow CMDB - XML Code
Yes, the correct warranty data is associated with this computer! It is confirmed in both the purchase_date field as well as the warranty_expiration field.

Editing the Form Layout

How can you make this information visible in the ServiceNow form?
Customize SCCM Data in the ServiceNow CMDB - Additional Actions Button
Back on the computer form, click on the additional actions (purple arrow) button again.
Customize SCCM Data in the ServiceNow CMDB - Form Layout
Select Configure -> Form Layout.
Customize SCCM Data in the ServiceNow CMDB - Available
Under Available, select each item that you would like to see added to the form. Once you select an item, click on >.
In my case, I selected Purchased and Warranty expiration.
Customize SCCM Data in the ServiceNow CMDB - Selected
Under Selected, I moved Purchased to just over the split and Warranty expiration to just over the end_split. I did this so that these fields would appear side-by-side in the form layout (see the screenshot below).
Click on the Save button.
Customize SCCM Data in the ServiceNow CMDB - Updated Form
Congrats! The new fields were added to the form.
With that last step completed, all of the tasks needed from setting-up a ServiceNow developer instance to displaying warranty data imported from SCCM are done! Do you now feel like a ServiceNow/SCCM expert?!
Thanks for taking the time to read this longer than usual blog post set. In order to ensure that everyone was starting off on the right track, I first needed to cover all of the major ServiceNow components before addressing how to import custom data from SCCM.
If you have any additional questions about how to customize SCCM data in the ServiceNow CMDB, please feel free to contact me at @GarthMJ.

Back to Top