---
title: Creating the journey
slug: qatar-airways-hol/creating-the-journey
description: >-
docTags: 
createdAt: 2024-01-30T23:03:21.354Z
---

In this exercise, you'll be creating the journey using all the components you've created in the previous exercises.

## Journey overview

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

1. In the menu on the left side, under **Journey Management**, click on **Journeys**. You will see a overview with all existing journeys.

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/ji5loOSKQ-lP2YYB8lHSu_image.png)

## Creating a journey

We'll be creating a journey that will send an email confirmation to customers when they book a flight. If the customer is not a loyalty program member, we want to incentivise them to sign up.

Click on **Create Journey**. You'll be taken to the **Journey canvas** with the journey properties opened.

1. Set the **name** to `[your name] - Delay Comfort Journey`.
2. For the other properties we'll keep the default values.
3. Your screen should look like the image below. Click **Save** to save and close the properties.

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/1ApBtaGRoDIhRwYRSV9uQ_screenshot-2024-07-21-at-143231.png)

You're now in the journey canvas. This is where you'll be creating your journey's logic. In the left menu you have **activities**. There's three types of activities:

**Events** are the triggers that can start or continue your journey.

**Orchestration** is the logic of your journey. It looks at conditions, audiences, but can also be used to make your workflow wait or end.

**Actions** are the results of your journey. This can be messages, profiles updates or API calls.

### Event trigger

1. We're starting our workflow of with an event trigger. From the events tab, choose **your created event (initalsAirportEntry)** and drag it onto the canvas. *If you did not create an event, use the&#x20;****airportEntry****&#x20;event.*
2. There's nothing we need to configure for this as we have already done this when we configured our airport entry event. Click **Save** to close the menu.

