Balance and Meter Quantity Units

Quantity units specify the measurement in which a balance or meter amount is stored.

For balances, the quantity unit is determined by the balance quantity definition specified in a balance class: duration, volume, or none.
  • For balances that store a duration amount, the valid units are seconds, minutes, hours, days, and weeks.
  • For balances that store a volume amount, the valid units are bytes, kilobytes, megabytes, and gigabytes.
  • For balances that store a usage amount that does not have a duration or volume, such as SMS and MMS, or that store a currency amount, the quantity unit has a special value of none.
For meters, the quantity unit is determined by the measured quantity and quantity selector specified in the meter definition. The measured quantity can be a usage quantity or a charge quantity. When measuring a charge quantity, the quantity unit has a value of none. When measuring a usage quantity, the unit is determined by the usage quantity type specified as the quantity selector.
  • For meters that measure a duration amount, the valid units are seconds, minutes, hours, days, and weeks.
  • For meters that measure a volume amount, the valid units are bytes, kilobytes, megabytes, and gigabytes.
  • For meters measuring a service-specific usage type, such as SMS and MMS, the quantity unit has a value of none.
For each of these quantity types, if the meter is tracking a balance quantity, it must use the same unit of measure as the balance.
Note: You cannot add custom quantity unit types.
In addition to specifying a quantity unit for a balance class, you must also specify a balance and its quantity unit in the following pricing areas:
  • The balance impacted by a rating formula in a rate table.
  • The balance defined on which to normalize, as specified in a balance normalizer.
  • The balance whose amount is tracked by a meter.
  • The balance whose amount is used as the scale basis for a rating formula. This is applicable when the Quantity Definition for a rate table is Balance Value.

In each of these areas, specify a quantity unit that makes the most sense, regardless of the quantity unit in which a balance stores its value. For example, a rating formula for charging a prepaid data balance can specify the impact in bytes even though the balance stores the data in megabytes, kilobytes, or gigabytes. During rating, if a quantity unit specified in any of these pricing areas is different from the balance quantity unit, the balance quantity unit is converted to match the specified unit before performing calculations or rating normalizations.

When specifying a quantity unit, also take into consideration whether beats are to be used during service usage. The balance unit and beat unit are reliant and if they are much different in size, there is less precision during calculations. For information about rounding, see the discussion about balance and meter precision.

Important: For meters that measure a volume amount and balances that store a volume amount, the valid units are based on the powers of 2 convention and not the powers of 10. For example, a kilobyte is recognized as 2^10 bytes = 1024 bytes.