• User Guide
  • Airbridge Playbooks

Collecting Order Cancel Events for Accurate Sales Performance Measurement

To accurately measure sales performance, you must collect data not only on completed purchases but also on canceled purchases, as returns and refunds can significantly impact the final numbers.

 

Collecting Order Cancel Events

The Order Cancel event is one of the Standard Events provided by Airbridge. This event can be viewed in the Actuals Report and the raw data export files.

An Order Complete event must always precede an Order Cancel event. Several data points must match between the Order Complete and Order Cancel events to accurately calculate net revenue. For example, the product price of the canceled purchase must match the product price of the completed purchase that preceded it.

Mapping order cancel events and order complete events

To make sure both the Order Purchase event and the Order Cancel event have the same information, you need to map them. This means adding the Order Purchase event's Transaction ID as the Transaction ID of the Order Cancel event.

Refer to the sample code below.

1234567891011121314151617181920
airbridge.events.send("airbridge.ecommerce.order.canceled", {
  semanticAttributes: {
    transactionID: '1458132a-0d09-4944-a686-fcbee81b74f7',
    transactionPairedEventTimestamp: 1599186193324,
    totalValue: 99000,
    products: [{
      productID: "1234",
      name: "Nike 1",
      price: 55000,
      currency: "KRW",
      quantity: 1
    }, {
      productID: "1235",
      name: "Nike 2",
      price: 44000,
      currency: "KRW",
      quantity: 1
    }]
  }
});

The semantic attribute of the Order Cancel event is as follows.

 

How to view actual sales performance

Navigate to the [Raw Data]menu and export Order Complete and Order Cancel event data. By organizing this data according to Transaction ID, you can view the actual sales performance. By visualizing the actual sales performance by channel, you can see the channel-specific sales performance, excluding canceled purchases.

Applying to Other Events

Cancellations of bookings also impact performance. Defining and collecting cancellation events is crucial for accurate performance measurement. A cancellation event registers when a previous event is canceled.

Defining Cancellation Events

A cancellation event registers when a prior event is canceled. For example, a booking cancellation event occurs when a booking event that has been collected is canceled.

You can define cancellation events as Custom Events. Set the semantic attributes of the Custom Event as follows:

  • semanticAttributes.transactionType: Set to "cancel"

  • semanticAttributes.transactionPairedEventCategory: Set to the category of the event being canceled (e.g., "booking")

Order Cancel events are Standard Events and require no additional configuration. Their semantic attributes are set as follows:

  • semanticAttributes.transactionType: "cancel"

  • semanticAttributes.transactionPairedEventCategory: The category of the completed purchase event (airbridge.ecommerce.order.completed)

Refer to the sample code below.

12345678
airbridge.events.send("reservation_cancel", {
  semanticAttributes: { 
    transactionID: '1458132a-0d09-4944-a686-fcbee81b74f7', 
    transactionType: 'cancel', 
    transactionPairedEventCategory: 'reservation', 
    transactionPairedEventTimestamp: 1599186193324,
  },
});

Attribution rules for cancellation events

An Airbridge event is considered a cancellation event if it meets at least one of the following conditions:

  • It is a purchase cancellation event (airbridge.ecommerce.order.canceled).

  • It has "cancel" set as the value of semanticAttributes.transactionType.

The Airbridge attribution modelalways measures cancellation events as having no winning touchpoint. The cancellation events are always displayed as "unattributed" in the Airbridge reports.

Was this page helpful?

Have any questions or suggestions?