![](https://api.archbee.com/api/optimize/6H6rknlvdVrktAepVnpsA-ZLDqosO6kGSGJBhmTFPmy-20250124-181410.png)

### Custom Action configuration

We want to get the flight status from an external system.&#x20;

1. From the actions tab, choos&#x65;**&#x20;initialsgetFlightStatus** and drag it onto the empty circle on the canvas. *If you did not create an action, use the&#x20;****getFlightStatus****&#x20;event.*
2. This should open up the configuration menu for the action. In the menu, query parameters section, click on the **flightID** edit button (pencil) to open up a popup.
3. Expand *Experience Platform > ProfileFieldGroup > Profile > \_demopotemea > Latest Action >&#x20;****actionProduct*** and select it by enabling the checkbox. This will pass the current flightID of the customer from the profile attributes to the API endpoint to retrieve the flight status.
4. ![](https://api.archbee.com/api/optimize/6H6rknlvdVrktAepVnpsA-aTNfCK5G-1dXaihj92oeW-20250127-140313.png)
5. Click **OK** to close the popup and see **The** **actionProduct of latestAction** in **flightID** field.
6. Click on **Save** on the top to save action configuration.

### Condition check - customer flight is delayed or not

We want to notify only the customers whose flights are delayed. Furthermore we want to sent an meal offer for customers whose flights are delayed for more than 2 hours. So we are going to create conditions.

- From the orchestration tab, choose **Condition** and drag it onto the empty circle on the canvas.
- Click on the activity to open the detailed view.
  1. Set the **label** to `Is flight delayed?`.
  2. Click on **Path1** and change the label to `Flight delayed < 60 minutes`.
  3. Click on **expression field** to open a window.
     1. Click on **Advanced mode button** to enable all available options
     2. On the left side, open Context > airportEntry > Place context > POI interaction > POI detail > POI name and click on \[+] on the right of the attribute to add it to the canva&#x73;*.*
     3. Type  `  ==  `after the attribute in the canvas to check the incoming location value is equal to API returned flightID
     4. On the left side, open Context > getFlightStatus > flightID and click on \[+] on the right of the attribute to add it to the canva&#x73;*.*
     5. Now you have made a condition to check the name of the POI detail coming from the event is equal to the flightID coming from custom action
     6. Type  `  and  ` at the end of the expression so that we can add more conditions&#x20;
     7. From the left side menu, open Context > getFlightStatus > flightStatus and click on \[+] on the right of the attribute to add it to the canvas
     8. Type  ` == 'DELAYED'`after the attribute in the canvas to check the incoming flightStatus value is equal to 'DELAYED'
     9. Type  `  and  ` at the end of the expression so that we can add more conditions.
     10. From the left side menu, open Context > getFlightStatus > expectedDelayInMinutes and click on \[+] on the right of the attribute to add it to the canvas
     11. Type  ` <60`after the attribute in the canvas to check the incoming expectedDelayInMinutes value is less than 60.
     12. Click **Ok&#x20;**&#x74;o close the editor.
     13. Now we have created the condition as the *flightID is equal to the actionProduct of latestAction and that the flightStatus is equal to 'DELAYED' and that the expectedDelayInMinutes is less than 60*
     14. ![](https://api.archbee.com/api/optimize/6H6rknlvdVrktAepVnpsA-DpT0TR26aS9Je4EJT3_3J-20250124-191035.gif)
  4. Click on add a path button to add a second path for **flights delayed for more than 60 minutes**.
     1. Click on **Path1** and change the label to `Flight delayed > 60 minutes`
     2. To create the expression, follow the steps above and in step 11, change the condition to more than 60 minutes.
     3. Now we have created the condition as the *flightID is equal to the actionProduct of latestAction and that the flightStatus is equal to 'DELAYED' and that the expectedDelayInMinutes is greater than 60*
  5. Check **Show path for other cases than one(s) above** and set the label to `Flight on time`.
  6. In our journey we want to focus on the customer whose flights are delayed. Rearrange the paths so that the journey paths are aligned are delayed paths are on the top.
  7. Your screen should look like the image below. Click **Save**.

![](https://api.archbee.com/api/optimize/6H6rknlvdVrktAepVnpsA-Euwr5mWsWPgN3DydMhpsY-20250125-112522.png)



### Email #1 - Delay comfort for flights delayed for more than 60 minutes

In the next steps you will be building the email for your journey.&#x20;

::::Tabs
:::Tab{title="Building the Email"}
1. From the actions tab, choose **Email** and drag it onto the empty circle at the **Flights delayed > 60 minutes** path.
2. Click on the activity to open the detailed view.
   1. Set the **label** to `Send meal offer`.
   2. Set the **category** to `Transactional`.
   3. Set the **email surface** to `transactionalEmail`.
   4. Click on **Edit content** to start designing your email.
      1. Click on :FontAwesome[]{icon="fa-solid fa-user"} to create a subject line. Set it to `FIRSTNAME, Your flight booking is delayed!`
      2. Remove the text `FIRSTNAME` and search for `first name` in the profile attributes.
      3. Find the field First name (... attributes > person > Full name) and click on the :FontAwesome[]{icon="fa-solid fa-plus"} **icon** to add it to your subject line. It should now be`{{profile.person.name.firstName}}, Your flight is delayed!`
      4. Click **Save**.
   5. Click on **Edit email body**. Under **Saved templates**, choose `Qatar Airways - Delay Comfort with Meal offer`. It will show you a preview of the template. Click on **Use this template**.
3. The email designer will now open. It should look like the image below. Click **Save** in the top right. Navigate out of the Email designer by clicking the arrow on the top left of your screen. Then navigate out of the email overview by clicking on the arrow on the top left.&#x20;

![](https://api.archbee.com/api/optimize/6H6rknlvdVrktAepVnpsA-mazfQKt0VaENklk3dU_3u-20250125-114125.png)
:::
::::

You will be taken back to the journey canvas.

![](https://api.archbee.com/api/optimize/6H6rknlvdVrktAepVnpsA-WaV9i9-ESWE0r2uMi3PPy-20250125-114544.png)

### Push #1 - Delay comfort for flights delayed for less than 60 minutes

1. From the actions tab, choose **Push** and drag it onto the empty circle at the **Flights delayed \< 60 minutes** path.
2. Click on the activity to open the detailed view.
   1. Set the **label** to `Notify the delay`
   2. Set the **category** to `Transactional`.
   3. Set th&#x65;**&#x20;surface** to `transactionalPush`.
   4. Click on **Edit content** to start designing your email.
      1. Click on :FontAwesome[]{icon="fa-solid fa-user"} to create a Title line. Set it to `FIRSTNAME, Your flight is delayed!`
      2. Remove the text `FIRSTNAME` and search for `first name` in the profile attributes.
      3. Find the field First name (... attributes > person > Full name) and click on the :FontAwesome[]{icon="fa-solid fa-plus"} **icon** to add it to your subject line. It should now be`{{profile.person.name.firstName}}, Your flight is delayed!`
      4. Click **Save**.
      5. Set the body to `We will keep you updated and let you know when it's time to proceed to the gate`
   5. Navigate out of the designer by clicking the arrow on the top left of your screen.  Click on **Save** to save the push action details.



### Push #2- Flights are on time

1. From the actions tab, choose **Push** and drag it onto the empty circle at the **Flights on time** path.
2. Click on the activity to open the detailed view.
   1. Set the **label** to `Flight on time`
   2. Set the **category** to `Transactional`.
   3. Set the&#x20;**&#x20;surface** to `transactionalPush`.
   4. Click on **Edit content** to start designing your email.
      1. Click on :FontAwesome[]{icon="fa-solid fa-user"} to create a Title line. Set it to `FIRSTNAME, Your flight is on time.`
      2. Remove the text `FIRSTNAME` and search for `first name` in the profile attributes.
      3. Find the field First name (... attributes > person > Full name) and click on the :FontAwesome[]{icon="fa-solid fa-plus"} **icon** to add it to your subject line. It should now be`{{profile.person.name.firstName}}, Your flight is on time!`
      4. Click **Save**.
      5. Set the body to `Please proceed to the gates when informed`
   5. Navigate out of the designer by clicking the arrow on the top left of your screen.  Click on **Save** to save the push action details.
3. After doing everything your journey will look like this

![](https://api.archbee.com/api/optimize/6H6rknlvdVrktAepVnpsA-I7NEmq2NuUsSKcDTFfRdt-20250125-130946.png)

:::hint{type="success"}
You have now successfully created the delay comfort journey using the Adobe Journey Optimizer. Next, we are going to test our journey using Test Mode.
:::

