Balance Templates
A balance template has balance-specific information, including the balance name and ID, start and end dates, thresholds, whether it is a periodic balance, and whether it is shared by a group.
Each balance instance in a wallet points to the balance template for its properties information. Using pointers rather than copying all template data into each balance keeps the size of each wallet smaller and speeds processing. A balance instance can have a credit limit and notification thresholds set directly on it, but all other information about the balance is retrieved from the balance template stored in the in-memory pricing database. If the balance instance has credit limits and notifications set, they override the default values defined in the balance template.
Balance instances get added to subscriber and group wallets during catalog item purchases. When a subscriber or group purchases a product offer requiring a balance, an instance of it is added to the purchaser's wallet so impacts to it can occur during rating. The impacts can be the result of charges, discounts, grants, top-ups, payments, recharges, and adjustments. If a balance template indicates that the balance is a cost balance, all charges to the balance are included in the product offer cost. For more information about product offer cost, see the discussion about purchasing product offers.
- One per Start Time — If a balance instance exists in the wallet and it has the same start time as the one being added; no new instance is added to the wallet. The existing one is used. This is the default behavior.
- One per Wallet — If a balance instance exists in the wallet, it is used regardless of its start time. No new instance is added to the wallet. This method is typically used when customers want subscribers to have one balance or meter impacted for all services they own. If you use this balance instance creation policy for a currency balance, you can specify an additional optional property, main balance.
- One per Offer Purchase — Always create a new balance instance, regardless of whether an instance already exists. This method always creates a new balance instance for each offer requiring the balance that is associated with the catalog item being purchased. In this method, balances are created on a per offer basis. For bundles featuring different offers that require the same balance, each associated offer has its own balance instance.
- One per Catalog Item Purchase — Always create one unique balance instance per catalog item purchased. The catalog item has either an offer or bundle template. In this method, balances are created on a per purchase basis. In the case where the catalog item has a bundle template, if the bundle has offers that require the same balance template, this method creates only one balance instance for those offers.
Multiple product offers can require the same balance template or different balance templates. For example, a product offer providing voice service and a product offer providing data service can require the same U. S. Dollars balance or two separate balances, such as USD_voice and USD_data. When a subscriber owning both product offers uses either service, the usage is reflected against the associated balance. Balances can be impacted in real-time by subscribers and upstream systems and multiple balances can be impacted during rating.
A purge profile specifies an amount of time (purge delay) to wait after an offer or balance expires before being removed from the wallet. For more information about purge profiles, see the discussion about purge profiles in My MATRIXX Help.