Defines a single billable metric, such as profiles or emails sent, that subscription usage is measured and priced against. Instances are loaded from the usage-factors.xml configuration file (each element deserialised via the usage-factor XStream alias) and held in a UsageFactors list. KademiSubscriptionManager reads the referenced data series to total or sum the raw usage, then applies the scale factor to convert it to the billed quantity and units shown to the customer.

Group: Subscriptions


Properties

PropertyReturnsDescription
idStringIdentifier for this usage factor, for example "profiles" or "webhits-mau". Used to look up matching license inclusions and tier overrides when calculating overage.
scaleFactorintDivisor applied to the raw usage figure to convert it into the quantity that is billed, for example dividing minutes by 60 to bill in hours. Defaults to 1 when no scaling is required.
seriesNameStringName of the sales data series that this usage factor reads its raw usage figures from.
skuStringProduct SKU that this usage factor is billed under, or null if it is not billed as a separate line item.
typeUsageFactorTypeWhether the raw usage figures for this factor should be totalled (the latest recorded value is used as-is) or summed (daily values are added together over the license period).
unitsStringLabel for the units this factor is reported in after the scale factor has been applied, for example "hours" or "profiles (1000s)". May be null when the raw value needs no unit label.

Methods

getId()

Returns: String

Identifier for this usage factor, for example "profiles" or "webhits-mau". Used to look up matching license inclusions and tier overrides when calculating overage.

getSeriesName()

Returns: String

Name of the sales data series that this usage factor reads its raw usage figures from.

getSku()

Returns: String

Product SKU that this usage factor is billed under, or null if it is not billed as a separate line item.

getType()

Returns: UsageFactorType

Whether the raw usage figures for this factor should be totalled (the latest recorded value is used as-is) or summed (daily values are added together over the license period).

getScaleFactor()

Returns: int

Divisor applied to the raw usage figure to convert it into the quantity that is billed, for example dividing minutes by 60 to bill in hours. Defaults to 1 when no scaling is required.

getUnits()

Returns: String

Label for the units this factor is reported in after the scale factor has been applied, for example "hours" or "profiles (1000s)". May be null when the raw value needs no unit label.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.