Balance Selection During Rating
To determine which price components are applicable during rating, the balances associated with the contained rate tables are checked in the order they are listed within each price component to see if they can be impacted.
- For balances from different balance templates, the balance template with the highest priority is selected.
- For charges, the balance selected is the one that expires first and is below the credit limit. If there are no charges (neither the scaled part nor the fixed part has a positive coefficient), the rate table applies even if the balance is at the credit limit. A balance below the credit limit is chosen over a balance that is at or above the credit limit, even if the one over the credit limit expires first.
- For grants, the balance selected is the one that expires last, regardless of the credit limit. A grant to template T on first-usage of template T grants into the balance and period that triggered it (even if another balance and period expires later).
- For balance normalization, the normalization is performed on the sum of all valid balances, regardless of credit limit.
- For rating formulas that use a balance as the scaled basis, all valid balances are used (added together), regardless of the credit limit.
- Within a rollover balance, the asset specified by the balance template (rollover or current) is selected.
- An asset in a balance that does not require the creation of an on-demand period has higher priority.
- Assets that do not require payment of first-usage charges have a higher priority for usage charges than those that do.
- If none of the previous rules can be applied, the asset in the balance with the lowest resource ID is selected.
For meters, all meters below the credit limit apply. If a meter that should be applied is at or above the credit limit, no further charging or authorization is allowed. A meter is always applied during rating if it is tracking the usage quantity or event occurrence (a turnstile meter). If it is tracking a charged amount to a balance, it is applied if there is a charge applied to that specified balance.
Filters on the balance are also examined during rating to determine whether the balance is applicable. If a filter makes a balance invalid, it is not available for updates.
The rating formulas for charges are determined and combined before examining the meters. From the balances selected, the MATRIXX Charging Application determines which meters must be applied and stops charging or authorizing when a meter is at its credit limit. For example, if a requested usage amount is a quantity of X, a quantity between 0 and X can be authorized. If this quantity is less than X, for example, Y, the meters are examined and based on their credit limits, they might further reduce the authorized amount to a quantity between 0 and Y.
If there are no valid balances defined in a rate table being examined, the rate table is not used and the next one is examined. After a balance is selected, the MATRIXX Charging Application determines which row in a rate table matches all normalized parameter values that are valid and performs rating based on the formula in that row. Parameter values can include attributes of the event, subscriber, device, and balances. If the selected rate table row has a Skip value instead of a rating formula, the next rate table is examined. If the row has a Deny value, the error is returned to the network and rating does not occur. If the rate table row has a rating formula, it is used to impact the subscriber's balance.
If a balance is at or above the credit limit, normalizations are still applied to select a row in a rate table. If a rating formula defines a charge for a zero amount, the rate table is used because the charge can be applied. If a rating formula charges a positive amount, the rate table is skipped and the next rate table in the price component is examined. After all rate tables in a price component have been examined, the next price component in the product offer is examined, and so on. This process occurs for all product offers owned by the subscriber that are valid for the event and service type.