- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 03:07 AM
Hello, I have a cost of X assigned to a Software Model and that SW Model is assigned an entitlement record with no cost assigned to it. Is it possible to use the cost of that SW Model for the entitlement and license reconciliation? How would I do that?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 03:31 AM
Hi @Thomas E_ ,
Yes, it is possible to use the cost of a Software Model for the entitlement and license reconciliation in ServiceNow. You'll need to create a script or business rule that retrieves the cost from the Software Model and assigns it to the entitlement record. I've tried to provide you the detailed steps as well:
1. Create a Business Rule
Create a Business Rule on the Software Entitlement table that runs when a record is inserted or updated. This Business Rule will fetch the cost from the associated Software Model and assign it to the entitlement.
Navigate to System Definition > Business Rules.
Click New to create a new Business Rule.
Fill in the fields as follows:
Name: Populate Cost from Software Model
Table: Software Entitlement (alm_license)
When: Before
Insert: Checked
Update: Checked
Filter Conditions: Cost is empty (if applicable)
script:
(function executeRule(current, previous /*null when async*/) {
// Get the Software Model associated with the Software Entitlement
var softwareModel = new GlideRecord('cmdb_software_product_model');
if (softwareModel.get(current.model)) {
// Check if the Software Model has a cost assigned
if (!current.cost && softwareModel.cost) {
current.cost = softwareModel.cost;
}
}
})(current, previous);
2. License Reconciliation
For the license reconciliation, ensure that the cost field is used in the reconciliation process. This might involve configuring the reconciliation process to consider the cost from the entitlement records.
Thanks,
Hope this helps.
If my response turns useful please mark it helpful and accept is as solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 03:31 AM
Hi @Thomas E_ ,
Yes, it is possible to use the cost of a Software Model for the entitlement and license reconciliation in ServiceNow. You'll need to create a script or business rule that retrieves the cost from the Software Model and assigns it to the entitlement record. I've tried to provide you the detailed steps as well:
1. Create a Business Rule
Create a Business Rule on the Software Entitlement table that runs when a record is inserted or updated. This Business Rule will fetch the cost from the associated Software Model and assign it to the entitlement.
Navigate to System Definition > Business Rules.
Click New to create a new Business Rule.
Fill in the fields as follows:
Name: Populate Cost from Software Model
Table: Software Entitlement (alm_license)
When: Before
Insert: Checked
Update: Checked
Filter Conditions: Cost is empty (if applicable)
script:
(function executeRule(current, previous /*null when async*/) {
// Get the Software Model associated with the Software Entitlement
var softwareModel = new GlideRecord('cmdb_software_product_model');
if (softwareModel.get(current.model)) {
// Check if the Software Model has a cost assigned
if (!current.cost && softwareModel.cost) {
current.cost = softwareModel.cost;
}
}
})(current, previous);
2. License Reconciliation
For the license reconciliation, ensure that the cost field is used in the reconciliation process. This might involve configuring the reconciliation process to consider the cost from the entitlement records.
Thanks,
Hope this helps.
If my response turns useful please mark it helpful and accept is as solution