General Ledger Event Contents

The MATRIXX Charging Server generates specific financial information in events that can be loaded by a third-party General Ledger (GL) or Enterprise Resource Planning (ERP) system.

GL Information is stored in GlInfoArray (an array in MtxEventGlInfo) in the MtxEvent Event Detail Record (EDR). For more information about MtxEventGlInfo fields, see the discussion about MtxEventInfoGlInfo.

GL information is generated for each charge record that has an actual currency balance impact. In addition, GL information is generated for impacts to assets designated as liability assets in usage, adjustment, top-up, cancel, forfeiture, transfer, rollover, and usage refund events. This includes pseudo-currency balances, which are charged like currency, but are assets (for example, awarded bonus dollars). The liability asset flag must be configured in My MATRIXX for pseudo-currency balances.

For more information about setting the liability asset, see the discussion about configuring balance template general properties in My MATRIXX Help.

Separate charge records and GL information are generated for product offer components and bundle components, even if the product offer and bundle are for the same balance instance and balance impact type (charge, discount, grant, and so forth). If an event impacts multiple balances of any type, separate charge records and separate GL information are generated for each balance.
Note: If a charge is to a non-liability asset, no GL information is generated.
MATRIXX GL information includes the following data:
  • A reference to a balance update record for the currency balance impacted.
  • A reference to the applied offer record for the associated purchased offer. GL records are combined only when they are associated with the same applied offer. The applied offer record includes the tax rate field that can be used for downstream GL posting and reporting. The value comes from the tax classification set in My MATRIXX. For more information about tax classification, see the discussion about tax classes in My MATRIXX Help.
  • The names of the GL debit and credit accounts affected by the transaction. The MtxEventGlInfo.Account1 field in the event is the debit account, and the MtxEventGlInfo.Account2 field is the credit account.
  • The name of an optional breakage account. A breakage account is credited when revenue is considered earned, instead of a revenue account. However, service or supply is not provided. The MtxEventGlInfo.Account3 field is the breakage account.
  • The impact amount. The amount is the absolute amount by which a currency balance or a liability asset is impacted.
  • The purchased asset. When a balance impact is due to a charge, discount, or tax, the GL info record includes the asset purchased (AssetBalanceUpdateIndex) and asset amount (AssetAmount). If the asset is in a different wallet, then the AssetWalletId and AssetResourceId fields are included in the GL info record also.
  • If a discount is applied to more than one charging offer, then each offer has its own event charge record.
  • The balance update type. The balance update type indicates what caused the impact to the balance. For example, the UpdateType for a charge is 1 and for a discount is 2. For a complete description of the UpdateType values, see the discussion about charge records.
  • The type of revenue recognition. Revenue recognition types include:
    • Immediate
    • Per-day
    • Consumption-based
    • Pending activation
    • Pending settlement

    For more information about revenue recognition types, see the discussion about recognizing revenue.

  • A GL transaction type. A GL transaction type is an integer value with a user-friendly description defined by the pricing administrator that acts as a use-case identifier. A transaction type is associated with a balance using matrices defined in My MATRIXX by pricing administrators. For more information about GL transaction types, see the discussion about creating a GL transaction type in My MATRIXX Help.
  • The start and end dates (if the revenue recognition type is per-day or consumption-based). For an asset, the values are the start and end dates of the asset's validity period. If the end date of the asset changes, a separate event is generated with the new end date. If a currency charge purchases an asset, the start and end dates are the period of the asset. For a recurring charge that does not purchase an asset, the start and end dates are the period of the cycle triggering the charge.
  • A reference to the balance update record for the asset (if the currency charge pays for an asset). The value is an index into the balance update array in the event. If the asset is in a different wallet (such as a grant to a tier group), then the balance update record is in a different event. In this case, the GL information record does not reference a balance update record, but it includes the following information:
    • The ID of the wallet holding the asset.
    • The resource ID of the asset within that wallet.
    • The interval ID of the asset balance period (for periodic and on-demand asset balances).
  • Any specified transaction attributes. Each GL transaction can have an optional list of attributes and values, for example, a sequence number. The attributes and values to be copied to events are from the GL Transaction Profiles defined in My MATRIXX. For more information about GL transaction profiles, see the discussion about creating a GL transaction profile in My MATRIXX Help.
  • References to any other associated GlInfo items in the GlInfoArray that are affected by the same charge impact. These references are in AssociatedGlInfoIndex fields and are originally configured in GL transaction profiles. For example, if a GlInfoArray at position[0] has an AssociatedGlInfoIndex of 1, the GlInfoArray at position[0] is related to the GlInfoArray at position[1].
Usually, a charge record is not included in events for a charge of zero. However, when MATRIXX Engine is configured to include GL information in events, zero charge events are included. For example, if a charge of zero pays for an asset, GL information can be included to show the asset was purchased at no charge.

