Differentiating email and SMS event types
Some email and SMS activities have two events. Learn about their types and uses.
One event, two records
Most activities for email and SMS are recorded as a single event in Airship. However, some are represented by two events:
Default — These records are only for audience targeting when creating a message or segmentA reusable audience group you create by selecting unique or shared user data.. Like any other default event, they are available in your project automatically.
Custom — Because the activities originate outside Airship’s own SDKs, Airship records them as custom events. They can be used in, and appear in, all the same ways and locations as any other custom event.
They require setup in your project before you can use them. See Adding events to your project.
Where to use each event type
Use default events for the following:
- Audience targeting and segmentsA reusable audience group you create by selecting unique or shared user data.
- Sequence message conditions — See Trigger in Create a Sequence.
Use custom events for the following:
- The Custom Event automation trigger — See Custom Event in Automation and Sequence triggers.
- Automation cancellation events — See Cancellation Events in Create an Automation.
- Sequence exit events — See Exit events in Sequence outcomes.
- GoalsSelected events that generate a set of performance reports. Goal event attribution appears in message reports. You can also use Goals for measurement in Holdout Experiments and feature flag A/B tests.
Custom events also appear in Performance AnalyticsA customizable marketing intelligence tool that provides access to reports and graphs based on engagement data. as Dimensions and Measures. See Email in Performance Analytics and SMS in Performance Analytics. You can also use a dedicated Explore. See Custom queries and reference for the Custom Events Explore.
The Custom Event trigger for Scenes and In-App Automations requires events tracked by the Airship SDKs, so it can’t use email and SMS events, which come from delivery providers instead.
Email events
The following are the default and custom event names for email activities:
| Activity | Default event | Custom event |
|---|---|---|
| Bounce | email_bounce | bounce |
| Click | email_click | click |
| Delay | email_delay | delay |
| Delivery | email_delivered | delivery |
| Initial open | initial_open | initial_open |
| Injection | email_injection | injection |
| Open | email_open | open |
| Unsubscribe | email_unsubscribe | unsubscribe |
When adding the custom events to your project, use the values in the Custom event column.
For stream schemas and example payloads, see Custom Email Events in the Real-Time Data Streaming API reference. For segmentation properties and paths, see Email events in the Events Reference.
SMS events
The following are the default and custom event names for SMS activities:
| Activity | Default event | Custom event |
|---|---|---|
| Aborted | sms_aborted | aborted |
| Deleted | n/a | deleted |
| Delivered | sms_delivered | delivered |
| Dispatched | sms_dispatched | dispatched |
| Expired | sms_expired | expired |
| Failed | sms_failed | failed |
| RCS read | n/a | read |
| Rejected | sms_rejected | rejected |
| Short link click | short_link_click | n/a |
| Undeliverable | sms_undeliverable | undeliverable |
| Unknown | sms_unknown | unknown |
When adding the custom events to your project, use the values in the Custom event column.
For more on RCS read events, see RCS event reporting in RCS branded senders.
For stream schemas, see SMS delivery report in the Real-Time Data Streaming API reference. For segmentation properties and paths, see SMS events in the Events Reference.
Differentiating custom events using properties
The Custom Event trigger, Sequence exit events, and Automation cancellation events all match by the exact string you enter. If your app or website sends its own custom event with the same name as one listed in Email events or SMS events, for example an app event named click, it matches both your event and the Airship-generated one.
Rename your own event to remove this ambiguity for all future use. If renaming isn’t practical, such as with an established event already used elsewhere, you can filter the events by a property unique to the Airship-generated event, such as link_url for click.
When adding the custom events to your project, you only need to add properties you will use in filters or HandlebarsHandlebars is Airship’s templating language for personalization. Handlebars expressions use double curly braces wrapped around a content template, ranging from a simple variable, e.g., {{first_name}}, to complex evaluations of personalization data. personalization. For filtering steps, see the following:
- Filtering custom events for the Custom Event trigger in Automation and Sequence triggers — The same workflow applies to Automation Cancellation events.
- Configuring exit events and optional continuation in Sequence outcomes
Email custom event properties
Refer to these properties when configuring email custom events:
| Custom event | Properties |
|---|---|
bounce | bounce_class, bounce_event_type, email, sender, subject |
click | agent_family, device_brand, device_family, email, is_mobile, is_prefetched, link_name, link_url, os_family, os_version, sender, subject |
delay | email, sender, subject |
delivery | email, sender, subject |
initial_open | agent_family, device_brand, device_family, email, is_mobile, is_prefetched, os_family, os_version, sender, subject |
injection | email, sender, subject |
open | agent_family, device_brand, device_family, email, is_mobile, is_prefetched, os_family, os_version, sender, subject |
unsubscribe | unsubscribe_event_type |
All properties are strings, except is_mobile and is_prefetched, which take Boolean values.
These properties have specific values or behavior:
is_prefetchedis alwaysfalseon click events.link_nameis the name you assigned to the link.link_urlis the tracked URL the user selected.unsubscribe_event_typeislink_unsubscribeorlist_unsubscribe. See Unsubscribe events in Email content.
Message identifiers such as push ID, group ID, and campaign category are available for event segmentation using the paths in the Events Reference. In Real-Time Data Streaming they appear on triggering_push, not in the custom event properties object you add here.
SMS custom event properties
Refer to these properties when configuring SMS custom events:
| Property | Type | Description |
|---|---|---|
sender | String | The number or short code the message originated from |
vendor | String | The delivery service for the message |
vendorDeliveryId | String | A unique identifier for the message from the SMS vendor |
error_code | String | An error code from the short message service center, if applicable, for all custom events except read |
is_rcs | Boolean | Whether the message was delivered as RCS |
recipient_country_code | String | The country code of the message recipient, for read events |
number_of_message_parts | Number | The number of message parts delivered, for read events |
Any SMS custom event except read can also represent an MMS message. MMS shares the sender, vendor, error_code, and is_rcs properties above. MMS custom events also have the following properties:
| Property | Type | Description |
|---|---|---|
carrier_id | String | Identifies the carrier the message was sent through |
handset | String | The profile of the handset that received the message, only present when result_status is N102 |
result_code | String | A status code from the vendor, if applicable |
result_status | String | The delivery status of the message from the vendor |
sent_as | String | Whether the MMS was delivered as MMS or as SMS |
tracking_Id | String | An ID assigned by the delivery service, only available for CLX |
For the full schema, see SMS delivery report in the Real-Time Data Streaming API reference. For the RCS read report schema, see RCS read report in the same reference.