Edit in GitHubLog an issue

Adobe Journey Optimizer - Decisioning Extension

The Adobe Journey Optimizer - Decisioning extension powers real-time personalization workflows using Adobe Journey Optimizer - Offer Decisioning or Adobe Target in mobile apps via the Edge Network. It helps deliver personalized decisions to your app and enables tracking user interactions with the proposed decisions.

Prerequisites

Before starting, make sure the following steps are completed.

  • Your organization is provisioned for edge decisioning.
  • If using Adobe Target, Target activities are set up in your desired workspace in your organization on Target UI. For more details, see the Target activities guide.
  • If using Journey Optimizer - Offer Decisioning, decisions are set up in your desired sandbox in your organization on Experience Platform UI. For more details, see the create decisions guide.

Adobe Experience Platform Data Collection setup

Configure the Datastream for Adobe Target and/or Journey Optimizer - Offer Decisioning

On Experience Platform Data Collection, navigate to Data Collection > Datatreams using the left navigation panel. Select an existing datastream or create a new datastream. For more details, see the configure datastreams guide.

  1. In the datastream, click on the desired environment from the list. Make sure Adobe Experience Platform section is enabled and configured with the required information like Sandbox and Event Dataset.
  2. For Journey Optimizer - Offer Decisioning, navigate to Adobe Experience Platform section and enable Offer Decisioning checkbox. Datastream configuration - Offer Decisioning
  3. For Adobe Target, navigate to Adobe Target section and enable it. Specify the configuration. For more information on the configuration settings, refer to the Administer Target Overview. Datastream configuration - Adobe Target
  4. Click Save.

Configure Adobe Journey Optimizer - Decisioning extension in Tag property for Mobile

On Experience Platform Data Collection, navigate to Data Collection > Tags using the left navigation panel. Select an existing mobile tag property or create a new property.

  1. In your mobile property, navigate to Extensions in the left navigation panel and click on the Catalog tab.
  2. In the extensions Catalog, search or locate the Adobe Journey Optimizer - Decisioning extension, and click Install.
  3. Since an extension configuration is not necessary, click Save.
  4. Follow the publishing process to update SDK configuration. For more details, see the publish the configuration guide.

Adobe Journey Optimizer - Decisioning extension configuration

Integrate Experience Platform Optimize SDK in your mobile application

Download and import the Optimize extension

  1. Add the Mobile Core, Edge, Identity for Edge Network and Optimize dependencies in your app's gradle file.

Kotlin

Copied to your clipboard
implementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))
implementation("com.adobe.marketing.mobile:core")
implementation("com.adobe.marketing.mobile:edgeidentity")
implementation("com.adobe.marketing.mobile:edge")
implementation("com.adobe.marketing.mobile:optimize")

Groovy

Copied to your clipboard
implementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')
implementation 'com.adobe.marketing.mobile:core'
implementation 'com.adobe.marketing.mobile:edgeidentity'
implementation 'com.adobe.marketing.mobile:edge'
implementation 'com.adobe.marketing.mobile:optimize'
  1. Import the Mobile Core, Edge, Edge Identity, and Optimize extensions in your application class.
Copied to your clipboard
import com.adobe.marketing.mobile.MobileCore;
import com.adobe.marketing.mobile.Edge;
import com.adobe.marketing.mobile.edge.identity.Identity;
import com.adobe.marketing.mobile.Optimize;

Register the extensions with Mobile Core

Java

Copied to your clipboard
import com.adobe.marketing.mobile.MobileCore;
import com.adobe.marketing.mobile.Edge;
import com.adobe.marketing.mobile.edge.identity.Identity;
import com.adobe.marketing.mobile.optimize.Optimize;
import com.adobe.marketing.mobile.AdobeCallback;
public class MainApp extends Application {
private final String ENVIRONMENT_FILE_ID = "YOUR_APP_ENVIRONMENT_ID";
@Override
public void onCreate() {
super.onCreate();
MobileCore.setApplication(this);
MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID);
MobileCore.registerExtensions(
Arrays.asList(Edge.EXTENSION, Identity.EXTENSION, Optimize.EXTENSION),
o -> Log.d("MainApp", "Adobe Journey Optimizer - Decisioning Mobile SDK was initialized.")
);
}
}