When different rates are applied to different portions of usage during rating, the total usage quantity reported might be segmented. GL information is calculated after rating the entire usage, not after each segment. Therefore, if different rates are applied to different segments but from the same product offers and impacting the same balance instances, the same GL information is reported for each segment. For example, if the rate for a currency usage charge changes at a peak/off-peak boundary but the same offer is applied, separate GL information is not generated for the peak/off-peak portions of the usage.

If the GL accounts are defined at acquisition and no overrides are used, events might not have Account1 and Account2 set in the GlInfoArray– for example, usage, cancel, or forfeiture events.

Sample Event

The following sample shows GL information in an event:
<container name='MtxResponseEventInfo'>
    <list name='EventList' type='STRUCT'>
         <struct name='MtxPurchaseEvent'>
            <array name='OfferInfoArray' type='STRUCT' size='1'>
                <struct name='MtxPurchaseEventOfferInfo'>
                    <container name='MtxEventOfferInfo'  >
                        <field name='OfferId' type='UINT64' value='500624' />
                        <field name='OfferVersion' type='unsigned int32' value='0' />
                        <field name='ResourceId' type='unsigned int32' value='1' />
                        <field name='StartTime' type='datetime' value='1-01-01T00:00:00.000000Z' />
                        <field name='EndTime' type='datetime' value='65535-12-31T23:59:59.999999Z' />
                    </container>
                </struct>
            </array>
            <container name='MtxPrimaryEvent'  >
                <array name='EventTypeArray' type='unsigned int16' size='1'>
                    <value>4</value>
                </array>
                <array name='AppliedOfferArray' type='STRUCT' size='1'>
                    <struct name='MtxEventAppliedOffer'>
                        <field name='UsageQuantity' type='DECIMAL' value='1.0' />
                        <field name='UsageQuantityUnit' type='unsigned int32' value='0' />
                        <field name='ProductOfferId' type='UINT64' value='500624' />
                        <field name='ProductOfferOwnerId' type='OBJECT_ID' value='0:1:5:9' />
                        <field name='ProductOfferResourceId' type='unsigned int32' value='1' />
                        <field name='ProductOfferVersion' type='unsigned int32' value='0' />
                        <field name='ProductOfferIsTaxIncluded' type='BOOLEAN' value='1' />
                    </struct>
                </array>
                <array name='AppliedTaxArray' type='STRUCT' size='2'>
                    <struct name='MtxEventAppliedTax'>
                        <field name='Name' type='STRING' value='5% tax' />
                        <field name='ExternalId' type='STRING' value='5% tax' />
                        <field name='Rate' type='DECIMAL' value='0.05' />
                    </struct>
                    <struct name='MtxEventAppliedTax'>
                        <field name='Name' type='STRING' value='20% tax' />
                        <field name='ExternalId' type='STRING' value='20% tax (deferred)' />
                        <field name='Rate' type='DECIMAL' value='0.2' />
                    </struct>
                </array>
                <container name='MtxEvent'  >
                    <field name='InitiatorId' type='OBJECT_ID' value='0:1:5:9' />
                    <field name='Flags' type='unsigned int32' value='0' />
                    <field name='WalletId' type='OBJECT_ID' value='0:1:5:10' />
                    <field name='WalletOwnerId' type='OBJECT_ID' value='0:1:5:9' />
                    <array name='BalanceUpdateArray' type='STRUCT' size='2'>
                        <struct name='MtxBalanceUpdate'>
                            <field name='BalanceClassId' type='unsigned int32' value='840' />
                            <field name='BalanceTemplateId' type='UINT64' value='8409991' />
                            <field name='BalanceIntervalId' type='unsigned int32' value='1' />
                            <field name='BalanceResourceId' type='unsigned int32' value='1' />
                            <field name='BalanceStartTime' type='datetime' value='2009-11-01T00:00:00.000000-07:00' />
                            <field name='BalanceEndTime' type='datetime' value='2009-12-01T00:00:00.000000-08:00' />
                            <field name='Flags' type='unsigned int32' value='40' />
                            <field name='Amount' type='DECIMAL' value='5.0' />
                        </struct>
                        <struct name='MtxBalanceUpdate'>
                            <field name='BalanceClassId' type='unsigned int32' value='10000' />
                            <field name='BalanceTemplateId' type='UINT64' value='10001' />
                            <field name='BalanceIntervalId' type='unsigned int32' value='1' />
                            <field name='BalanceResourceId' type='unsigned int32' value='2' />
                            <field name='BalanceStartTime' type='datetime' value='2009-11-15T00:00:00.000000-08:00' />
                            <field name='BalanceEndTime' type='datetime' value='2009-12-15T00:00:00.000000-08:00' />
                            <field name='Flags' type='unsigned int32' value='0' />
                            <field name='Amount' type='DECIMAL' value='-50.0' />
                        </struct>
                    </array>
                    <list name='ChargeList' type='STRUCT'>
                        <struct name='MtxEventCharge'>
                            <field name='UsageQuantity' type='DECIMAL' value='1.0' />
                            <field name='UsageQuantityUnit' type='unsigned int32' value='0' />
                            <field name='AppliedOfferIndex' type='unsigned int16' value='0' />
                            <field name='BalanceUpdateIndex' type='unsigned int16' value='0' />
                            <field name='UpdateType' type='unsigned int32' value='1' />
                            <field name='Amount' type='DECIMAL' value='4.0' />
                            <field name='GlInfoIndex' type='unsigned int16' value='0' />
                            <field name='ImpactSource' type='UINT8' value='1' />
                        </struct>
                        <struct name='MtxEventCharge'>
                            <field name='UsageQuantity' type='DECIMAL' value='1.0' />
                            <field name='UsageQuantityUnit' type='unsigned int32' value='0' />
                            <field name='AppliedOfferIndex' type='unsigned int16' value='0' />
                            <field name='BalanceUpdateIndex' type='unsigned int16' value='0' />
                            <field name='UpdateType' type='unsigned int32' value='14' />
                            <field name='Amount' type='DECIMAL' value='0.8' />
                            <field name='GlInfoIndex' type='unsigned int16' value='1' />
                            <field name='ImpactSource' type='UINT8' value='1' />
                            <field name='AppliedTaxIndex' type='unsigned int16' value='1' />
                        </struct>
                        <struct name='MtxEventCharge'>
                            <field name='UsageQuantity' type='DECIMAL' value='1.0' />
                            <field name='UsageQuantityUnit' type='unsigned int32' value='0' />
                            <field name='AppliedOfferIndex' type='unsigned int16' value='0' />
                            <field name='BalanceUpdateIndex' type='unsigned int16' value='0' />
                            <field name='UpdateType' type='unsigned int32' value='14' />
                            <field name='Amount' type='DECIMAL' value='0.2' />
                            <field name='GlInfoIndex' type='unsigned int16' value='2' />
                            <field name='ImpactSource' type='UINT8' value='1' />
                            <field name='AppliedTaxIndex' type='unsigned int16' value='0' />
                        </struct>
                        <struct name='MtxEventCharge'>
                            <field name='UsageQuantity' type='DECIMAL' value='1.0' />
                            <field name='UsageQuantityUnit' type='unsigned int32' value='0' />
                            <field name='AppliedOfferIndex' type='unsigned int16' value='0' />
                            <field name='BalanceUpdateIndex' type='unsigned int16' value='1' />
                            <field name='UpdateType' type='unsigned int32' value='3' />
                            <field name='Amount' type='DECIMAL' value='-50.0' />
                            <field name='ImpactSource' type='UINT8' value='1' />
                        </struct>
                    </list>
                    <field name='GlDate' type='DATE' value='2009-11-15' />
                    <array name='GlInfoArray' type='STRUCT' size='3'>
                        <struct name='MtxEventGlInfo'>
                            <field name='BalanceUpdateIndex' type='unsigned int16' value='0' />
                            <field name='AppliedOfferIndex' type='unsigned int16' value='0' />
                            <field name='Account1' type='STRING' value='account1_c' />
                            <field name='Account2' type='STRING' value='account2_c' />
                            <field name='Amount' type='DECIMAL' value='4.0' />
                            <field name='RevenueRecognitionType' type='unsigned int32' value='3' />
                            <field name='RevenueRecognitionStartDate' type='DATE' value='2009-11-15' />
                            <field name='RevenueRecognitionEndDate' type='DATE' value='2009-12-15' />
                            <field name='TxnType' type='unsigned int32' value='2000' />
                            <field name='AssetAmount' type='DECIMAL' value='-50.0' />
                            <field name='AssetBalanceUpdateIndex' type='unsigned int16' value='1' />
                            <field name='UpdateType' type='unsigned int32' value='1' />
                        </struct>
                        <struct name='MtxEventGlInfo'>
                            <field name='BalanceUpdateIndex' type='unsigned int16' value='0' />
                            <field name='AppliedOfferIndex' type='unsigned int16' value='0' />
                            <field name='Account1' type='STRING' value='account1_c' />
                            <field name='Account2' type='STRING' value='account2_20%_tax' />
                            <field name='Amount' type='DECIMAL' value='0.8' />
                            <field name='RevenueRecognitionType' type='unsigned int32' value='3' />
                            <field name='RevenueRecognitionStartDate' type='DATE' value='2009-11-15' />
                            <field name='RevenueRecognitionEndDate' type='DATE' value='2009-12-15' />
                            <field name='TxnType' type='unsigned int32' value='2000' />
                            <field name='AssetAmount' type='DECIMAL' value='-50.0' />
                            <field name='AssetBalanceUpdateIndex' type='unsigned int16' value='1' />
                            <field name='UpdateType' type='unsigned int32' value='14' />
                        </struct>
                        <struct name='MtxEventGlInfo'>
                            <field name='BalanceUpdateIndex' type='unsigned int16' value='0' />
                            <field name='AppliedOfferIndex' type='unsigned int16' value='0' />
                            <field name='Account1' type='STRING' value='account1_c' />
                            <field name='Account2' type='STRING' value='account2_5%_tax' />
                            <field name='Amount' type='DECIMAL' value='0.2' />
                            <field name='RevenueRecognitionType' type='unsigned int32' value='1' />
                            <field name='TxnType' type='unsigned int32' value='2000' />
                            <field name='AssetAmount' type='DECIMAL' value='-50.0' />
                            <field name='AssetBalanceUpdateIndex' type='unsigned int16' value='1' />
                            <field name='UpdateType' type='unsigned int32' value='14' />
                        </struct>
                    </array>
                    <field name='DeleteCode' type='UINT8' value='2' />
                </container>
            </container>
        </struct>
    </list>
    <field name='QueryCursor' type='UINT64' value='0' />
    <container name='MtxResponse'  >
        <field name='RouteId' type='unsigned int16' value='1' />
        <field name='Result' type='unsigned int32' value='0' />
        <field name='ResultText' type='STRING' value='OK' />
    </container>
