EDR Contents

Event Detail Record (EDR) content is derived from multiple MATRIXX Data Containers (MDCs), including MtxEvent, MtxPrimaryEvent, and MtxSecondaryEvent MDCs.

Primary Events

One primary event (MtxPrimaryEvent) is associated with the event initiator's wallet.
Note: The event initiator can be a subscription, group, user, or device. For usage events, the event initiator is always a subscription.
If an activity impacts multiple wallets, then multiple EDRs are generated with one primary event associated with the event initiator’s wallet, and one or more secondary events (MtxSecondaryEvent). You can use the EventId of a primary event to search the MATRIXX in-memory database and the Event Repository for primary events and balance impacts recorded in associated secondary events. Secondary events are not returned.
Note: You can configure date/time fields for primary events to be the time zone of the event initiator. For more information, see the discussion about configuring date/time fields.

See the discussion about querying events with the SubMan APIs for information about querying events.

Secondary Events

Secondary events are auxiliary to primary events, similar to an extension of a primary event. A primary event has secondary events when there are impacted wallets that are not owned by the event initiator. For example, if a subscription uses a shared balance to purchase an offer, the event is initiated by the subscription, but the purchase is paid by the group's wallet. In this example, there is a primary event (MtxPurchaseEvent) initiated by the subscription, and a secondary event with walletId=group_id and initiatorId=subscriber_id. In the MDC of the primary event, the SecondaryEventIdList field stores the event ID of each associated secondary event. In the MDC of the secondary event, the PrimaryEventId field stores the event ID of its primary event.
Note: You can configure date/time fields for secondary events to be the time zone of the wallet owner for secondary events. For more information, see the discussion about configuring date/time fields.

Secondary events do not duplicate the primary event balance impact information. A primary event and all its secondary events are recorded in the same MEF file.

The SecondaryEventType field in the MtxSecondaryEvent MDC indicates that the event is one of the following:
  • sponsor (1) — Indicates that the event is the sponsor.
  • balance transfer (4) — Indicates that the event is for a balance transfer.

Associated Events

An event can have a field such as AssociatedEventIdList or AssociatedEventId. These fields can be used to find related events. For example, if a subscription uses Pay Now to purchase an offer with recurring fees, multiple events are generated. The MtxPurchaseEvent has the eventId of the recurring event (in the AssociatedEventIdList field), and the MtxRecurringEvent has the event ID of the purchase event (in the AssociatedEventId field. In this example, the MtxPaymentAuthorizationEvent has the eventId of the recurring event or the purchase event (in the AssociatedEventIdList field), and the recurring or purchase event has the eventId of the MtxPaymentAuthorizationEvent in the PaymentAuthEventId field.

Note: Associated events are not an event type. Associated events refer to related events.

The event query REST APIs return events which can have the AssociatedEventIdList or AssociatedEventId fields.

See the discussion about querying events with the SubMan APIs for information about querying events.

Querying Events with the SubMan APIs

You can use the event REST APIs to query events initiated by the subscription or group specified in the query URL. These APIs return the primary events, and if a primary event has secondary events, the balance impact data from those secondary events is included in the balance impact lists of the primary event. All data from the secondary events are returned.
Note: When you query events initiated by a subscription or a group, if there is a secondary event, it does not impact the subscription or group. The secondary event is initiated by the subscription or group and has a balance impact on a different object's wallet.