When creating an entitlement for an Adobe product and selecting the "Per User" license metric, the Metric Attribute is missing


Description

Release

Madrid and earlier

Cause

The business rule "Create duplicate Metric Attribute record" checks the entries of table samp_sw_default_metric_attribute, which is empty in Madrid and earlier releases, so the business rule fails to sync the Metric Attribute to the software model.

Business rule:
https://<instance-name>.service-now.com/nav_to.do?uri=sys_script.do?sys_id=07bf01a30b53220037af440ff6673a9d

Resolution

There are two workarounds for this scenario

Workaround 1

Once you create a software model, copy the sys id of that adobe model and replace it in line 3  instead of value DUMMY of the below script.

var ADOBE_METRIC_GROUP_SYSID ='6f39312273720300759a259dfaf6a74f';
var ADOBE_LICENSE_METRIC_SYSID = 'f60759f5c31222006081face81d3ae7b'; // Change 
var ADOBE_SOFTWARE_MODEL_SYSID = 'DUMMY'; //Change this sysid to the software model on which the entitlement is being created.
var gr = new GlideRecord('samp_sw_metric_attribute');
gr.setValue('attribute', 'max_install_per_right');
gr.setValue('attribute_value_is_unlimited', true);
gr.setValue('description', 'The maximum amount of installs each right can license. This attribute is used for reconciling entitlements that have a Per User, Per Device, Per Named User or Per Named Device license metric.');
gr.setValue('license_metric', ADOBE_LICENSE_METRIC_SYSID);
gr.setValue('metric_group', ADOBE_METRIC_GROUP_SYSID);
gr.setValue('software_model', ADOBE_SOFTWARE_MODEL_SYSID);
gr.insert();

This should create the entry for you.

Workaround 2

Select common/Per user instead of selecting Adobe/Per User. This should reflect the Metric attributes.