---
title: Configuring a custom action
slug: qatar-airways-hol/configuring-a-custom-action
docTags: 
createdAt: 2025-01-22T18:15:32.891Z
---

## Event overview

To get an overview of all events in Adobe Journey Optimizer:

1. In the menu on the left side, under **Administration**, click on **Configurations**. You will see a set of tiles. Click on **Manage** in the **Actions** tile to get an overview with all existing custom actions.

## Configuring a custom action

We'll be configuring an custom action with which we will retrieve the flight status from an external API and. With this information we will cross check with customer booking and based on the status we will do the actions in our journey.&#x20;

:::hint{type="warning"}
If you do not want to configure your own custom action, you can reuse an custom action **getFlightStatus** that has aleady been created for you. Feel free to skip this exercise and proceed to **Creating an audience**
:::

To configure a new event, click **Create Action**. A menu will open on the right side.

1. Set the **name** to  `[your name]getFlightStatus`.
2. Keep **Action type** as **Custom**&#x20;
3. Keep **Channel** as **Other**
4. Keep **required marketing action** as **none**
5. In the Endpoint configuration section
   1. Enter **URL** as `https://flight-status---v2-qwqp61f1m1d5.runkit.sh/`
      *(This is a dummy API endpoint created to return the requested flight status as DELAYED)*
   2. Select the **Method** as **GET**
6. In the Headers section, ensure there are two headers that are available by default
   1. Header 1 with **Label** as **Content-Type** and **Value** as **application/json**
   2. Header 2 with **Label** as **Charset** and **Value** as **UTF-8**
7. In the Query parameters section, click on **Add a query parameter field**
   1. Enter **Name** as `flightID`
   2. Select **Type** as `Variable`
8. Keep authentication type as `No authentication`
9. On the payload section, **click** on the **pencil** button to open a popup to paste the response payload.

   ![](https://api.archbee.com/api/optimize/6H6rknlvdVrktAepVnpsA-wTPnLk8vaszCeLUVSRgDr-20250124-171814.png)
10. Paste the below response&#x20;
    `{`
    `  "flightID": "LHR-DOH",`
    `  "flightStatus": "DELAYED",`
    `  "expectedDelayInMinutes": 229,`
    `  "reasonForDelay": "Flight is delayed due to technical difficulties",`
    `  "departureAirportCode": "LHR",`
    `  "arrivalAirportCode": "DOH"`
    `}`
11. The payload should auto detect the datatypes of the attributes as below. Click on **Save** to continue

    ![](https://api.archbee.com/api/optimize/6H6rknlvdVrktAepVnpsA-ZqbeZifcqi5XWrzXmSaAG-20250124-172042.png)
12. Now the response field should say 6 fields selected.

    ![](https://api.archbee.com/api/optimize/6H6rknlvdVrktAepVnpsA-YjGrMwPPXcTA2KCVeMDT5-20250124-172443.png)
13. Scroll all the way to top and click on **Save.**

14. ![](https://api.archbee.com/api/optimize/6H6rknlvdVrktAepVnpsA-wT24YK9--ld6GqId0COIU-20250124-173305.png)

:::hint{type="success"}
You have now successfully created the custom action to call an external API and get a response to know flight status. If you want to try and see the dummy API response, please try [this URL](https://flight-status---v2-qwqp61f1m1d5.runkit.sh/?flightID=LHR-DOH)
:::

