# Automation and Sequence triggers

A trigger is an event that initiates an Automation or Sequence.

In an [Automation](https://www.airship.com/docs/guides/messaging/messages/sequences/create-automation/), configure triggers in the Setup step. Configure Sequences triggers in the [Journey MapA visualization of messaging components that can be connected to create a continuous user experience. You can also create and edit from the map.](/docs/guides/features/orchestration-experimentation/journeys/). See the [Trigger](https://www.airship.com/docs/guides/messaging/messages/sequences/create/create/#trigger) step in *Create a Sequence*.

## Trigger support by channel

The following table shows trigger support by channel:

| Trigger                                                                | App | Web | Email | SMS | Open |
|------------------------------------------------------------------------|-----|-----|-------|-----|------|
| [**Custom Event**](#custom-event)                                      | ✓   | ✓   | ✓     | ✓   | ✓    |
| [**Double Opt-In**](#double-opt-in)                                    |     |     | ✓     |     |      |
| [**First Seen**](#first-seen)                                          | ✓   | ✓   | ✓     | ✓   | ✓    |
| [**Inactivity**](#inactivity)                                          | ✓   | ✓   |       |     |      |
| [**Location**](#location)                                              | ✓   |     |       |     |      |
| [**Location Attributes**](#location-attributes)                        | ✓   |     |       |     |      |
| [**Predicted to Churn**](#predicted-to-churn)                          | ✓   | ✓   |       |     |      |
| [**Subscription**](#subscription)                                      | ✓   | ✓   | ✓     |     |      |
| [**Tag Change**](#tag-change)                                          | ✓   | ✓   | ✓     | ✓   | ✓    |
| [**Contact Association**](#contact-association)1                       | ✓   | ✓   | ✓     | ✓   | ✓    |
| [**Date Attribute**](#date-attribute)1                                 | ✓   | ✓   | ✓     | ✓   | ✓    |
| [**Feature Flag Interaction Event**](#feature-flag-interaction-event)1 | ✓   | ✓   |       |     |      |
| [**Manual Entry**](#manual-entry)1                                     | ✓   | ✓   | ✓     | ✓   | ✓    |
| [**Recurring Schedule**](#recurring-schedule)1                         | ✓   | ✓   | ✓     | ✓   | ✓    |
| [**Specific Date and Time**](#specific-date-and-time)1                 | ✓   | ✓   | ✓     | ✓   | ✓    |

1\. Supported for Sequences only.

## Triggers

Follow these steps to configure each trigger.

### Contact Association

The Contact Association trigger initiates a Sequence when an anonymous channel is associated with a [Named UserA customer-provided identifier used for mapping multiple devices and channels to a specific individual.](/docs/guides/audience/named-users/). After selecting the trigger, no setup is required.

### Custom Event

The *Custom Event trigger* initiates an Automation or Sequence when a Custom Event associated with members of your audience occurs. See: [Custom Events](https://www.airship.com/docs/guides/audience/events/custom-events/).

Configuration steps:

1. Search for and select an event. Results are limited to events that occurred in the last 30 days. If the event name you search for does not appear, click **Use \[search term]** to use the event name as typed.
2. (Optional) Click **Add Another** to add more events. Airship handles multiple events as a boolean OR.
3. (Optional) Follow the [Filtering Custom Events](https://www.airship.com/docs/guides/messaging/messages/sequences/triggers/#filtering-custom-events) steps to add custom event filters.
4. (Optional) Set the maximum age for the events. If an event is received after it is older than a certain age, the automation or sequence will not start.
   
   1. Enable *Event Expiration*.
   2. Enter a value in minutes, hours, days, months, or years.

Tip

If you are a [Radar](https://radar.io/)  customer and have configured the [Airship and Radar integration](https://www.airship.com/docs/integrations/radar/), Radar location events and properties will be available for use with the Custom Event trigger.

#### Filtering Custom Events

When configuring the [Custom Event trigger](#custom-event) or Automation [Cancellation Events](#cancellation-events), you can filter them using their associated numeric values or by key/value properties attached to the events. Filtering events this way can help you more precisely target your audience.

For example, if you have a custom event named “Purchase”, with a purchase category `fedoras` and a value `125.0` representing the dollar amount of the purchase, you can add these criteria to the Purchase event so that your message is only seen by users spending at least $125 on fedoras.

Note

- Properties are only available for [custom events defined in your project](https://www.airship.com/docs/guides/audience/events/manage/).
- Acceptable values and operators for event properties are based on configuration settings when adding the events to your project.
- The filter **does not** show events and event properties for custom events associated with [Named UsersA customer-provided identifier used for mapping multiple devices and channels to a specific individual.](/docs/guides/audience/named-users/). You can still use events associated with named users as triggers, but you must enter their information manually.

<!--THE END-->

1. Select **Add event properties** for the custom event.
2. Select **Add property**, then **Search for properties** and search for a property, or select **Add event value**.
3. If applicable, select the operator you want to use to evaluate the value or property.
4. Enter or select the event or property value you want to filter for.
5. (Optional) Select the plus icon () to add an alternative for a filter.
6. (Optional) Select **Add property** or **Add event value** to add more filters.
7. Select **All** or **ANY** to determine how to evaluate multiple filters and alternatives within each filter.
   
   - ALL = all criteria must be met (boolean AND)
   - ANY = any criteria must be met (boolean OR)
8. Select **Save**.

#### Filtering Custom Events using file upload

You can use file upload to provide multiple values to match against a specified event property’s value. **For string properties only.**

For example, for a point-of-sale system that emits events when a sale occurs, an event might have the following data:

```js
name: "sale-completed"
properties:
   customer_id: 234234
   store_id: 103843
   region: "northwest-usa"
```

To trigger only when sales occur in the regions of `northwest-usa` and `southwest-usa` but not `midwest-usa` or any other region, you would do the following to filter your custom events:

1. Search for or enter the property name `region`.
2. Select operator *File upload (is one of)*.
3. Upload a `.txt` file containing values `northwest-usa` and `southwest-usa`.

* * *

Provide your values in a line delimited `.txt` file. Each value must be on a separate line. 100 KB maximum file size.

### Date Attribute

The *Date Attribute trigger* initiates a Sequence for your entire audience or for a specified Segment based on the month and day of a date attribute. You can enter your selected audience into the Sequence on the next occurrence of the actual attribute date or a number of days before or after the date. See also [Segmenting your audience](https://www.airship.com/docs/guides/audience/segmentation/segmentation/) and [AttributesMetadata used for audience segmentation and personalization. They extend the concept of Tags by adding comparison operators and values to determine whether or not to target a user, helping you better evaluate your audience.](/docs/guides/audience/attributes/about/).

Configuration steps:

1. Select your audience: all users or a [SegmentA reusable audience group you create by selecting unique or shared user data.](/docs/guides/audience/segmentation/segments/).
2. (Segment audience only) Search for and select a segment. You can select **View segment detail** to open it for editing and confirm the audience.
3. Set when the audience should start the Sequence.
4. Search for and select a date attribute.

After saving, you can select the trigger card to view the segment name and scheduled send time relative to the attribute date. Select the name to open it for editing.

Note

Segmentation data is evaluated at send time. For example, if your sequence targets an audience list whose members change over time, it is sent to the current version of the list when the sequence is triggered.

### Double Opt-In

The *Double Opt-In trigger* initiates an Automation or Sequence when a member of your audience opts in to commercial email messaging. You must provide an opt-in link in the body of the message, and users must follow the link to confirm opting in.

You can filter the trigger by using properties attached to the opt-in event, and you can reference the properties using [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.](/docs/guides/personalization/handlebars/) to personalize the message content. If you choose to use properties in these ways:

- Your developer must add the properties when setting up email channel registration.
- You cannot search for properties when filtering. Instead, you will enter a property name, then opt to use the name as entered.
- The property name you enter when filtering (or for handlebars personalization) must be identical to the name in the `properties` object for the opt-in event.

For additional requirements and usage details, see: [Double Opt-InA process where users who sign up for messaging must confirm opting in before they can receive messages.](https://www.airship.com/docs/developer/api-integrations/email/getting-started/#double-opt-in).

In the Automation composer, first make sure that only the Email channel is enabled, then select the trigger. After selecting the trigger, no configuration is required, but you can filter by properties attached to the double opt-in event:

1. Select **Add Property**.
2. Enter a property in the search field and select **Use \[property]**.
3. Select the operator you want to use to evaluate the property.
4. Enter a value. Select to add additional values. Multiple values are evaluated as a boolean OR.
5. (Optional) Select **Add Property** to add more filters.
6. Select *ALL/ANY* to determine how to evaluate multiple filters and alternatives within each filter using a boolean *AND/OR*.
   
   - **AND** = all criteria must be met
   - **OR** = any criteria must be met

### Feature Flag Interaction Event

The Feature Flag Interaction Event trigger initiates a Sequence when a [Feature FlagAn experimentation tool for controlling the availability of content or functionality in your app or website. A flag’s Configurations determine the audience, schedule, and property values to apply when the flag is enabled. Flag properties enable making immediate code updates, bypassing the need for traditional code changes and release processes.](/docs/guides/experimentation/feature-flags/) interaction event occurs. You can trigger for users with access to the flagged feature, users who do not have access to the flagged feature, or both.

The interaction event must be implemented for the app or website. See [Interaction events](https://www.airship.com/docs/guides/experimentation/feature-flags/#interaction-events) in the *Feature Flags* guide.

Configuration steps:

1. Search for a flag by name, display name, or description.
2. Select who can trigger the Sequence:
   
   | Option                       | Description                                                                                              |
   |------------------------------|----------------------------------------------------------------------------------------------------------|
   | Users with feature access    | Trigger for members of the Feature Flag audience, which includes all Configuration audiences for a flag. |
   | Users without feature access | Trigger for users who are not members of the Feature Flag audience.                                      |
3. Enter the number of times the event must occur before the Sequence is triggered.

### First Seen

The *First Seen trigger* initiates an Automation or Sequence when members of your audience opt in to notifications or when a channel registration event, such as when the app launches in the background or a user opens your app for the first time, occurs. The behavior of the First Seen trigger varies by channel:

- **Apps:** Triggers the automation or sequence when a channel registration event occurs: when the app launches in the background or a user opens your app for the first time. See [Channel registration](https://www.airship.com/docs/guides/getting-started/developers/channels-intro/#channel-registration) in *Intro to Channels*.
- **Web, SMS, and open channels:** Triggers the automation or sequence when users opt in to notifications.
- **Email:** Triggers the automation or sequence when users opt in to commercial notifications.

To configure, select the First Seen trigger. No further setup is required.

Important

- Users added to Airship through [Create and SendA way to target recipients of a single channel type by providing a list of user identifiers when creating a message. You can send to email addresses, phone numbers, or Open channel addresses. Unknown identifiers are registered as new channels.](/docs/guides/audience/segmentation/bulk-sending/) are purposely excluded from the First Seen trigger, preventing them from receiving duplicate messages when added to the system.
- **Automation:** The First Seen trigger requires a delay of at least one hour to ensure delivery. Set a delay in the Delivery step in an automation.
- **Sequences:** For the First Seen trigger, a delivery delay shorter than one hour is allowed but may result in dropped sends. Set a delay as the first step when creating a new message.

### Inactivity

Note

For Sequences, the Inactivity trigger:

- Cannot be combined with other triggers. It must be the only trigger for a Sequence.
- Does not support adding [Conditions](https://www.airship.com/docs/guides/messaging/messages/sequences/create/create/#trigger).
- Cannot be used with the [App Open exit event](https://www.airship.com/docs/guides/messaging/messages/sequences/create/outcomes/#exit-events).

The *Inactivity trigger* initiates an Automation or Sequence when a member of your audience does not use your app or website for a period of time. The inactivity period begins the later of **a)** the creation time of the automation or sequence, or **b)** the last app or website activity by the user.

To configure, enter the period of inactivity in days.

### Location

Note

The *Location* trigger requires [Gimbal integration](https://www.airship.com/docs/integrations/gimbal/).

The *Location trigger* initiates an Automation or Sequence based on an audience member’s device location. You can select a maximum of 20 locations per automation or sequence.

Configuration steps:

1. Click **Select a Location**.
2. Enter a search term. Results, if any, display on the map and are listed on the *Results* tab. There are two types of locations available for selection: [geofences and beacons](https://www.airship.com/docs/integrations/gimbal/#key-terms).
   
   Click a result for a detailed view of a location.
   
   [![Automation and Sequence triggers](/docs/images/location-search_hu_aac84774367b4811.webp "Automation and Sequence triggers")](/docs/images/location-search_hu_aac84774367b4811.webp)
   
   If selecting a geofence, the map will zoom to the selected location. Click and drag, and use the **+/-** zoom controls to change the displayed area.
   
   [![Automation and Sequence triggers](/docs/images/location-results_hu_2e41ddd1dbaa02dd.webp "Automation and Sequence triggers")](/docs/images/location-results_hu_2e41ddd1dbaa02dd.webp)
3. On the *Results* tab, check the box next to the locations you want to use as the trigger.
4. Review the *Selections* tab, then click **Save and continue**.
5. (Optional) Click **Select a Location** to add more locations.
6. Choose whether to trigger your automation or sequence when the user *enters* or *exits* a location.

### Location Attributes

Note

The *Location Attributes* trigger requires [Gimbal integration](https://www.airship.com/docs/integrations/gimbal/).

The *Location Attributes trigger* initiates an Automation or Sequence based on *key/value pair* metadata associated with a particular location. You can add a maximum of 50 location attributes per automation or sequence.

Configuration steps:

1. Enter a key/value pair for the location you want to use as the message trigger.
   
   [![Automation and Sequence triggers](/docs/images/location-attributes_hu_3f4922c696625a6b.webp "Automation and Sequence triggers")](/docs/images/location-attributes_hu_3f4922c696625a6b.webp)
2. (Optional) Click to add an alternative location attribute.
3. (Optional) Click **Add Another** to add more location attributes.
4. Select *ALL/ANY* to determine how to evaluate multiple location attributes and alternatives within each location attribute.
   
   - ALL = all criteria must be met (boolean AND)
   - ANY = any criteria must be met (boolean OR)
   
   Note
   
   By default, the automation or sequence is triggered if the audience meets ALL the location attributes. For example, if you selected ALL, with attributes `half_off` and `has_cafe`, you’d only reach users who enter or exit locations that meet both conditions. If you select ANY, you’d reach all users who enter a location running a half-off campaign as well as all users who enter a location that has a cafe.
5. Choose whether to trigger your automation or sequence when the user *enters* or *exits* a location.

### Manual Entry

Note

The Manual Entry trigger does not support adding [Conditions](https://www.airship.com/docs/guides/messaging/messages/sequences/create/create/#trigger).

The *Manual Entry trigger* initiates a Sequence for the audience members in a specified Segment. See also: [Segmenting your audience](https://www.airship.com/docs/guides/audience/segmentation/segmentation/).

Configuration steps:

1. Search for and select a [SegmentA reusable audience group you create by selecting unique or shared user data.](/docs/guides/audience/segmentation/segments/). You can select **View segment detail** to open it for editing and confirm the audience.
2. Select **Save** for the trigger configuration.
3. Select the card for the trigger you just saved. You can select the segment name to open it for editing.
4. Select **Enter** to enter the segment into the Sequence so they can start receiving messages.
   
   - **Enter** is not available until after the Sequence has been started.
   - If you enter the same segment into the Sequence more than once, the users may receive the same messages from the Sequence more than once.

Note

Segmentation data is evaluated at send time. For example, if your sequence targets an audience list whose members change over time, it is sent to the current version of the list when the sequence is triggered.

### Predicted to Churn

The *Predicted to Churn trigger* initiates an Automation or Sequence when Airship predicts an audience member’s likelihood of becoming inactive, or *churning*. [Predictive Churn](https://www.airship.com/docs/guides/features/intelligence-ai/predictive/predictive-churn/) analyzes your audience for users that exhibit behaviors indicating they are likely to become inactive, and tags the users as High, Medium, or Low Risk.

Note

To enable Predictive Churn features:

1. Next to your project name, select the dropdown menu (), then **Settings**.
2. Under **Project settings**, select **Predictive AI**.
3. Enable **Predictive App Churn** and/or **Predictive Web Churn**.

Configuration steps:

1. Select a risk profile.
   
   - **High risk:** Users most likely to become inactive.
   - **Medium risk:** Users who exhibit signs of potentially becoming inactive.
   - **Low risk:** Users least likely to become inactive.
2. Choose whether to apply the trigger when the risk is added or removed.

### Recurring Schedule

The *Recurring Schedule trigger* initiates a Sequence for the audience members in a specified Segment periodically at specified intervals. You can also set an end date for the Sequence and exclusion periods. See also: [Segmenting your audience](https://www.airship.com/docs/guides/audience/segmentation/segmentation/).

Configuration steps:

1. Search for and select a [SegmentA reusable audience group you create by selecting unique or shared user data.](/docs/guides/audience/segmentation/segments/). You can select **View segment detail** to open it for editing and confirm the audience.
2. Specify the delivery interval by number of hours/days/weeks/months/years. For weeks, also specify which days of the week when the Sequence will be triggered.
3. Set the initial date to trigger the Sequence.
4. Set the initial time and time zone to trigger the Sequence.
5. (Optional) Specify when the Sequence can no longer be triggered.
   
   1. Enable *End Date*.
   2. Enter a date.
   3. Set the time and time zone.
6. (Optional) Specify dates or days of the week when the Sequence should not be triggered. If you select the *hours* interval, you can also specify which hours of the day should be excluded. If you select the *weeks* interval, you can only specify which dates should be excluded.
   
   If the scheduled date and time fall during an excluded period, Airship waits to trigger until the next available valid time. For example, if you scheduled weekly on Thursdays but added the date for Thanksgiving Day as an exclusion, the next available trigger time would be the Thursday after Thanksgiving Day.
   
   1. Enable *Do not send*.
   2. Select **Add date exclusion**, enter a date, and repeat for additional dates.
   3. Select **Add day exclusion** and select days.
   4. Select **Add time exclusion** and set start and end times.

After saving, you can select the trigger card to view the segment name, interval, and initial scheduled date and time (UTC). Select the name to open it for editing.

Note

Segmentation data is evaluated at send time. For example, if your sequence targets an audience list whose members change over time, it is sent to the current version of the list when the sequence is triggered.

### Specific Date and Time

The *Specific Date and Time trigger* initiates a Sequence for the audience members in a specified Segment at a set date and time. See also: [Segmenting your audience](https://www.airship.com/docs/guides/audience/segmentation/segmentation/).

Configuration steps:

1. Enter a date in YYYY-MM-DD format and select the time and time zone.
2. Search for and select a [SegmentA reusable audience group you create by selecting unique or shared user data.](/docs/guides/audience/segmentation/segments/). You can select **View segment detail** to open it for editing and confirm the audience.

After saving, select the trigger card to view the segment name and scheduled date and time (UTC). Select the name to open it for editing.

Note

Segmentation data is evaluated at send time. For example, if your sequence targets an audience list whose members change over time, it is sent to the current version of the list when the sequence is triggered.

### Subscription

The *Subscription trigger* initiates an Automation or Sequence when a Contact opts in to or out of a subscription list. Lists enabled for *Auto opt-in* are not available for this trigger. See [Auto opt-in](https://www.airship.com/docs/guides/audience/segmentation/audience-lists/subscription/#auto-opt-in) in *Subscription lists*.

Airship evaluates subscription status across all channels collectively. A Contact is subscribed to a list when they have at least one opted-in channel and unsubscribed when they have no opted-in channels. The trigger fires when this subscription status changes.

Configuration steps:

1. Search for and select at least one list.
2. Specify whether to trigger when users opt in to, or opt out of, the list.

### Tag Change

The *Tag Change trigger* initiates an Automation or Sequence when a tag is added or removed from a device.

Configuration steps:

1. Search for a tag. If the tag you search for does not appear, click **Create \[search term]** to create a new tag. You can select a tag group filter before or after searching.
2. (Optional) Click **Add Another** to add more tags. Airship handles multiple tags as a Boolean OR.
3. Choose whether to apply the trigger when a tag is added or removed.