Kotlin

Copied to your clipboard
import com.adobe.marketing.mobile.MobileCore
import com.adobe.marketing.mobile.Edge
import com.adobe.marketing.mobile.edge.identity.Identity
import com.adobe.marketing.mobile.optimize.Optimize
import com.adobe.marketing.mobile.AdobeCallback
class MainApp : Application() {
private var ENVIRONMENT_FILE_ID: String = "YOUR_APP_ENVIRONMENT_ID"
override fun onCreate() {
super.onCreate()
MobileCore.setApplication(this)
MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID)
MobileCore.registerExtensions(
listOf(Edge.EXTENSION, Identity.EXTENSION, Optimize.EXTENSION)
) {
Log.d("MainApp", "Adobe Experience Platform Mobile SDK was initialized")
}
}
}

Adobe Journey Optimizer - Offer Decisioning

DecisionScope

The DecisionScope public class provides a constructor to create a scope object using the activityId, placementId, and optional itemCount. The decision scope activity and placement information can be obtained from the decision on the Experience Platform UI.

Java

Copied to your clipboard
final DecisionScope decisionScope = DecisionScope("xcore:offer-activity:1111111111111111", "xcore:offer-placement:1111111111111111", 3);

Alternately, another of the class's constructor can be used to create a scope object using the encoded decision scope. The encoded scope can also be read directly from the decision on the Experience Platform UI.

Java

Copied to your clipboard
final DecisionScope decisionScope = DecisionScope("eyJ4ZG06YWN0aXZpdHlJZCI6Inhjb3JlOm9mZmVyLWFjdGl2aXR5OjEyYmEyZjM4MWJjYTY3NWUiLCJ4ZG06cGxhY2VtZW50SWQiOiJ4Y29yZTpvZmZlci1wbGFjZW1lbnQ6MTJiOWEwMDA1NTUwNzM1NyIsICJ4ZG06aXRlbUNvdW50IjozfQ==");

Adobe Target

Target location

The DecisionScope public class provides a designated initializer which can be used to create a Target location (or mbox).

Java

Copied to your clipboard
final DecisionScope decisionScope = DecisionScope("myTargetLocation");

Target Parameters

Target Parameters can be sent in a personalization query request to the Experience Edge network by adding them in data dictionary when calling the updatePropositions API.

Java

Copied to your clipboard
final Map<String, Object> data = new HashMap<>();
final Map<String, String> targetParameters = new HashMap<>();
// Add mbox parameters
targetParameters.put("someKey", "someValue");
// Add profile parameters - prefix with profile.
targetParameters.put("profile.membershipLevel", "platinum");
// Add product parameters
targetParameters.put("productId", "111");
targetParameters.put("categoryId", "Books");
// Add order parameters
targetParameters.put("orderId", "10");
targetParameters.put("orderTotal", "110.56");
targetParameters.put("purchasedProductIds", "111");
data.put("__adobe", new HashMap<String, Object>() {
{
put("target", targetParameters);
}
});
final DecisionScope decisionScope = DecisionScope("myTargetLocation") // Target location (or mbox)
final List<DecisionScope> decisionScopes = new ArrayList<>();
decisionScopes.add(decisionScope);
Optimize.updatePropositions(decisionScopes, null, data);

Target Third Party ID

To use Target Third Party ID in the Experience Edge mobile workflows, the corresponding namespace needs to be configured in Experience Platform Data Collection.

  1. On Experience Platform Data Collection, navigate to Data Collection > Datatreams using the left navigation panel.
  2. Select your configured datastream and click on the desired environment from the list.
  3. Navigate to Adobe Target section, specify the Target Third Party ID Namespace.
  4. Click Save.

Target Third Party ID configuration

In your mobile application, integrate the Identity for Edge Network extension to add the Target Third Party ID in the Identity Map in the personalization query request to the Edge network when calling the updatePropositions API. For more details, see the Identity for Edge Network - updateIdentities API.

Java

