Create Reusable Audience Segments

A segment is a grouping of audience members selected by unique or shared identifiers. Multiple identifiers can be combined within a segment.

You can build a segment using unique identifiers or by an identifier that may belong to or include multiple users, such as a tag, attribute, or event, and even other segments. See Segment Data on this page. See also: Segmentation.

 Note

You can also create segments using the API. See: API: Segments.

Create a new segment

Segments are sets of audience conditions organized in blocks. A block contains one or more conditions, providing a way to mix and match boolean operators. For example, you might use an OR operator for conditions in a block, and use an AND operator to join the blocks together.

  1. Go to Audience » Segments and click Create Segment.

  2. Enter a name and description, then click Save and continue. You will find your audience segment by name when creating messages.

  3. Search for or select segmentation data.

  4. Set the True/False operator to determine whether to include users for whom the condition is true or false.

    • Predicted to Churn does not have operators.
    • See next steps for configuring device properties, attributes, and events.
  5. (Device properties only) Select an operator, search for or enter a value, then click outside the field or hit Enter on your keyboard to save the value. Repeat for multiple values. Multiple values are evaluated as a boolean OR. No configuration is required for operators Empty and Not Empty.

     Note

    Equals and Does not equal are the default operators for device properties. To make all operators available, go to Settings » Configuration » Feature Settings and enable Segment Operators. This feature requires SDKs iOS 13.2.0+ and Android 13.0.0+.

  6. (Attributes only) Select an operator, then configure values or dates.

    TEXT and NUMBER attributes Click Add a value and enter a value in text or number format, then click outside the field or hit Enter on your keyboard to save the value. Repeat for multiple values. Multiple values are evaluated as a boolean OR.
    DATE attributes

    Configure a date or range. Availability and requirements depend on the operator.

    • Specific: Select a Year/Month/Day. With the Equals and Does not equal operators you can also use formats Day, Month, Month/Day, and Year/Month.
    • Relative: Specify the number of years/months/days/hours/minutes from today’s date.
    • Today: With the Equals operator, select Month/Day or Year/Month/Day. With the After and Before operators, Year/Month/Day is the only option and is preselected.
     Note

    For the Between operator, the end date is not inclusive, e.g., selection Between July 5 - July 17 includes dates July 5 to July 16.

  7. (Events only) Choose whether or not the event was performed, set the frequency of occurrence, and configure options.

    1. Select Performed event, First performed event, Last performed event, or Did not perform event.

    2. For Performed event and Did not peform event, select an operator and configure the frequency of the event.

    3. (Optional) Click Specify when to target when the event was performed, then select an operator and configure a date or range.

      Availability and requirements depend on the operator.

      • Specific: Select a Year/Month/Day. With the Equals operator you can also use formats Month/Day, and Year/Month.
      • Relative: Specify the number of years/months/days/hours/minutes from today’s date.
      • Today: Select Month/Day or Year/Month/Day.
       Note

      For the Between operator, the end date is not inclusive, e.g., selection Between July 5 - July 17 includes dates July 5 to July 16.

    4. (Optional) Filter events using numeric values associated with the events, or by key/value properties attached to the events. Filtering events this way can help you more precisely target your audience.
      1. Click Add Property and search for a property, or click Add Event Value.
      2. If applicable, select the operator you want to use to evaluate the value or property.
      3. Enter a value, then click outside the field or hit Enter on your keyboard to save the value. Repeat for multiple values. Multiple values are evaluated as a boolean OR.
      4. (Optional) Click Add Property or Add Event Value to add more filters.
      5. Select AND/OR to determine how to evaluate multiple filters and alternatives within each filter.
        • AND = all criteria must be met
        • OR = any criteria must be met
  8. (Optional) Add or edit conditions.
    • Click   to change your selection within a condition, e.g., change a tag from airship to starship.
    • Click   to add a condition to a block.
    • Click Add a block   and configure additional conditions.
    • Click   to duplicate or delete conditions and blocks:
      •   Duplicate a condition.
      •   Delete a condition. Deleting all conditions in a block deletes the block. After creating additional blocks, you can hover over a block and click Edit block   to make changes.
  9. Set the logic between conditions or blocks:

    • AND = all conditions must be met
    • OR = any condition must be met
  1. Click Save and exit.

Send a message to a segment

After you create a segment, you can select it as an audience in the Message and A/B Test composers. See Target Specific Users for detail.

To send a message to a segment using the API, see the Audience Selector.

Manage segments

Go to Audience » Segments to view a list of your segments.

  • Your last modified segment is listed first.
  • You can sort the list by Name, Date Created, or Date Last Modified.
  • You can search for segments by name.
  • Click   to see a segment’s description and all Sort by information in a single view. Click   to collapse.

Duplicate a segment

You may want to duplicate a segment as a starting point for a new audience segment, rather than starting from scratch.

  1. Go to Audience » Segments.
  2. Click   for a segment.
  3. (Optional) Enter a name and description for the new segment. The name is prefilled with “Copy of [original segment name]” and the description is the original segment’s description.
  4. Click Save and continue.
  5. Edit as you would a new segment.
  6. Click Save and exit.

