## Overview

A flight is a collection of ads grouped under a campaign. Most targeting and delivery rules are set at the flight level.

These rules include items such as:

- Impression goals
- Tracking methods
- Dates to run
- Targeting

> 📘
>
> ### Note  
> Refer to the Flights API documentation for more information about how to use the [Flights](https://dev.kevel.com/reference/flight) endpoints.

## Flights UI Page

You can access information about existing flights by clicking on the dropdown menu under **Campaigns**, or navigating to the **Campaigns** tab and selecting the campaign you would like to view.

In the Flights UI, you may search for a specific flight by setting flight filters like name, status, rate, etc.

## Create and Edit a Flight via our UI

To create a new flight, or edit an existing flight, follow the steps listed below.

1. Click on a specific Campaign's page.
2. Click 'Add a Flight to this Campaign'.
3. Enter all information for the flight and save.

There are several different options you can choose when working with flights. By clicking on the pencil icon, you can edit a flight. If you select the three dots next to the pencil icon, you can perform any of the following actions:

- Duplicate Flight
- Generate Ad Code
- View Report

## Bulk Edit Flights

You can change certain properties of one or more Flights in one go. This is useful for when you want to make the same change across many Flights, such as extending the End Date on all Flights in a Campaign.

1. Begin by selecting one or more Flights by checking the checkboxes to the left of each row in the Flights list.
2. Click the 'Edit N flights' button in the top right of the Flights list.
3. Select the amendments you would like to make across all selected Flights.
4. Click 'Save' - you will be given an opportunity to review the changes that will be made.
5. Click 'Save' again once you have confirmed the changes.

## Archive a Flight

To ensure that completed flights do not clutter your campaigns page, you can either:

- Make sure that every flight in the campaign has expired; or
- Archive the flight and/or campaign.

If the flight **End Date** is after the current date, or if the flight has no End Date, you will be able to unarchive it. To expire a flight, set the **End Date** to a date later than the current date.

> 📘
>
> ### Note  
> Once a campaign is expired, click on the "Show Expired and Archived" button on the Campaigns page to view it again.

Currently, you can only archive flights in Kevel UI (version 1.0). To archive a flight, select the campaign and choose 'Archive Flight' from the tools dropdown menu.

Additionally, you can archive a Flight via the [Update Flights](https://dev.kevel.com/reference/update-flights) API endpoint.

## Delete a Flight via the UI

To delete a flight:

1. Click on the 'X' next to the flight in either the Campaign or Flights page. You will see a dialog box appear, prompting you to confirm you want to delete the flight.
2. Select 'Delete' to delete the flight.

## Duplicate a Flight via our UI

You may also wish to duplicate an existing flight so you can use the information in other campaigns.

You have multiple options when duplicating a flight:

- You can give the flight a new name, or use "Copy of `<The Existing Flight Name>`".
- You can duplicate the flight in the current campaign, or duplicate it in another campaign under the same advertiser.
- You can duplicate both the creatives and ads from the parent flight, link the new ads in the duplicated flight to the parent creatives, or duplicate the flight without any ads at all.
- You can optionally set a new start or end date for the flight.

Select your options and click "Save".

## Manage Flights via our Management API

The Kevel Management API provides several endpoints for managing flights including:

- [Create Flight](https://dev.kevel.com/reference/create-flight)
- [Update Flights](https://dev.kevel.com/reference/update-flights)
- [List Flights for Campaign ID](https://dev.kevel.com/reference/list-flights-for-campaign-id)
- [Flight Filtering](https://dev.kevel.com/reference/flight-category)

To delete a flight use the [Update Flights](https://dev.kevel.com/reference/update-flights) endpoint and set `IsDeleted = true`.

## Flight Fields

Please refer to the Kevel [API documentation](https://dev.kevel.com/reference/flight) for more info about the different [Flights](https://dev.kevel.com/reference/flight) endpoints you can use.

| What | Description | API Field |
| --- | --- | --- |
| **Name** | The name of the flight. The max length is 100 characters. | `name` (string) |
| **Categories** | Field used for interest targeting. More information about this field can be found [here](https://dev.kevel.co/docs/interest-targeting). Uses UserDB. | `Name` under `Category` object. Requires use of [Create Flight Categories](https://dev.kevel.co/v1.0/reference/flight-categories-1#create-flight-categories) endpoint |
| **Priority** | The [Priority](https://dev.kevel.co/docs/priorities) you want to give to the flight. | `PriorityId` (integer) |
| **Start Date** | The date when you want the campaign to start. Kevel uses GMT for start/end dates. | `StartDateISO` (string) |
| **End Date** | The date when you want the campaign to end. Only Percentage and Daily Revenue Goal Types can be set without an End Date. Kevel uses GMT for start/end dates. | `EndDateISO` (string) |
| **Rate** | The field used to estimate the revenue you have made from your advertisers. | `RateType` (integer) `1 = Flat` `2 = CPM` `3 = CPC` `4 = CPA View` `5 = CPA Click` `6 = CPA View & Click` |
| **Price** | The amount an advertiser is paying you, based on the rate. | `Price` (float/decimal) |
| **Track Conversions** | The field used to track conversions (actions post click). If this is enabled, there will be a box that, if clicked, will provide the conversion tracking code. | `IsTrackingConversions` (boolean) |
| **Goal Type** | The metric you sold the deal at to influence how Kevel throttles the Flight in order to hit goal by end date. | `GoalType` (integer) `1 = Impressions` `2 = Percentage` `3 = Click` `7 = Conversion` `8 = Revenue` `9 = Daily Revenue` `10 = Monthly Revenue` |
| **Goal Amount** | The number associated with the Goal Type metric for the system to aim for. | `Impressions` (integer) |
| **Cap Type** | The hard limits specified for when a flight should or should not serve. | `CapType` (integer) `1 = Impressions` `2 = Clicks` `3 = Conversions` `4 = Revenue` |
| **Daily (Cap Type)** | The number associated with Cap Type for a daily cap. | `DailyCapAmount` (float/decimal) |
| **Lifetime (Cap Type)** | The number associated with Cap Type for a lifetime cap. | `LifetimeCapAmount` (float/decimal) |

## Rate/Price

Rates and prices are used to estimate the revenue you have made from your advertisers. _These fields do not affect how often a flight is served, nor do they reflect actual payouts._

First, you select **Rate**, or how you are charging the advertiser:

_Flat_ = Advertiser pays a flat rate for entire flight

_CPM_ = Advertiser pays a fixed amount for every thousand impressions

_CPC_ = Fixed amount per click

_CPA (View)_ = Fixed amount for a view-through conversion (someone converts after seeing ad)

_CPA (Click)_ = Fixed amount for a click-through conversion (someone converts after clicking ad)

Then, input **Price**, the amount an advertiser is paying you, based on the **Rate**.

> 📘
>
> ### Note  
> A **Rate** of "CPC" and a **Price** of "$0.50" means that you will be paid $0.50 for every ad click. In reporting, if you drive 1K clicks for this flight, the revenue will be reported as $500.

> 🚧
>
> ### Caution  
> **Rate** and **Price** are required fields in the UI, but not in the API request when creating a Flight. If you are not tracking revenue, simply set **Rate** = "CPM" and **Price** = "$0.00" in the UI.

## Goals

With **Goal Type** and **Goal Amount**, you define what metric you sold the deal at, and at what total amount. These fields also influence how Kevel throttles the ads, so the flight hits its goal by the end date.

For instance, if you have negotiated a 3M impression deal with an advertiser for the month of June, you will set **Goal Type** to "Impressions" and **Goal Amount** to "3,000,000".

Kevel's engine will then show the ad for 3M impressions over 30 days and throttle the campaign so that it shows the ads evenly each day, or ~100K impressions a day.

> 📘
>
> ### Note  
> The algorithm recalculates impressions delivered daily. For example, if a weekend delivers 25K impressions, the system will then aim to deliver more than 100K impressions/day moving forward.

For **Goal Type**, you can choose between:

- impressions
- clicks
- conversions
- percentage (of the priority)
- revenue (dollars)
- daily revenue (dollars)
- monthly revenue (dollars)

## Caps

**Caps** are hard limits for when a flight should or should not serve.

You set them at the **Daily** and/or **Lifetime** value and can cap by **Impressions**, **Clicks**, **Conversions**, or **Revenue**.

For example, you have an advertiser who doesn't want more than 1M impressions a day. In which case, you set **Cap Type** = "Impressions" and **Daily** = "1,000,000".

> 📘
>
> ### Note  
> Caps can be used with or without an **End Date**.

## Creatives

The Creatives tab lists the creatives/ads associated with the Flight.

## Targeting Fields

The [Create Flights endpoint](https://dev.kevel.co/v1.0/reference/flight#create-flight) has a deeper breakdown of the API fields for Flight targeting. The sections below go into a high-level detail about the targeting options at a Flight level as available in the Kevel UI.

## Behavioral Targeting

Behavioral targeting enables two features: [Interest/Behavioral Targeting](https://dev.kevel.co/docs/interest-targeting) and [Excluding Ads Based on Behavior](https://dev.kevel.co/docs/behavioral). Clicking these options will not do anything unless you have UserDB enabled and are sending persistent IDs in the `user` object in the Decision API Request.

## Keyword Targeting

Keyword targeting enables you to serve ads to placements that contain matching keywords passed in the request. See [here](https://dev.kevel.co/docs/keyword-targeting) for more information.

With the [Create Flight](https://dev.kevel.co/v1.0/reference/flight#create-flight) endpoint, you may send these keywords via the `keywords` parameter.

## Custom Targeting

Custom targeting is a powerful targeting tool that enables you to target (1) custom fields you pass in the request, or (2) reserved keys. Learn more [here](https://dev.kevel.co/docs/custom-targeting).

With the [Create Flight](https://dev.kevel.co/v1.0/reference/flight#create-flight) endpoint, you may send these queries via the `CustomTargeting` parameter.

## Frequency Capping

Frequency capping stops showing ads to users based on how many ads they have already seen. Learn more [here](https://dev.kevel.co/docs/frequency-capping-1).

With the [Create Flight](https://dev.kevel.co/v1.0/reference/flight#create-flight) endpoint, you may send Frequency Caps using the parameters of `FreqCap`, `FreqCapDuration`, `FreqCapType`, and `DontAffectParentFreqCap`.

## Site/Zone Targeting

This option enables you to target by [Sites](https://dev.kevel.co/docs/sites) and/or [Zones](https://dev.kevel.co/docs/zones-overview) you have created.

## Geo Targeting

Geo-targeting enables you to target users based on their current location. You can include or exclude locations based on Country, Region, or Metro/DMA Code (the latter for the United States only). Learn more [here](https://dev.kevel.co/docs/geo-location).

With the [Create Flight](https://dev.kevel.co/v1.0/reference/flight#create-flight) endpoint, you may send these properties via the `geotargeting` object.

## Day Parting

Hour / day parting enables you to show ads only during certain hours of the day, or certain days of the week. For more information about day parting, please refer to the day parting technical documentation, which can be found [here](https://dev.kevel.co/docs/day-hour-parting-v2).

## Distribution

Distribution is a way of determining ad delivery within a flight. For more information on distribution, please see the technical distribution technical documentation, which can be found [here](https://dev.kevel.co/docs/additional-display-rules).
