Notification Templates

Each notification template contains fields specific to its related notification type and a number of fields common to all of the templates. The field values are included in the message sent to the subscriber.

Common Fields in Notification Templates lists the common fields in each template.
Table 1. Common Fields in Notification Templates
Field Description
firstName The first name of the contact.
lastName The last name of the contact.
emailId The email ID of the contact.
phoneNumber The phone number of the contact.
timeZone The subscriber's time zone.

The time zone must correspond to one of the standard IANA Time Zone Database names defined in the mtx_config.xml file.

Cost Balance and Tax Information in Notification Templates

The following notifications contain lists of updated balances that may include cost and tax information.
  • MtxOfferPurchaseNotification
  • MtxBundlePurchaseNotification
  • MtxOfferCancelNotification
  • MtxBundleCancelNotification
  • MtxAutoRenewChargeNotification
  • MtxEventChargeNotification
  • MtxFirstUsageChargeNotification
  • MtxChargeNotification
  • MtxPaymentNotification
  • MtxRechargeNotification
The message templates for these notifications reference the re-usable templates for cost and tax information in Re-usable Templates for Cost and Tax Information.
Table 2. Re-usable Templates for Cost and Tax Information
Template Description
mtxBalanceCost.ftl Includes just the cost of the operation (any balance impacts (MtxBalanceImpactInfo) that include IsCost). If the balance is an actual currency balance, the balance total for the currency is included.
mtxBalanceCostandBreakdown.ftl Includes the balance cost information and the list of charges, taxes, and the total amount. For example:
  • Charge $9.00
  • Tax $1.25
  • Total $10.25
mtxBalanceCostPerOfferBreakdown.ftl For each offer, includes the balance cost information, the list of charges, taxes, and the total amount.
mtxBalanceNoCostPerOfferBreakdown.ftl For each offer, includes the balance cost information, the list of charges, taxes, the total amount, and balance information for balances that are not cost balances.
The cost balance information in the re-usable templates includes the fields listed in Cost Balance Template Fields. To understand how this information is presented in the messages, look at the individual re-usable templates. You can edit these templates to present the information according to your business needs. In addition, you can configure the notifications listed in Re-usable Templates for Cost and Tax Information to use any of the re-usable cost balance templates.
Table 3. Cost Balance Template Fields
Field Description
balanceImpactGroupList A list of balanceImpactGroup.
--balanceImpactGroup A group of balance impact information (MtxBalanceImpactInfoGroup).
----sourceEventType The top-level type of the event where the balance impacts originated (for example, 1 = usage, 2 = usage_refund).
----cycleStartTime The start time of the cycle (set only if SourceEventType is recurring).
----cycleEndTime The end time of the cycle (set only if SourceEventType is recurring).
----balanceImpactList A list of balance impact information.
------balanceName The balance name.
------balanceStartTime The balance start time.
------balanceEndTime The balance end time.
------flags
  • 1 = Subscriber
  • 2 = Group
------isCost True if the balance is a cost balance. False otherwise.
------impactAmount The balance impact amount.
------currentBalanceAmount The current balance amount.
------currencySymbol The balance currency symbol.
------displayQuantityUnit How the quantityUnit is displayed (such as Minutes).
------quantityUnit A string that identifies the quantity unit (such as minutes).
------isMainBalance True if the balance is a main balance, otherwise false.
------isActualCurrency True if the balance is an actual currency balance, otherwise false.
------balanceImpactOfferList A list of applied offers or bundles.
--------balanceImpactBreakDown A map that contains balance breakdown per update type.
  • key: updateType — The type of balance update
  • value: amount — The update amount
Includes the following for each element in balanceImpactOfferList:
  • catalogItemName — The catalog item name
  • offerName — The offer name (when flags = 1)
  • bundleName — The bundle name (when flags = 2)
  • flags — The type of offer purchased
    • 0 = no applied offer
    • 1 = purchased_offer
    • 2 = purchased_bundle
  • totalPerUpdateType (map)
    • key: updateType
    • value: amount
--------balanceImpactUpdateList Includes the following for each element in balanceImpactUpdateList:
  • updateType — The type of balance update
  • amount — The update amount
  • nonProratedAmount — The non-prorated update amount
totalCostPerCurrencyActual A map that shows the breakdown per actual currency for the balance impact group.
  • key: classId
  • value: balanceClassDetails — A map (<String, Object>)
    • amount — The balance amount
    • currencySymbol — The balance currency symbol
    • breakDown A map for the per-currency balance impact
      • key: classId — The balance class ID
      • value: amount — The currency balance impact
totalCostPerCurrencyPseudo A map that shows the breakdown per pseudo currency for the balance impact group.
  • key: classId
  • value: balanceClassDetails — A map (<String, Object>)
    • amount — The balance amount
    • currencySymbol — The balance currency symbol
    • breakDown A map for the per-currency balance impact
      • key: classId — The balance class ID
      • value: amount — The currency balance impact
totalNoCostBalance A map that shows the breakdown for the no-cost balance impact group.
  • key: classId — The balance class ID
  • value: balanceClassDetails
    • amount — The balance amount
    • displayQuantityUnit — How the quantityUnit is displayed (such as Minutes)
    • quantityUnit — A string that identifies the quantity unit (such as minutes)
    • breakDown A map for the no-cost balance impact
      • key: classId — The balance class ID
      • value: amount — The balance amount
See the discussion about notification message fields for more information about the fields included in each notification message.