Copied to your clipboard
final IdentityItem item = new IdentityItem("1111", AuthenticatedState.AUTHENTICATED, true);
final IdentityMap identityMap = new IdentityMap();
identityMap.addItem(item, "userCRMID") // userCRMID being used as Third Party ID
Identity.updateIdentities(identityMap);

Target Audience Segmentation using Mobile Lifecycle Metrics

To send mobile Lifecycle metrics to Target for creating audiences, a rule needs to be set up on Experience Platform Data Collection to attach these metrics to the Edge personalization query requests. Follow the link to learn how to target visitors using Custom Parameters in Adobe Target.

Create a rule

On Experience Platform Data Collection, navigate to Data Collection > Tags using the left navigation panel. Select an existing mobile tag property or create a new property.

  1. In your mobile property, navigate to Rules in the left navigation panel and click on Create New Rule. If there already are existing rules, you can click on Add Rule to add a new rule.
  2. Provide a name for your rule. In the example here, the rule is named "Attach Mobile Lifecycle Metrics to Personalization Query Requests".

Select an event

  1. Under the Events section, click on Add.
  2. From the Extension dropdown list, select Adobe Experience Platform Edge Network.
  3. From the Event Type dropdown list, select AEP Request Event.
  4. On the right pane, click on + to specify XDM Event Type equals personalization.request.
  5. Click on Keep Changes.

Adobe Journey Optimizer - Decisioning extension Lifecycle rule Event Configuration

Define the action

  1. Under the Actions section, click on Add.
  2. From the Extension dropdown list, select Mobile Core.
  3. From the Action Type dropdown list, select Attach Data.
  4. On the right pane, specify the JSON Payload containing metrics of interest. An example JSON Payload containing all of the mobile Lifecycle metrics is shown below.
  5. Click on Keep Changes.

Adobe Journey Optimizer - Decisioning extension Lifecycle rule Action Configuration

Copied to your clipboard
{
"data": {
"__adobe": {
"target": {
"a.appID": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.appid%}",
"a.locale": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.locale%}",
"a.RunMode": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.runmode%}",
"a.Launches": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.launches%}",
"a.DayOfWeek": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.dayofweek%}",
"a.HourOfDay": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.hourofday%}",
"a.OSVersion": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.osversion%}",
"a.CrashEvent": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.crashevent%}",
"a.DeviceName": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.devicename%}",
"a.Resolution": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.resolution%}",
"a.CarrierName": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.carriername%}",
"a.InstallDate": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.installdate%}",
"a.LaunchEvent": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.launchevent%}",
"a.InstallEvent": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.installevent%}",
"a.UpgradeEvent": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.upgradeevent%}",
"a.DaysSinceLastUse": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.dayssincelastuse%}",
"a.DailyEngUserEvent": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.dailyenguserevent%}",
"a.DaysSinceFirstUse": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.dayssincefirstuse%}",
"a.PrevSessionLength": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.prevsessionlength%}",
"a.MonthlyEngUserEvent": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.monthlyenguserevent%}",
"a.DaysSinceLastUpgrade": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.dayssincelastupgrade%}",
"a.LaunchesSinceUpgrade": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.launchessinceupgrade%}",
"a.ignoredSessionLength": "{%~state.com.adobe.module.lifecycle/lifecyclecontextdata.ignoredsessionlength%}"
}
}
}
}

Save the rule and republish the configuration

After you finish your rule configuration, verify the rule details are as shown below:

Adobe Journey Optimizer - Decisioning extension Lifecycle rule Configuration

  1. Click on Save.
  2. Republish your configuration to the desired environment.

Analytics for Target (A4T)

Set up the Analytics for Target (A4T) cross-solution integration by enabling the A4T campaigns to use Adobe Analytics as the reporting source for a Target activity. Subsequently, all reporting and segmentation for that activity is based on Analytics data collection. For more information, see Adobe Analytics for Adobe Target (A4T).

Once Analytics is listed as the reporting source for an activity on Target UI, based on server-side or client-side logging appropriate actions need to be taken in the customer mobile apps to register impressions, visits/visitors and possibly conversions with Adobe Analytics.

When using server-side logging, tracking methods need to be implemented in the customer mobile apps for server-side data exchange to happen with Adobe Analytics. This is because Optimize mobile SDK operates in prefetch mode and display notifications are required to indicate scope content is rendered so Experience Edge should share relevant A4T payload with Adobe Analytics. In addition, content interactions need to be reported using click notifications and these may lead to additional A4T data exchange with Adobe Analytics.

Tracking

Proposition tracking using direct Offer class methods

User interactions with the decision propositions can be tracked using the following public methods in the Offer class.

Java

Copied to your clipboard
public class Offer {
...
/**
* Dispatches an event for the Edge network extension to send an Experience Event to the Edge network with the display interaction data for the
* given {@code Proposition} offer.
*/
public void displayed() {...}
/**
* Dispatches an event for the Edge network extension to send an Experience Event to the Edge network with the tap interaction data for the
* given {@code Proposition} offer.
*/
public void tapped() {...}
}

Upon calling these Offer methods, an Experience Event is sent to the Edge network with the proposition interaction data for the given offer.

Java

Copied to your clipboard
offer.displayed(); // Sends an Offer display notification to Edge network

Proposition tracking using Edge extension API

For more advanced tracking use cases, additional public methods are available in the Offer and Proposition/OptimizeProposition classes. These methods can be used to generate XDM formatted data for Experience Event - Proposition Interactions and Experience Event - Proposition Reference field groups.

Java

Copied to your clipboard
public class Offer {
...
/**
* Generates a map containing XDM formatted data for {@code Experience Event - Proposition Interactions} field group from this {@code Proposition} item.
*
* The returned XDM data does contain the {@code eventType} for the Experience Event with value {@code decisioning.propositionDisplay}.
*
* Note: The Edge sendEvent API can be used to dispatch this data in an Experience Event along with any additional XDM, free-form data, and override
* dataset identifier.
*
* @return {@code Map<String, Object>} containing the XDM data for the proposition interaction.
*/
public Map<String, Object> generateDisplayInteractionXdm() {...}
/**
* Generates a map containing XDM formatted data for {@code Experience Event - Proposition Interactions} field group from this {@code Proposition} offer.
*
* The returned XDM data contains the {@code eventType} for the Experience Event with value {@code decisioning.propositionInteract}.
*
* Note: The Edge sendEvent API can be used to dispatch this data in an Experience Event along with any additional XDM, free-form data, and override
* dataset identifier.
*
* @return {@code Map<String, Object>} containing the XDM data for the proposition interaction.
*/
public Map<String, Object> generateTapInteractionXdm() {...}
}
Copied to your clipboard
public class Proposition {
...
/**
* Generates a map containing XDM formatted data for {@code Experience Event - Proposition Reference} field group from this {@code Proposition}.
*
* The returned XDM data does not contain {@code eventType} for the Experience Event.
*
* @return {@code Map<String, Object>} containing the XDM data for the proposition reference.
*/
public Map<String, Object> generateReferenceXdm() {...}
}

The Edge sendEvent API can then be used to send this tracking XDM data along with any additional XDM and freeform data to the Experience Edge network. Additionally, an override dataset can also be specified for tracking data. For more details, see Edge - sendEvent API.

Java

Copied to your clipboard
// When a proposition is retrieved using getPropositions API or onUpdatePropositions API callback
// and the corresponding offer is displayed, invoke method on Offer object to get the XDM data.
final Map<String, Object> displayInteractionXdm = offer.generateDisplayInteractionXdm() // Offer display tracking XDM
final Map<String, Object> additionalData = new HashMap<>();
additionalData.put("someDataKey", "someDataValue");
final ExperienceEvent experienceEvent = new ExperienceEvent.Builder().setXdmSchema(displayInteractionXdm).setData(additionalData).build();
Edge.sendEvent(experienceEvent, null)

Configuration keys

To update the SDK configuration programmatically, use the following information to change the Optimize extension configuration values. For more information, see the programmatic updates to Configuration guide.

KeyRequiredDescriptionData Type
optimize.datasetId
No
Override dataset's Identifier which can be obtained from the Experience Platform UI. For more details see, Datasets UI guide
String
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.