Balance Difference Normalizer
A balance difference normalizer chooses a result by comparing the following values to ranges of balance differences specified in the normalizer:
- The difference between two balance amounts. You can compare simple and periodic balances. Both prepaid and postpaid balances are supported.
- The difference between a balance amount and a numeric MATRIXX Data Container (MDC) field.
- The difference between balance amounts and numeric catalog item parameters.
The difference is normalized to a value that falls within one of the ranges defined in the normalizer. The Charging Server then uses the normalization value associated with that range. Optionally, you can store the difference in a data modify action workspace.
- Do not use this normalizer to compare two balances for usage rating.
- Use this normalizer to compare two balances sparingly because it reduces the throughput of the Charging Server. Instead, use it to compare a balance and a field or parameter whenever possible.
Specify balances by balance class ID, balance template ID, or balance tag ID and, optionally, by group tier. If more than one balance instance for the specified balance exists, the Charging Server uses the aggregated balance amounts of each instance for the comparison.
where B1 is the balance amount of Balance 1 and B2 is the balance amount of Balance 2.Difference = B1 - B2
Note: When comparing two balances during usage rating, an error may be returned and the transaction aborted if B2 may be impacted by the rating.-
Difference = B1 - MDC Field/Parameter
-
Difference = MDC Field/Parameter - B2
Range | Normalized Value |
---|---|
-infinity to -5 | 0 |
-5 to 0 | 1 |
0 to 5 | 2 |
5 to infinity | 3 |
- Balance 1 is the actual usage charges incurred through the cycle.
- Balance 2 is the minimum required charges for the number of subscribers in the group.
- If Balance 1 is greater than or equal to Balance 2, then each subscriber pays the actual usage charge.
- If Balance 1 is less than Balance 2, each subscriber pays the minimum required amount.
Inclusivity Within the Ranges
Inclusivity is determined by the formula being used to calculate the difference value that is compared to the normalizer ranges. Assuming that B is the balance value and N is the field or parameter value:
- When the balance is on the left side of the difference calculation (B - N) or the balance is on both sides of the difference calculation (B1 - B2), the difference is evaluated against each range [lb..ub), inclusive at the lower boundary and exclusive at upper boundary.
- When the balance is on the right side of the difference calculation (N - B), the difference is evaluated against each range (lb..ub], exclusive at the lower boundary and inclusive at upper boundary.
Quantity Units
For balances that have associated quantity units, you can configure the quantity unit in which to perform normalizations. This unit determines the balance attribute boundaries, for example, 1-10 megabytes, 10-20 megabytes, and so forth.
If the configured quantity unit is different from the balance unit for any balance in the calculation, the normalizer converts the balance unit(s) to this quantity unit before normalizations. If you specify a unit that is not compatible with the unit of any balance in the calculation, the normalizer returns an error.
If an MDC field or catalog item parameter is provided, it is assumed that the field's or parameter's unit is the same as the quantity unit defined in the normalizer and no conversion is done. If the balance unit is different from the quantity unit of the MDC field/parameter, then the balance unit is converted to the quantity unit of the MDC field/parameter.