Customizing the Calculation
The xAssets SAM engine ships with a complete set of default rules. For most customers, those defaults are correct out of the box and never need to change. For customers with unusual licensing policies — Adobe-by-department, contractual VIP pools, custom affinity dimensions — the rules are editable.
This chapter explains the rules engine, walks through the Configure dialog, and provides the recipes for the most common customization patterns.
Read this chapter only if you have a specific need to customize. Editing the rules without understanding what they do is the fastest way to break compliance reporting. The defaults are deliberately tuned and well-tested.
What's in This Chapter
| Page | Read When |
|---|---|
| How Rules Are Evaluated | Before editing any rule |
| Editing Rules via Calculate → Configure | When you need to make a change |
| Affinity Weights and the Default Rule Set | When tuning weights or adding affinity dimensions |
| Per-Product Scoping | When a publisher needs department/location/cost-centre as a hard requirement |
| Hierarchy Fields and the Within Comparator | When writing rules that need parent-child matching |
| Testing Rule Changes Safely | Always |
| Common Recipes | When implementing one of the standard patterns |
Permissions
The Configure dialog is restricted to administrators. The button is on the Calculate Software Licensing dialog and produces an error message ("Only administrators can configure software calculation rules") for non-admin users.
If you need to give a user the ability to edit rules, that user needs ADMIN-level rights via the user groups system.
The SoftwareCalculationDowngradesAllowed Setting
There is a system-wide kill switch for downgrade processing called SoftwareCalculationDowngradesAllowed. Set via SetSpecialOption "SoftwareCalculationDowngradesAllowed", "0" (or "1").
| Value | Effect |
|---|---|
1 |
Downgrade rules on individual licenses are honored (None / One / Any) |
0 |
All downgrades are disabled, regardless of per-license downgrade rule |
The setting is global to the calculation. When 0, even a license with Downgrade Rule = Any will not produce downgrade grants — the engine processes only exact-product matches.
Use cases for setting it to 0:
- Testing baseline behavior without downgrade complexity
- Auditor request to see compliance assuming no downgrade rights
- Production environments where downgrade rights are not contractually applicable
Use cases for 1 (the default):
- Standard compliance reporting where per-license downgrade rules are honored
Set this once, system-wide, via the Special Options interface. It is not editable per-calculation.
Where the Rules Live
The rules are stored as the script body of a transformation called Calculate Software Licensing. The Configure dialog is a structured editor over that script — you can also edit the transformation directly from Admin → Transformations if you prefer working in the raw form.
Editing through the dialog is preferred because:
- It validates the rule shape before saving
- It surfaces the data sources, calculated fields, requirements, and affinity rules separately
- It is the supported customization path
Editing the transformation directly is supported but expects you to know the AMSX syntax of the rules block.
A Tiny Example
The default rule that says "department is preferred":
Affinity Consumption.DepartmentID = License.DepartmentID, 3000
Read: "if the consumption's department equals the license's department, add 3000 to the affinity score."
To make department a hard requirement for one product (e.g., Adobe), you would add a per-product scoping pattern that compares department only when the product is flagged. See Per-Product Scoping.
To make custodian matching score higher than department, you would change the weight on the custodian rule from 1000 to 4000.
The DSL is small. The leverage is high. Read How Rules Are Evaluated before changing anything.
Related Reading
- Concepts: Affinity vs Requirements — the conceptual model
- Configuration Guide: Transformations — the platform mechanism the rules are stored in