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.

MATRIXX Support recommends the following:
  • 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.
A balance difference normalizer compares only the current balance amount in the specified balances. It does not support comparisons between available balance amounts (that is, the credit limit minus the current balance amount or 0 if the current amount is above the credit limit). For periodic balances, you can configure whether the current period or a past period for each balance is used.
Note: If a balance to be evaluated is a dynamic balance, only the value of the applicable dynamic balance instance is included in the calculation. For example, if a dynamic balance instance is created for each country the subscriber visits and the subscriber is currently roaming in Singapore, then only the dynamic balance instance for Singapore is used by this normalizer. For more information about dynamic balances, see the discussion about dynamic balances and meters.

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.

When calculating the difference between two balances or a balance and an MDC field/parameter, the normalizer measures the difference using the following formulas:
  • Difference = B1 - B2
    where B1 is the balance amount of Balance 1 and B2 is the balance amount of Balance 2.
    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
Note: These formulas do not use the absolute value of the difference, and this could affect the normalization results if you compare a prepaid balance (usually a negative amount) with a postpaid balance (usually a positive amount).
The normalizer produces values for the ranges of differences. An example is shown in Balance Difference Normalizer Values Example:
Table 1. Balance Difference Normalizer Values Example
Range Normalized Value
-infinity to -5 0
-5 to 0 1
0 to 5 2
5 to infinity 3
For example, use a balance difference normalizer to compare two balances in a group wallet to decide whether subscribers should pay the minimum or the actual usage charge. In this scenario:
  • 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.
Use the balance difference normalizer in a pricing component to compare Balances 1 and 2.
  • 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.