Custom license metric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello All,
I have few entitlements utilized by contractor employees ,each counts 0.25 license.so i have created custom metric and that seems good Im comparing count from user allocation but as per the ootb feature one allocation taking count as 1 the custom metric i created is not working here
Is anyone have any idea?
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Vengadeshgiri,
The behavior you're seeing is expected if you're relying directly on User Allocations. ServiceNow treats the allocation quantity as the number of rights allocated to the user.
it doesn't automatically interpret a contractor as consuming 0.25 just because you're using a custom metric.
Since your requirement is 0.25 license consumption per contractor, the custom license metric needs to perform that weighting in its Calculation Script rather than simply counting user allocation records.
ServiceNow supports custom license metrics specifically for calculations that aren't covered by predefined metrics, and the calculation is implemented through the custom metric script.
So the logic should be essentially
Contractor users × 0.25 = required licenses
example
- 4 contractors → 1 license
- 8 contractors → 2 licenses
- 10 contractors → 2.5 licenses
Also verify that the custom license metric is actually selected on the software entitlement and that its allocation type is User.
After reconciliation, check License Metric Results and the License Consumption Explanation to verify that the custom calculation is being applied.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
How the things will be compared based on software installations ?
I have to check based on user?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Vengadeshgiri,
Yes. If your licensing rule is 0.25 license for each contractor using the software, you should use the software installation data and identify the user associated with each installation.
ServiceNow supports custom license metrics with Software Installations (cmdb_sam_sw_install) as the table source and allows the calculation script to implement custom logic.
So your logic should be
Software Installation → Associated User → Is Contractor? → Consume 0.25 license
example
Do not compare the result simply with the number of User Allocation records, because OOTB User Allocation Quantity defaults to 1.
Also make sure the custom-metric reconciliation property is enabled
com.snc.samp.recon.enablecustommetrics as controlling whether custom metrics are applied during reconciliation.
check the user associated with the software installation to determine whether the 0.25 contractor rule applies.
