Daniel Slocum
ServiceNow Employee
ServiceNow Employee

What is the Use Case?

As of this writing, on January 26, 2022, Adobe Systems licenses Creative Cloud Single Apps for business at US$33.99/mo and Creative Cloud All Apps for business at US$79.99/mo. You can find this pricing publicly available here.  What this means to a savvy Software Asset Manager is that if you have a user who is subscribed to three or more Single Apps, you can convert that user to the Creative Cloud All Apps subscription, which is more economical than continuing to individually license three single apps.  This article will show you how to create a report that identifies users with three or more Single App subscriptions, which you can run via schedule, ad hoc, or include in a ServiceNow Dashboard or Homepage for easy access.

Complete instructions are below. Click on any of the images to make them larger.  If you are a visual and auditory learner, you may want to check out this YouTube video on the topic before you begin.

 

What you will need:

Stakeholder support and assistance from a ServiceNow Developer who can create the elements described below within an Update Set for easy promotion through your organization’s development lifecycle.

What you will build:

You will create a Script Include and a report that leverages that Script Include returning a list of users who have more than two Single App Subscriptions.  Script Includes are used to store JavaScript that runs on the server.  The Script Include is utilized to query the SW Subscriptions Table (samp_sw_subscription) to return a list of User SysID’s where the user has more than two Single App subscriptions.  We then use that list of User SysId’s as a query filter in a report against the User Table (sys_user).  Functionally, it gives you a list report of users. Open any of the user records and view the “Software Subscriptions” related list to validate things.  Note: in your instance, you may need to add the “Software Subscription->User” related list to the User form.

Script Include Definition

Navigate to System Definition -> Script Include and click “New” to create a Script Include.

  • Name
  • CountAdobeSingleSubscripton
  • Accessible From: All Application Scopes
  • Client callable = True
  • Active = True
  • Description: Enter a description of your choice.  I used “Call this script include to return a list of sys_user.sys_id values identifying users with more than two subscriptions of Adobe Creative Cloud Single App.”
  • Script: Insert the script from the special section below

 

var CountAdobeSingleSubscriptons = Class.create();
CountAdobeSingleSubscriptons.prototype = Object.extendsObject(AbstractAjaxProcessor, {

    getDupeUsers: function(){
		var dupSysIdList = [];
		var gaDupCheck = new GlideAggregate('samp_sw_subscription');
		gaDupCheck.addAggregate('COUNT', 'user');
		gaDupCheck.addQuery('active', true);
		gaDupCheck.addQuery('display_name', 'CONTAINS', 'single app');
		gaDupCheck.groupBy('user');
		gaDupCheck.addHaving('COUNT', '>', 2);
		gaDupCheck.query();
		while (gaDupCheck.next()){
			dupSysIdList.push(gaDupCheck.user.toString());
	}
	return dupSysIdList.toString();
	}
});

 

Report Definition

Navigate to Reports -> View / Run and create a new report

  • Data Tab of the Report Builder
    • Name: "Users with more than 2 Single App Subscriptions"
    • Source Type = Table
    • Table = User [sys_user]
  • Type Tab of the Report Builder
    • Other - Display Data in a List
  • Configure and Style Tabs in the Report Builder
    • Accept the defaults as presented or choose, from the Configure tab, different columns to display in the completed report.
  • In the Results Pane, Filter the report using the values in bold text below. If you are not sure where the Filter is, look for "Conditions" in the next screenshot, which shows the completed filter and the report result.
    • Sys ID
    • Is one of
    • javascript: new global.CountAdobeSingleSubscriptons().getDupeUsers()
  • Save the Report

 

Completed Report

find_real_file.png

 

User Record accessed from the Report

Note: in your instance, you may need to add the “Software Subscription->User” related list to the User form.

find_real_file.png

 

Add your report to a Dashboard or Homepage

Use the Sharing option within the Report Builder to reveal several methods you can utilize to distribute the report. The “Add to Dashboard” option adds the report to a Dashboard or Homepage.  The Sharing button is highlighted in a red box below. 

find_real_file.png

 

You can add the report to any Dashboard or Homepage. In the demonstration video, I added the report to a new dashboard I created for the demo. You can likewise, create a new dashboard with key reports and details used by your ITAM Team. If you are considering adding the report to the Office 365 & Adobe Cloud dashboard, you will need to use the Application Picker to change to the “Performance Analytics – Content Pack – Software Asset Management Professional” application scope to do so. This is something a Developer should do as it will write the dashboard definition change to an Update Set in a different Application Scope.  Keep in mind that alterations to the OOB Dashboard will add overhead to your ServiceNow release and patch upgrade process as you’ll need to check for skipped updates to the Office 365 & Adobe Cloud dashboard.

 

find_real_file.png

 

Here is the final result, where the report has been added to a dashboard. In this case, it is a new dashboard vs. editing an OOB dashboard.  If you go this route, you will simplify your upgrade efforts. 

find_real_file.png

 

Comments
Scott Halverso1
Mega Guru
Mega Guru

@Daniel Slocum  Great insight.  I think writing custom javascript might be a bit of overkill and requires asset managers to have to submit an enhancement request to their platform admin team.   I'd recommend using OOTB report functionality called Related List Condition.find_real_file.png

 

find_real_file.png

 

Daniel Slocum
ServiceNow Employee
ServiceNow Employee

Hi Scott,

That is what is great about the ServiceNow Platform.  There is oftentimes more than one way to achieve similar outcomes.  In my example, the creation of a script include allows that query to be callable across the platform should a use case warrant it whereas solely using reporting limits scalability.  However, for this use case, it works perfectly fine! I'd change the Related List conditions just a little to be sure only active records for Single App are counted, but otherwise agree that your solution is something a SAM Admin can do on their own provided they've been granted rights to create reports.

find_real_file.png

Version history
Last update:
‎01-26-2022 01:42 PM
Updated by: