12.4 Design a trigger-based journey

In this exercise, you’ll create a journey by making use of Adobe Journey Optimizer.

Login to Adobe Journey Optimizer by going to Adobe Experience Cloud. Click Journey Optimizer.

ACOP

You’ll be redirected to the Home view in Journey Optimizer.

ACOP

First, make sure you’re using the correct sandbox. The sandbox to use is called --aepSandboxId--. To change from one sandbox to another, click on PRODUCTION Prod (VA7) and select the sandbox from the list. In this example, the sandbox is named AEP Enablement FY21.

ACOP

You’ll then be in the Home view of your sandbox --aepSandboxId--.

ACOP

Click Create to start creating your Journey.

Demo

In the left menu, go to Journeys. Next, click Create Journey.

Demo

You should first name your Journey.

As a Name for the Journey, use ldap Geofence Entry Journey and replace ldap with your ldap. In this example, the Journey Name is vangeluw Geofence Entry Journey. No other values must be set at this moment.

Demo

Click OK.

Demo

On the left side of your screen, have a look at Events. You should see your previously created event in that list. Select it, then drag and drop it on the journey canvas. Your journey then looks like this:

Demo

Next, click on Orchestration. You now see the available Orchestration capabilities. Select Condition, then drag and drop it on the Journey Canvas.

Demo

You now have to define three conditions:

  • It’s colder than 10° Celsius
  • It’s between 10° and 25° Celsius
  • It’s warmer than 25° Celsius

Let’s define the first condition.

Condition 1: Colder than 10° Celsius

Click on the Condition. Click on Path1 and edit the name of the path to Colder than 10 C. Click on the Edit icon for the expression of Path1.

Demo

You’ll then see an empty Simple Editor screen. Your query will be a bit more advanced, so you’ll need the Advanced Mode. Click Advanced Mode.

Demo

You’ll then see the Advanced Editor which allows code entry.

Demo

Select the below code and paste it in the Advanced Editor.

#{ldapWeatherApi.ldapWeatherByCity.main.temp} <= 10 (replace ldap by your ldap)

You’ll then see this.

Demo

In order to retrieve the temperature as part of this condition, you need to provide the city in which the customer currently is.
The City needs to be linked to the dynamic parameter q, just like we saw previously in the Open Weather API Documentation.

Click the field dynamic val: q as indicated in the screenshot.

Demo

You then need to find the field that contains the current city of the customer in one of the available Data Sources.

Demo

You can find the field by navigating to ldapGeofenceEntry.placeContext.geo.city (replace ldap by your ldap).

By clicking that field, it will be added as the dynamic value for the parameter q. This field will be populated by for instance the geolocation-service that you’ve implemented in your mobile app. In our case we will simulate this with the admin console of the demo website. Click OK.

Demo

Condition 2: Between 10° and 25° Celsius

After having added the first condition, you’ll see this screen. Click Add Path.

Demo

Double click on Path1 and edit the path name to Between 10 and 25 C. Click the Edit icon for the expression this path.

Demo

You’ll then see an empty Simple Editor screen. Your query will be a bit more advanced, so you’ll need the Advanced Mode. Click Advanced Mode.

Demo

You’ll then see the Advanced Editor which allows code entry.

Demo

Select the below code and paste it in the Advanced Editor.

#{ldapWeatherApi.ldapWeatherByCity.main.temp} > 10 and #{ldapWeatherApi.ldapWeatherByCity.main.temp} <= 25 (Replace ldap by your ldap)

You’ll then see this.

Demo

In order to retrieve the temperature as part of this Condition, you need to provide the city in which the customer currently is.
The City needs to be linked to the dynamic parameter q, just like we saw previously in the Open Weather API Documentation.

Click the field dynamic val: q as indicated in the screenshot.

Demo

You then need to find the field that contains the current city of the customer in one of the available Data Sources.

Demo

You can find the field by navigating to ldapGeofenceEntry.placeContext.geo.city (Replace ldap by your LDAP). By clicking that field, it will be added as the dynamic value for the parameter q. This field will be populated by for instance the geolocation-service that you’ve implemented in your mobile app. In our case we will simulate this with the admin console of the demo website. Click OK.

Demo

Next, you’ll add the 3rd condition.

Condition 3: Warmer than 25° Celsius

After having added the second condition, you’ll see this screen. Click Add Path.

Demo

Double click on Path1 to change the name to Warmer than 25 C.
Then click on the Edit icon for the expression this path.

Demo

You’ll then see an empty Simple Editor screen. Your query will be a bit more advanced, so you’ll need the Advanced Mode. Click Advanced Mode.

Demo

You’ll then see the Advanced Editor which allows code entry.

Demo

Select the below code and paste it in the Advanced Editor.

#{ldapWeatherApi.ldapWeatherByCity.main.temp} > 25 (Replace ldap by your LDAP)

You’ll then see this.

Demo

In order to retrieve the temperature as part of this Condition, you need to provide the city in which the customer currently is.
The City needs to be linked to the dynamic parameter q, just like we saw previously in the Open Weather API Documentation.

Click the field dynamic val: q as indicated in the screenshot.

Demo

You then need to find the field that contains the current city of the customer in one of the available Data Sources.

Demo

You can find the field by navigating to ldapGeofenceEntry.placeContext.geo.city. By clicking that field, it will be added as the dynamic value for the parameter q. This field will be populated by for instance the geolocation-service that you’ve implemented in your mobile app. In our case we will simulate this with the admin console of the demo website. Click OK.

Demo

You now have three configured paths. Click Ok.

Demo

As this is a journey for learning purpose, we’ll now configure a couple of actions to showcase the variety of options marketeers now have to deliver messages.

Send messages for path Colder than 10° Celsius

For each of the temperature contexts, we’ll attempt to send an SMS Message to our customer. We can only send an SMS if we have a Mobile Number available for a customer, so we’ll first have to verify that we do.

Let’s focus on Colder than 10 C.

Demo

Let’s take another Condition element and drag it as indicated in the screenshot below. We’ll verify if for this customer, we have a mobile number available.

Demo

As this is just an example, we are only configuring the option where the customer has a mobile number available. Add a label of Has mobile?.

Click on the Edit icon for the Expression for the Path1 path.

Demo

In the Data Sources shown on the left, navigate to ExperiencePlatform.ProfileFieldGroup.profile.mobilePhone.number. You’re now reading the mobile phone number directly from Adobe Experience Platform’s Real-time Customer Profile.

Demo

Select the field Number, then drag and drop it to the Condition Canvas.

Select the operator is not empty. Click Ok.

Demo

You’ll then see this:

Demo

Your journey will then look like this. Click on Actions as indicated in the screenshot.

Demo

Select the action ldapSmsTwilio (verify your ldap), then drag and drop it after the condition you just added.

Demo

You’ll see a panel on the right hand side where you can configure the action.

Demo

Navigate to the Action Parameters. Click on the Edit icon for the Action Parameter TEXTMESSAGE.

Demo

You’ll then see this. Click on Advanced Mode.

Demo

Select the below code, copy it and paste it in the Advanced Mode Editor. Click OK.

"Brrrr..." + #{ExperiencePlatform.ProfileFieldGroup.profile.person.name.firstName} + " It's freezing. 20% discount on Jackets today!"

Demo

You’ll then be back here. Click on the Edit icon for the Action Parameter MOBILENR.

Demo

You’ll see a popup with the Simple Mode Editor. Click on Advanced Mode.

Demo

Paste this code in the Advanced Mode Editor. Click OK.