</container>

Example Payment Event

The following example shows GL information included in a payment event:
<struct name='MtxPaymentEvent'>
  <container name='MtxPrimaryEvent'  service_provider_schema='2'>
      <array name='EventTypeArray' type='unsigned int16' size='1'>
          <value>27</value>
      </array>
      <container name='MtxEvent'  service_provider_schema='2'>
          <field name='InitiatorId' type='OBJECT_ID' value='0:1:5:1' />
          <field name='Flags' type='unsigned int32' value='0' />
          <field name='WalletId' type='OBJECT_ID' value='0:1:5:2' />
          <field name='WalletOwnerId' type='OBJECT_ID' value='0:1:5:1' />
          <array name='BalanceUpdateArray' type='STRUCT' size='1'>
              <struct name='MtxBalanceUpdate'>
                  <field name='BalanceClassId' type='unsigned int32' value='840' />
                  <field name='BalanceTemplateId' type='UINT64' value='8409991' />
                  <field name='BalanceResourceId' type='unsigned int32' value='1' />
                  <field name='BalanceStartTime' type='datetime' value='1-01-01T00:00:00.000000Z' />
                  <field name='BalanceEndTime' type='datetime' value='65535-12-31T23:59:59.999999Z' />
                  <field name='Flags' type='unsigned int32' value='8' />
                  <field name='Amount' type='DECIMAL' value='-20.0' />
              </struct>
          </array>
          <list name='ChargeList' type='STRUCT'>
              <struct name='MtxEventCharge'>
                  <field name='UsageQuantity' type='DECIMAL' value='0.0' />
                  <field name='UsageQuantityUnit' type='unsigned int32' value='0' />
                  <field name='BalanceUpdateIndex' type='unsigned int16' value='0' />
                  <field name='UpdateType' type='unsigned int32' value='13' />
                  <field name='Amount' type='DECIMAL' value='-20.0' />
                  <field name='GlInfoIndex' type='unsigned int16' value='0' />
                  <field name='ImpactSource' type='UINT8' value='1' />
              </struct>
          </list>
          <field name='EventTime' type='datetime' value='2009-11-15T09:00:00.000000-08:00' />
          <field name='EventId' type='STRING' value='DQW0:1:52:2' />
          <field name='GlDate' type='DATE' value='2009-11-15' />
          <array name='GlInfoArray' type='STRUCT' size='1'>
              <struct name='MtxEventGlInfo'>
                  <field name='BalanceUpdateIndex' type='unsigned int16' value='0' />
                  <field name='Account1' type='STRING' value='account1_c' />
                  <field name='Account2' type='STRING' value='account2_e' />
                  <field name='Amount' type='DECIMAL' value='20.0' />
                  <field name='RevenueRecognitionType' type='unsigned int32' value='1' />
                  <field name='TxnType' type='unsigned int32' value='3000' />
              </struct>
          </array>
          <field name='GlCenter' type='STRING' value='GLC1' />
          <field name='DeleteCode' type='UINT8' value='2' />
      </container>
  </container>
</struct>