Custom SAM License Metric using Resource Value for more than one product
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2025 12:26 PM
I am working with some of our IBM Mainframe products which all have the same calculation needed based on raw data entry. I successfully created the code in a custom license metric to do the calculation for one test product. What I want to know is, if it is possible to use the same calculation and metric for more than one product. Instead of passing a sys_id of the RV entry as the sample code suggests I tried querying the RV table for all the Resource Value records with a specific name - however it is returning the same calculation for both even though each units Consumed is different:
Setup:
1. Custom Metric called "Mainframe VU" - queries the RV table for entries with this as the name, then grabs the units_consumed and goes through and if/than/else statement to do the proper calculation.
2. Created two entitlements and two RV entries for different products. RV entry 1 has 4 as the units_consumed and RV entry 2 has 67
When I run reconciliation it shows the same usage in the workspace for both. I want to try to avoid having to create four separate custom metrics when the calculation is all the same, just not sure how to accomplish this.