Balance and Meter Quantity Units
Quantity units specify the measurement in which a balance or meter amount is stored.
- 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 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.
- 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.