Balance Template Extension

Balance templates can be extended during configuration to include custom fields that hold provider-specific information. The custom fields can be identified in normalizers to influence how charging occurs. The field values are automatically included in notifications and Event Detail Records (EDRs) in the TemplateAttr field.

Before adding custom fields to a balance or meter template, integrators must use the create_config.py script to add a custom MATRIXX Data Container (MDC) that extends the MtxBalanceTemplateExtension MDC and add the custom fields to the extension. MATRIXX recommends adding Extension to the end of the MDC, for example, CustomBalanceTemplateExtension, but it is not required. When a template extension is selected in My MATRIXX, all fields defined in the custom MDC are displayed in Custom Balance Fields with the field name type specified when the custom MDC was created.

For more information about adding custom MDCs and fields, see the discussion about MDC and MDC field extension configuration in MATRIXX Configuration. For information about adding custom fields to balance and meter templates, see the discussions about adding custom fields in My MATRIXX Help.

Normalization

Only tax selectors can normalize on balance template extensions. Tax selectors define the criteria for choosing a tax selection profile as a set of normalized values. During rating, the normalizers associated with a tax selector are used to compare one or more parameters to a value and when MATRIXX Engine finds a match, it selects an index in the tax-selector matrix which leads to the tax selection profile (result) to apply. For more information, see the discussion about tax selectors in My MATRIXX Help.

Events and Notifications

Custom balance template extension attributes are included in events and notifications when an event or notification is to include balance template information.

Queries

When querying a balance with MtxRequestPricingQueryBalance, the MtxResponsePricingBalance includes any balance template extensions in the MtxPricingBalanceDetailInfo. For other types of queries, the MtxBalanceInfo.BalanceTemplateAttr field is populated and used in the response of the following requests:
  • MtxRequestSubscriberQuery
  • MtxRequestSubscriptionQuery
  • MtxRequestGroupQuery
  • MtxRequestSubscriberQueryWallet
  • MtxRequestGroupQueryWallet