Edit a segment

If you schedule a message that targets a segment, and then edit that segment, the scheduled message audience does not automatically use the updated segment criteria. Airship uses the segment as it existed when you created the message unless you manually update the message.

  1. Go to Audience » Segments.
  2. Click   for a segment.
  3. Edit as you would a new segment.
  4. Click Save and exit.
  5. (Optional) Update scheduled messages that use the edited segment.
    1. Go to Messages » Messages Overview.
    2. Select the Scheduled view.
    3. Click   for the message you want to update.
    4. Click Review & Schedule in the header, then click Schedule Message. You do not need to change the message itself. The targeted audience will be updated to reflect the changes made to the edited segment.

Delete a segment

 Warning

Deleting a segment that is in use may impact messaging.

  1. Go to Audience » Segments.
  2. Click   for a segment.

Segmentation data

You can create segments using the following audience criteria:

 Note

Lifecycle audience lists are not supported for web, email, SMS, or open channels.

Location in segments (Legacy)

 Important

  • Location data in segments is available in the legacy Segment Builder only.
  • The legacy Segment Builder and location history targeting capabilities are being discontinued and will not be available after January 31, 2021. Please contact Airship Support with any questions.
  • The procedure and reference information in this section are for location data in segments only.
  • Location is not supported for web push notifications.
  • See also: API: Segment Locations.

If your app uses Airship’s historical location service, you may include location criteria in your segments. Three months’ location history is the default data retention package, with options to retain six or twelve months’ location history. See the Data Retention Schedule.

Add location criteria for users who have or have not recently been in a location within a defined time period.

  1. Go to Audience » Segments and click the link to go to the legacy Segment page.

  2. Click New Segment.

  3. Select the Location condition, then choose has been or has not been.

  4. Click Select a location, or search or explore locations, and apply your selection.

    Search

    Enter a search term in the box, and results, if any, display on the map and are listed in the right-side pane.

    Explore

    Click the Explore icon to the left of the search box, and results for the mapped area, if any, display on the map and are listed in the right-side pane. The quantity/density of location points is determined by the level of zoom. Click and drag, and use the +/-zoom controls to change the displayed area.

    Click a location on the map, and its corresponding result will highlight in the results pane, and vice versa. Click again to enable or disable the location boundary.

    Click Filter Results at the top of the results pane, make selections by checking boxes, then click Apply. You may also use the All, None, and Clear options as you make your selections.

  5. Select within the last or between to constrain the time period for the location event. The default statement is “within the last 6 hours.”

    Within the last Enter a numerical value and select hours, days, weeks, or months. Always use a number greater than 1, otherwise the system will only check the current period. We recommend using long time periods during testing. See Time Bucketing for additional detail.
    Between Click Select a date range, then click Select by and choose a range type. Make your selections for both Start Date and End Date, then click Apply.

  6. (Optional) Click Add a condition and confifure.

  7. (Optional) Include nested logic. Click   for a condition and select Add an Alternative. You can also remove additional conditions.

  8. (Optional) Change the All/Any and True/False selections to change the boolean logic values that will apply to each segment condition. The default statement is “If All of the following are True.” You can change the boolean logic for the nested statements as you can for the entire expression.

    • ALL = all criteria must be met (boolean AND)
    • ANY = any criteria must be met (boolean OR)

  9. Enter a descriptive Name.

  10. Click Save.

Time Bucketing: “Within the Last X”

When creating a location-based segment condition, you have the option to include location events that occurred “within the last” number of hours, days, weeks, or months. Understanding how we “bucket” location events according to a given time period is important to know when using this feature.

  • All time periods are in UTC.

  • We view time in bucketed time periods for hours, days, weeks, and months:

    • Hour starts at X:00 UTC.
    • Day starts at 12:00 AM UTC.
    • Week starts at 12:00 AM UTC on Monday.
    • Month starts at 12:00 AM UTC on the first day of month.
  • When choosing “within the last” for a given time period, you are selecting all location events that have occurred from the beginning of the most recent time bucket until now.

    Examples:

    1. “within the last 1 hour” does not equal the last 60 minutes. It equals the time from the beginning of the current hour (UTC) until the time the segment is created.

      If you create a “within the last 1 hour” segment at 11:19 AM, you will have a segment that contains all devices that were in location X from 11:00 AM UTC until 11:19 AM UTC.

    2. “within the last 1 day” does not equal the last 24 hours. It equals the time from 12:00 AM UTC on the day the segment is created until the moment the segment is created.

      If you create a “within the last 1 day” segment at 11:19 AM, you will have a segment that contains all devices that were in location X from 12:00 AM UTC until 11:19am UTC.

    3. “within the last 2 weeks” does not equal the last 14 days. It equals a full 7-day week (the week preceding the current week) AND whatever portion of the current calendar week that has passed when the segment is created.

      If you create a “within the last 2 weeks” segment at 11:00am on Wednesday, August 12, you will have a segment that contains all devices that were in location X from 12:00am UTC, Monday, August 3, until 11:00am UTC, Wednesday, August 12.