# Manage Events

Configure events and event properties for segmentation, automation, and Goals.

[Custom Events](https://www.airship.com/docs/reference/glossary/#custom_event) can contain properties that you have defined outside of Airship. To make these events and their properties accessible to our segmentation and automation services, add them to your project to enable use with these features:

* [Custom Event Triggers](https://www.airship.com/docs/reference/glossary/#custom_event_trigger) in Automations and Sequences — See Custom Event in [*Automation triggers*](https://www.airship.com/docs/guides/messaging/messages/sequences/triggers/#custom-event) and [*Sequence triggers*](https://www.airship.com/docs/guides/messaging/messages/sequences/triggers/#custom-event).
* [Custom Event Triggers](https://www.airship.com/docs/reference/glossary/#custom_event_iaa_trigger) for In-App Automations and Scenes — See [Custom Event](https://www.airship.com/docs/guides/messaging/in-app-experiences/configuration/triggers/#custom-event) in *In-app experience triggers*.
* [Cancellation Events](https://www.airship.com/docs/reference/glossary/#cancellation_events_event_option)
* Emitting a Custom Event when a user clicks/taps a button, image, or screen in a Scene — See [Emit a Custom Event](https://www.airship.com/docs/guides/messaging/in-app-experiences/configuration/button-actions/#emit-a-custom-event) in *Actions* for In-app Experiences.
* [Goals](https://www.airship.com/docs/reference/glossary/#goals)

When adding events to your project, you have the option to activate them for event segmentation. See [Event Segmentation](https://www.airship.com/docs/guides/audience/events/events/#event-segmentation) for details on event types and properties.

See also [Holdout Experiments](https://www.airship.com/docs/reference/glossary/#holdout_experiment).

## Create a new event

Add a new custom or predefined event to your project.

1. Next to your project name, select the dropdown menu (
), then **Settings**.

1. Under **Project settings**, select **Events**.

1. Select **Create event**.

1. ![Creating a new event](https://www.airship.com/docs/images/create-event_hu_e45f094c012bf9d0.webp)

*Creating a new event*

Enter a name for your new custom event or search for a predefined event to activate.

   Predefined events have reserved names and will appear in search results with a `Predefined event` flag. For a list of available predefined events, see [Predefined events](https://www.airship.com/docs/reference/data-collection/events/#predefined-events) in the *Events Reference*.
   
   If you choose one of the predefined events, the event properties will be populated for you. If you are creating a new custom event that is unknown to Airship, select **Create custom "[search term]" event** to create it.

1. (Optional) Enter a description for the event.

1. Select an event category or select **Create category** and enter a category name.
   > **Note:** When Airship adds a new default category that matches a custom category, the default category will replace the custom one. For example, if Airship adds a default "Shipped" category, it will replace your custom "Shipment sent" category, and "Shipment sent" will be removed from your project.


1. (Optional) Check the box to **Activate for segmentation**.

1. (Optional) Add event properties. Predefined events are already populated with properties, and you can add more. You can also edit or remove properties for predefined events.

   Select **Add property**, then enter a property name and select its type: String, Number, Boolean, Date, Array, or Any. The type determines which operators are available to you when using event segmentation. Select **Any** if the value for the property is unknown or if it could be multiple types. Select **Add another** and repeat to assign additional properties for the event.

   > **Note:** Properties of type "Any" cannot be used for segmentation. They will not appear in the dashboard when building Segments or targeting using segmentation data, and they cannot be referenced using the API.
>    
>    Similarly, properties of type "Array" have these restrictions by default. However, you can make the contents of an array accessible for segmentation by defining their nested properties. See [Defining nested array properties](#defining-nested-array-properties) below.


1. Select **Save**.

### Defining nested array properties

When adding an "Array" type property for an event, you can make the contents of the array accessible for segmentation by defining its nested properties using JSON Path expressions.

After adding the array property, add sub-properties using the syntax `$.arrayproperty[*].subproperty`. The asterisk (`*`) acts as a wildcard, indicating that the path should match the sub-property for any item within the array property. This makes it possible to segment your audience based on the characteristics of individual items within an array without needing to refer to their specific locations.

For example, consider a `Products` array where each product object has a name and price:

```json
{
  "Products": [
    {
      "name": "Laptop",
      "price": 1200
    },
    {
      "name": "Mouse",
      "price": 25
    }
  ]
}
```


To enable segmentation on the name and price of individual products within the `Products` array, you would define the following properties for the event in your project:

* `Products` of type Array, to acknowledge the array itself
* `$.Products[*].name` of type String, for segmentation using the name of any product in the array
* `$.Products[*].price` of type Number, for segmentation using the price of any product in the array

![Specifying properties within an array property](https://www.airship.com/docs/images/array-properties_hu_15ee5a438cc14552.webp)

*Specifying properties within an array property*

## Edit or delete events

Deleted events or event properties will no longer be available for use in segmentation. If you change an event's name, only the new name will be available for use in segmentation.

Similarly, deleted event properties will no longer be available for selection when configuring Automation and Sequence triggers. However, the event itself will still remain available for triggers.

1. Next to your project name, select the dropdown menu (
), then **Settings**.
1. Under **Project settings**, select **Events**. The table includes a maximum of 1,000 events.
1. Search for an event, then:
   * To delete, select the trash can icon (
) in its row.
   * To edit, select the pencil icon (
) in its row, make your changes, and then select **Save**.
