Map Suppurt Group Change Group and Managed By Group using the excel file that has CI Class name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 07:46 AM
Hi All,
I am trying to Map Support Group, Change Group and Managed By Group using the excel file that has CI Class name and corresponding Managed by Group, Support Group, Change Group.
I tried to load the data from excel file using import set and when trying to run Transform Map, not able to find the "Class" in Target field of CMDB_CI.
I tried to create a custom column sys_class_name but it is not mapping correctly.
Please suggest.
CSV Column ServiceNow Field (cmdb_ci)
Class | sys_class_name (Class) |
Managed By Group | managed_by |
Support Group | support_group |
Change Group | change_group |
Filtered URL | reference_url |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 10:58 AM
Hi ,
It seems like you're trying to map the Support Group, Change Group, and Managed By Group fields in the CMDB using an Excel file that includes the CI Class name. Let me guide you through the process and address the issue you're facing with the sys_class_name field.
Steps to Map the Fields:
- Verify the Target Table and Fields:
- Ensure that the target table is cmdb_ci or a specific CI class table (e.g., cmdb_ci_server, cmdb_ci_win_server).
- The sys_class_name field is a system field that determines the CI class. It is not directly editable in the transform map because it is automatically populated based on the CI's class.
- Prepare Your Excel File:
- Your Excel file should have the following columns:
- Class: Contains the CI class name (e.g., cmdb_ci_server, cmdb_ci_win_server).
- Managed By Group: The group responsible for managing the CI.
- Support Group: The group providing support for the CI.
- Change Group: The group responsible for changes to the CI.
Example:
Class |
Managed By Group |
Support Group |
Change Group |
cmdb_ci_server |
IT Operations |
IT Support |
Change Mgmt |
cmdb_ci_win_server |
Windows Team |
Help Desk |
Change Mgmt |
- Load the Data Using Import Set:
- Navigate to System Import Sets > Load Data.
- Upload your Excel file and create a new import set table.
- Map the columns in your Excel file to the import set table fields.
- Create a Transform Map:
- Go to System Import Sets > Transform Maps and create a new transform map.
- Set the Source Table to your import set table and the Target Table to cmdb_ci (or the specific CI class table if applicable).
- Map the fields as follows:
- Class → sys_class_name (Target Field)
- Managed By Group → managed_by
- Support Group → support_group
- Change Group → change_group
- Handle the sys_class_name Field:
- Since sys_class_name is a system field, it cannot be directly mapped. Instead, you need to use a Scripted Transform Map to set the sys_class_name dynamically based on the value in the Class column.
- Scripted Transform Map for sys_class_name:
- Add an onBefore Transform Script in your transform map with the following code:
// Map sys_class_name dynamically based on the Class column if (source.u_class) { // Replace 'u_class' with the actual field name in your import set table target.sys_class_name = source.u_class; }
- This script ensures that the sys_class_name field is populated correctly based on the Class column in your Excel file.
- Run the Transform Map:
- After setting up the transform map, run it to import the data into the target table.
- Verify that the Managed By Group, Support Group, and Change Group fields are populated correctly for the respective CIs.
- Validate the Data:
- Navigate to the CMDB and check the records to ensure the data has been mapped correctly.
- Use a list view to verify that the sys_class_name, managed_by, support_group, and change_group fields are populated as expected.
Troubleshooting Tips:
- If sys_class_name is not mapping correctly:
- Ensure the values in the Class column of your Excel file match the exact names of the CI classes in ServiceNow (e.g., cmdb_ci_server, cmdb_ci_win_server).
- Use the scripted transform map to dynamically set the sys_class_name.
- If fields like managed_by, support_group, or change_group are not updating:
- Check the field mappings in the transform map.
- Ensure the field names in the Excel file match the source field names in the import set table.
- If the transform map is not working as expected:
- Check the Coalesce settings in the transform map. Use a unique identifier (e.g., sys_id or name) to match existing records and update them.
Supporting Documentation:
Here are some resources that can help you further:
- How to update sys_class_name via Transform Map script? - ServiceNow Community
- [Mapping of Class field in cmdb_ci table - ServiceNow Community](https://www.servicenow.com/community/developer
If you believe the solution provided has adequately addressed your query, could you please **mark it as 'Helpful'** and **'Accept it as a Solution'**? This will help other community members who might have the same question find the answer more easily.
Thank you for your consideration.
Selva Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 11:23 AM
Thanks @Selva Arun for your detailed response.
Can you please help with these steps in detailed steps as I am facing issue mapping Class from excel file to Class in CMDB_CI Class as target
3.Handle the sys_class_name Field:
- Since sys_class_name is a system field, it cannot be directly mapped. Instead, you need to use a Scripted Transform Map to set the sys_class_name dynamically based on the value in the Class column.
4. Scripted Transform Map for sys_class_name:
- Add an onBefore Transform Script in your transform map with the following code:
// Map sys_class_name dynamically based on the Class column if (source.u_class) { // Replace 'u_class' with the actual field name in your import set table target.sys_class_name = source.u_class; }
- This script ensures that the sys_class_name field is populated correctly based on the Class column in your Excel file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 12:00 PM
Hi @Selva Arun
In the transform map, I added below script:
I replaced "u_class" with "Class" as the excel sheet header has the same name for Class (screenshot below)
When I ran the transform, I see only the Class with Configuration Item has been added with Support Group, Change Group, Managed By Group.
Rest of the CI Class there is no update in those fields
I am also adding the Transform Map screenshot
please help.
Let me know if you need any more information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 12:36 PM
@Selva Arun I also noticed that new CI entries are being made with Support Group, Change Group and Managed by Group updated.
Instead of updating the CI class which are already existing in CMDB