
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
03-01-2022 03:50 PM - edited 11-21-2022 10:45 AM
Let's start with a video.
What follows after the video is the complete set of instructions that the video refers to.
The Quick Solution
If you find yourself retiring a Software Entitlement and replacing it with a new one, you may be wondering how you can move the related User or Device Allocations from the old entitlement to the new entitlement. The below method is a down-and-dirty way to accomplish this with no development effort. You simply need to enlist the help of your System Administrator. At the end of this article, I'll outline a couple of potential stretch goals you can consider putting this into a format a SAM Admin can use 'on demand' without additional help.
To get started you need to identify the sys_id values of the two software entitlement records you are working with; the original to be retired that has related allocation records and the new software entitlement where you wish to move those allocation records.
Within the Software Asset Management Workspace
1. Navigate to SAM Workspace>License Operations>Licensing>Software entitlements. Then open the original (retired) software entitlement record from the list view of records. In the search bar at the top of your internet browser copy the sys_id from the end of the URL. In the screenshot below, I have it highlighted in blue. Then, paste the sys_id into the appropriate script shown farther down in this article in place of 'retired entitlement sys_id goes here'. The single quotes are needed. Do not remove them.
2. Using the same navigation method as above, open the new software entitlement record and copy its sys_id from the end of the URL shown in the search bar. Then, past the sys_id into the script shown farther down in this article in place of ‘new entitlement sys_id goes here’. Again, the single quotes are needed, be sure not to remove them.
3. Now that your scripting is complete, execute the script via All>System Definitions>Scripts-Background.
Within the classic UI or by navigating directly to the SW Entitlement table via All>alm_license.list
1. Navigate to the original (retired) software entitlement, right-click in the banner and choose Copy sys_id from the right-click context menu. Then, paste the sys_id into the script below in place of 'retired entitlement sys_id goes here'. The single quotes are needed. Do not remove them.
2. Navigate to the new software entitlement record, and repeat the right-click steps to copy its sys_id. Then, paste the sys_id into the script below in place of 'new entitlement sys_id goes here'. Again, the single quotes are needed, be sure not to remove them.
3. Execute the script via the System Definitions -> Scripts - Background module
// User Allocation move script.
var rec = GlideRecord('alm_entitlement_user');
rec.addQuery('licensed_by', 'retired entitlement sys_id goes here');
rec.query();
while (rec.next()) {
rec.licensed_by = 'new entitlement sys_id goes here';
rec.update();
}
// end of script
// Device Allocation move script.
var rec = GlideRecord('alm_entitlement_asset');
rec.addQuery('licensed_by', 'retired entitlement sys_id goes here');
rec.query();
while (rec.next()) {
rec.licensed_by = 'new entitleemnt sys_id goes here';
rec.update();
}
// end of the script
System Performance Considerations
With each update of the allocation record, a business rule is fired that calculates the number of remaining allocations available on both the new entitlement and the retired entitlement so be sure, if there are a large number of allocations, to have this run after hours to preclude that overhead from slowing down your instance.
Stretch Goals
Here are two methods you can use to bring this solution into the product for ad hoc execution by SAM Admins.
1. You can create a Catalog item with variables representing the two software entitlement records. Use the code above as the base code for your development effort and supply the sys_id values populated by a user. The users wouldn't need to know the sys_id values, they'd simply choose entitlement records within the variables in the catalog item and the workflow behind the scenes would capture the sys_id values and then execute the code.
2. A second, more complex option, is to create a UI action available on Software Entitlement records in a "retired" state. When the UI action is activated, it would give rise to a UI page containing attributes for both the retired (auto-populated) and the new Software Entitlement record. Upon submission, the page would enter the sys_id values of the respective entitlements into the code and process it.
- 3,411 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thank you for sharing! This is a common use case and need for us.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Scott,
It is under evaluation for addition to the product now. Not sure when it will arrive, but I wouldn't look for it until Utah. That forward-looking statement is under Safe Harbor as I can't publicly commit to a date.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I have updated the article to account for the SAM Workspace.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Is there a faster/an easier way to do this, nowadays? I need to relate previous (retired) entitlement records to new ones, and was wondering if there's an out-of-the-box way to do so.
Your assistance would be highly appreciated.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
What are the pitfalls of simply not creating a new entitlement upon contract renewal? I can think of a few from a practice area perspective, but I'm interested more specifically in potential impact to platform functionality or features. What happens or doesn't happen in ServiceNow if one just changes the start and end date? The cost?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
What if you don't want to move all the allocations from the old retired to the new entitlement? For ex. you own 15 licenses but you only renewed maintenance on 5 of them and want to move the 5 license keys/allocations you renewed?