substr(#{ExperiencePlatform.ProfileFieldGroup.profile.mobilePhone.number}, 0, 12)

NOTE

This code is intended to work with mobile phone numbers that have 12 digits (including the +), like this one: +32463622044. Several other countries have 13-digit phone numbers. If your mobile phone number has 13 digits (including the +), you need to update this code to:

substr(#{ExperiencePlatform.ProfileFieldGroup.profile.mobilePhone.number}, 0, 13)

Demo

You’ll now see your completed action. Click Ok.

Demo

In the left menu, go back to Actions, select the Action ldapTextSlack, then drag and drop it after the ldapSmsTwilio-Action (Replace ldap by your ldap).

Demo

Go to Action Parameters and click the Edit icon for the parameter TEXTTOSLACK.

Demo

In the popup-window, click Advanced Mode.

Demo

Select the below code, copy it and paste it in the Advanced Mode Editor. Click Ok.

"Brrrr..." + #{ExperiencePlatform.ProfileFieldGroup.profile.person.name.firstName} + " It's freezing. 20% discount on Jackets today!"

Demo

You will see your completed action. Click Ok.

Demo

In the left menu, go to Orchestration, select End, then drag and drop End after the ldapTextSlack action.

Demo

Send messages for path Between 10° and 25° Celsius

For each of the temperature contexts, we’ll attempt to send an SMS Message to our customer. We can only send an SMS if we have a Mobile Number available for a customer, so we’ll first have to verify that we do.

Let’s focus on Between 10 and 25 C path.

Demo

Let’s take another Condition element and drag it as indicated in the screenshot above. We’ll verify if for this customer, we have a mobile number available.

Demo

As this is just an example, we are only configuring the option where the customer has a mobile number available. Add a label of Has mobile?.

Click on the Edit icon for the Expression for the Path1 path.

Demo

In the Data Sources shown on the left, navigate to ExperiencePlatform.ProfileFieldGroup.profile.mobilePhone.number. You’re now reading the mobile phone number directly from Adobe Experience Platform’s Real-time Customer Profile.

Demo

Select the field Number, then drag and drop it to the Condition Canvas.

Select the operator is not empty. Click Ok.

Demo

You’ll then see this. Click Ok.

Demo

Your journey will then look like this. Click on Actions as indicated in the screenshot.

Demo

Select the action ldapSmsTwilio (verify your ldap), then drag and drop it after the condition you just added.

Demo

You’ll see a panel on the right hand side where you can configure the action.

Demo

Navigate to the Action Parameters. Click on the Edit icon for the Action Parameter TEXTMESSAGE.

Demo

In the popup you’ll see, click on Advanced Mode.

Demo

Select the below code, copy it and paste it in the Advanced Mode Editor.

"What nice weather for the time of year, " + #{ExperiencePlatform.ProfileFieldGroup.profile.person.name.firstName} + " 20% discount on Sweaters today!"

Demo

Click OK.

Click on the Edit icon for the Action Parameter MOBILENR.

Demo

You’ll see a popup with the Simple Mode Editor. Click on Advanced Mode.

Demo

Paste this code in the Advanced Mode Editor. Click OK.

substr(#{ExperiencePlatform.ProfileFieldGroup.profile.mobilePhone.number}, 0, 12)

NOTE

This code is intended to work with mobile phone numbers that have 12 digits (including the +), like this one: +32463622044. Several other countries have 13-digit phone numbers. If your mobile phone number has 13 digits (including the +), you need to update this code to:

substr(#{ExperiencePlatform.ProfileFieldGroup.profile.mobilePhone.number}, 0, 13)

Demo

Click Ok.

Demo

In the left menu, go back to Actions, select the Action ldapTextSlack, then drag and drop it after the ldapSmsTwilio-Action (Replace ldap by your LDAP).

Demo

Go to Action Parameters and click the Edit icon for the parameter TEXTTOSLACK.

Demo

In the popup-window, click Advanced Mode.

Demo

Select the below code, copy it and paste it in the Advanced Mode Editor. Click Ok.

"What nice weather for the time of year, " + #{ExperiencePlatform.ProfileFieldGroup.profile.person.name.firstName} + " 20% discount on Sweaters today!"

Demo

You will see your completed action. CLick Ok.

Demo

In the left menu, go to Orchestration, select End, then drag and drop End after the joconnorTextSlack action.

Demo

Send messages for path Warmer than 25° Celsius

For each of the temperature contexts, we’ll attempt to send an SMS Message to our customer. We can only send an SMS if we have a Mobile Number available for a customer, so we’ll first have to verify that we do.

Let’s focus on Warmer than 25 C path.

Demo

Let’s take another Condition element and drag it as indicated in the screenshot above. You’ll verify if for this customer, you have a mobile number available.

Demo

As this is just an example, we are only configuring the option where the customer has a mobile number available. Add a label of Has mobile?.

Click on the Edit icon for the Expression for the Path1 path.

Demo

In the Data Sources shown on the left, navigate to ExperiencePlatform.ProfileFieldGroup.profile.mobilePhone.number. You’re now reading the mobile phone number directly from Adobe Experience Platform’s Real-time Customer Profile.

Demo

Select the field Number, then drag and drop it to the Condition Canvas.

Select the operator is not empty. Click Ok.

Demo

You’ll then see this. Click OK.

Demo

Your journey will then look like this. Click on Actions as indicated in the screenshot.

Demo

Select the action ldapSmsTwilio (verify your ldap), then drag and drop it after the condition you just added.

Demo

You’ll see a panel on the right hand side where you can configure the action.

Demo

Navigate to the Action Parameters. Click on the Edit icon for the Action Parameter TEXTMESSAGE.

Demo

In the popup you’ll see, click on Advanced Mode.

Demo

Select the below code, copy it and paste it in the Advanced Mode Editor. Click OK.

"So warm, " + #{ExperiencePlatform.ProfileFieldGroup.profile.person.name.firstName} + "! 20% discount on swimwear today!"

Demo

Click on the Edit icon for the Action Parameter MOBILENR.

Demo

You’ll see a popup with the Simple Mode Editor. Click on Advanced Mode.

Demo

Paste this code in the Advanced Mode Editor. Click OK.

substr(#{ExperiencePlatform.ProfileFieldGroup.profile.mobilePhone.number}, 0, 12)

NOTE

This code is intended to work with mobile phone numbers that have 12 digits (including the +), like this one: +32463622044. Several other countries have 13-digit phone numbers. If your mobile phone number has 13 digits (including the +), you need to update this code to:

substr(#{ExperiencePlatform.ProfileFieldGroup.profile.mobilePhone.number}, 0, 13)

Demo

Click OK.

Demo

In the left menu, go back to Actions, select the Action ldapTextSlack, then drag and drop it after the ldapSmsTwilio-Action (Replace ldap by your ldap).

Demo

Go to Action Parameters and click the Edit icon for the parameter TEXTTOSLACK.

Demo

In the popup-window, click Advanced Mode.

Demo

Select the below code, copy it and paste it in the Advanced Mode Editor. Click Ok.

"So warm, " + #{ExperiencePlatform.ProfileFieldGroup.profile.person.name.firstName} + "! 20% discount on swimwear today!"

Demo

You will see your completed action. Click Ok.

Demo

In the left menu, go to Orchestration, select End, then drag and drop End after the ldapTextSlack action.

Demo

Your journey is now fully configured.

Demo

Click Publish again.

Demo

Your journey is now published.

Demo

In the next exercise, you’ll be able to test your Journey.

Next Step: 12.5 Trigger your journey

Go Back to Module 12

Go Back to All Modules

On this page