- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 09-17-2020 09:42 AM
Intro
Effective Software Asset Management requires good foundational data as well as data that identifies what software rights are owned and what software rights are in use.
Software entitlement details are a vital component of Software Asset Management. They identify how many rights you purchased to use software in your environment.
The process of importing software license entitlements into the platform is streamlined using a Microsoft Excel template. The template is available as part of the Software Asset Management Import Entitlements feature and accessible from the Software Asset > Licensing > Import Entitlements navigation menu.
After completing the file with the necessary data, we can drag and drop the file in the same page and upload the entitlements.
At first glance, it seems we are following the usual approach involving System Import Sets, probably starting from a dedicated page and leveraging a pre-configured staging table/transform map. Well, wrong answer.
Taking few steps back
In order to understand the solution, we need to start from the actual page where the import take place.
From the look of the URL, it seems we are dealing with another annoying UI Page.
A quick search in the 'UI page' table tells that we are right.
Analysing the Client script section, it is possible to recognise the way data are loaded.
The code uses jQuery to invoke a baseline REST API to load the file.
The API is available in the list of Scripted Web Services available under 'System Web Services > Scripted Web Services > Scripted REST APIs'.
The record contains one 'Scripted REST Resource' that fits with the previous code.
The server-side code included in 'Scripted REST Resource' uses a specific API to parse the content of the excel file and create entitlements records OR entitlement errors records.
Finally we got our answer.
Final Summary
The solution is based on a 3 steps strategy leveraging different baseline capabilities of ServiceNow.
The same approach can be used for scoped applications in case there is the necessity of importing data through a pre-configured excel file.
Very interesting is the use of the GlideExcelParser API.
The GlideExcelParser methods can be used in global and scoped scripts to parse .xlsx formatted Excel files and access file data in script.
More information and practical example of the library can be found here.
Cheers
r0b0_d3vil
- 699 Views