{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":25852,"path":"it-asset-management/software-asset-management/add-custom-license-metric.md","title":"Add a custom license metric","bundle":null,"doc_type":null,"release":"australia","body":"\n# Add a custom license metric\n\nYou can add a custom license metric to modify the default reconciliation process.\n\n## Before you begin\n\nRole required:\n\n-   to create or modify a custom metric script: sam\\_developer\n-   to read custom metric script: sam\\_admin\n\nRole required to create or modify a custom metric script: sam\\_developer\n\n## About this task\n\nCustom license metrics can be created to define specific software calculations not included in the predefined license metrics list. Custom license metrics are useful so reconciliation can calculate rights per user or device for certain software products and bundles of lesser-known software publishers.\n\nFor example, you can create a custom metric to avoid over counting installs for products that are part of an unrecognized bundle.\n\nYou can use the Resource Value \\[samp\\_sw\\_resource\\_value\\] table to enhance the custom license metric capability by doing a 1:1 calculation between the Units consumed column in the Resource Value \\[samp\\_sw\\_resource\\_value\\] table and the Licenses required column in the License Metric Results \\[samp\\_license\\_metric\\_result\\] table. You can create your own calculations in your custom license metric scripts and write your own logic to further customize your custom license metric. For information on adding resource values to the Resource Value \\[samp\\_sw\\_resource\\_value\\] table, see [Specify resource values for your custom license metrics](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-asset-management/software-asset-management/specify-resource-values-custom-license-metrics.md).\n\nCustom metrics can be disabled using the custom license metric [property](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-asset-management/software-asset-management/sam-properties.md). This feature is enabled by default.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Software Asset** &gt; **Administration** &gt; **Custom License Metrics** and create a new record \\(see table for field descriptions\\).\n\n<table id=\"table_fdn_2pd_c1b\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nLicense metric\n\n</td><td>\n\nName of the custom license metric. This name is shown in the **License Metric** field of software entitlements, and in the license metric results for the software model.\n\n</td></tr><tr><td>\n\nTable Source\n\n</td><td>\n\nSpecify if this custom license metric belongs to the Software Installations \\[cmdb\\_sam\\_sw\\_install\\] table or the Resource Value \\[samp\\_sw\\_resource\\_value\\] table. **Note:** If the table specified is the Resource Value table, the following fields: **Reconciliation order – allocated**, **Reconciliation order – unallocated**, and **Allocation type** are not displayed. Additionally, the Calculation Script shows a sample script related to resource value.\n\n</td></tr><tr><td>\n\nMetric group\n\n</td><td>\n\nCustom license metric.\n\n</td></tr><tr><td>\n\nAllocation type\n\n</td><td>\n\nAllocation type of the metric license, per device or per user.-   Device\n-   User\n\n\n</td></tr><tr><td>\n\nDescription\n\n</td><td>\n\nDescription of the custom license metric.\n\n</td></tr><tr><td>\n\nReconciliation order — allocated\n\n</td><td>\n\nReconciliation metric rank priority for allocated licenses. Lower rank value takes precedence.\n\n</td></tr><tr><td>\n\nReconciliation order — unallocated\n\n</td><td>\n\nReconciliation metric rank priority for unallocated licenses. Lower rank value takes precedence.\n\n</td></tr><tr><td class=\"sub-head\" colspan=\"2\">\n\nCalculation\n\n</td></tr><tr><td>\n\nCalculation Script\n\n</td><td>\n\nThe calculation method for the license metric is script. Specify the reconciliation script.\n\n</td></tr></tbody>\n</table>2.  Select **Submit**.\n\n\n-   **[Custom license metric example script](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-asset-management/software-asset-management/custom-license-example-script.md)**  \nThe following is an example of a custom license metric script.\n-   **[Specify resource values for your custom license metrics](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-asset-management/software-asset-management/specify-resource-values-custom-license-metrics.md)**  \nIf you create a custom license metric based on resource values, specify the resource value for each software product that you want to calculate licensing requirements for.\n\n**Parent Topic:**[Software Asset Management administration](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-asset-management/software-asset-management/c_SAMAdministration.md)\n\n"}}