Mobile use cases supported in Adobe Campaign Standard

Last update: 2023-02-27
  • Created for:
  • Experienced
    Admin

In this page, you will find the list of every mobile use cases supported in Adobe Campaign Standard using the Adobe Experience Platform SDKs. Note that supporting these use cases involve installing and configuring the Adobe Experience Platform SDKs, tags in Adobe Experience Platform, and Adobe Campaign Standard. For more information on this, refer to this page.

Adobe Campaign Standard supports the following use cases:

To configure these use cases, you need the following extensions:

Register a mobile profile in Campaign Standard

With iOS

In iOS, the following Experience Platform APIs are required:

  • Lifecycle Start, when the app is started and when the app is in the foreground.
  • Lifecycle Pause, when the app is in the background.

For more information, see Lifecycle extension in iOS.

Here is a sample implementation of this use case with iOS:

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {


 ACPCore.setLogLevel(.debug)
 appId = SettingsBundle.getLaunchAppId()

 //===== START Set up Adobe SDK =====
 ACPCore.configure(withAppId: appId)

 ACPCampaign.registerExtension()
 ACPIdentity.registerExtension()
 ACPLifecycle.registerExtension()
 ACPUserProfile.registerExtension()
 ACPSignal.registerExtension()
 ACPCore.start()
 ACPCore.lifecycleStart(nil)

 return true
 }

func applicationDidEnterBackground(_ application: UIApplication) {
 ACPCore.lifecyclePause()
 }

 func applicationDidBecomeActive(_ application: UIApplication) {
 // Workaround until jira AMSDK-7411 is fixed.
 sleep(2)
 ACPCore.lifecycleStart(nil)
 }

With Android

In Android, the following Experience Platform APIs are required:

  • OnResume
  • OnPause

For more information, see Lifecycle extension in Android.

Here is a sample implementation for this use case with Android:

@Override

public void onResume() {
 super.onResume();
 MobileCore.setApplication(getApplication());
 MobileCore.lifecycleStart(null);
 handleOpenTracking();
 }

 @Override
 public void onPause() {
 super.onPause();
 MobileCore.lifecyclePause();
 }

Send a push token to Adobe Campaign Standard

With iOS

In iOS, the following Experience Platform SDK is required:

Here is the sample implementation for this use case with iOS:

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {

 // Register Device Token
 ACPCore.setPushIdentifier(deviceToken)

With Android

In Android, the following Experience Platform SDK is required:

Here is the sample implementation for this use case with Android:

@Override
public void onNewToken(String token) {
    Log.d(TAG, "Refreshed token: " + token);
    MobileCore.setPushIdentifier(token);
}

Enrich a mobile profile with custom data from your application

For this use case to work, you need to create rules for PII postbacks. For more information, see PII Postbacks.

With iOS

In iOS, the following Experience Platform API is required:

  • collectPII
    For more information, see collectPII.

Here is a sample implementation of this use case with iOS:

ACPCore.collectPii(["pushPlatform":"apns", "email":email, "firstName":firstName, "lastName":lastName])

With Android

In Android, the following Experience Platform API is required:

  • collectPII
    For more information, see collectPII.

Here is a sample implementation for this use case with Android:

HashMap<String, String> data = new HashMap<>();
data.put("pushPlatform", "gcm");
data.put("firstName", firstNameText);
data.put("lastName", lastNameText);
data.put("email", emailText);
MobileCore.collectPii(data);

Enrich a mobile profile with Lifecycle data from your application

For this use case to work, you need to create rules for PII postbacks. For more information, see PII Postbacks.

NOTE

Adobe Campaign does not distinguish between custom data or lifecycle data from the mobile app. Both types of data can be sent to server using a collectPii postback rule in response to an event in the mobile app.

With iOS

In iOS, the following Experience Platform APIs are required:

  • Lifecycle Start, when the app is started and when the app is in the foreground.
  • Lifecycle Pause, when the app is in the background.

For more information, see Lifecycle extension in iOS.

Here is a sample implementation of this use case with iOS:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {


 ACPCore.setLogLevel(.debug)
 appId = SettingsBundle.getLaunchAppId()

 //===== START Set up Adobe SDK =====
 ACPCore.configure(withAppId: appId)

 ACPCampaign.registerExtension()
 ACPIdentity.registerExtension()
 ACPLifecycle.registerExtension()
 ACPUserProfile.registerExtension()
 ACPSignal.registerExtension()
 ACPCore.start()
 ACPCore.lifecycleStart(nil)

 return true
 }

func applicationDidEnterBackground(_ application: UIApplication) {
 ACPCore.lifecyclePause()
 }

 func applicationDidBecomeActive(_ application: UIApplication) {
 // Workaround until jira AMSDK-7411 is fixed.
 sleep(2)
 ACPCore.lifecycleStart(nil)
 }

With Android

In Android, the following Experience Platform APIs are required:

  • OnResume
  • OnPause

For more information, see Lifecycle extension in Android.

Here is a sample implementation for this use case with Android:

@Override

public void onResume() {
 super.onResume();
 MobileCore.setApplication(getApplication());
 MobileCore.lifecycleStart(null);
 handleOpenTracking();
 }

 @Override
 public void onPause() {
 super.onPause();
 MobileCore.lifecyclePause();
 }

Track user interaction with Push notifications

You need to create rules for push notifications tracking postback. For more information, see Push notifications tracking postback.

With iOS

In iOS, the following Experience Platform SDK is required:

Here is a sample implementation of this use case with iOS:

let deliveryId = userInfo["_dId"] as? String
let broadlogId = userInfo["_mId"] as? String
if (deliveryId != nil && broadlogId != nil) {
    ACPCore.trackAction("tracking", data: ["deliveryId": deliveryId!, "broadlogId": broadlogId!, "action":"2"])
}

With Android

In Android, the following Experience Platform SDK is required:

Here is a sample implementation for this use case with Android:

contextData.put("deliveryId", deliveryId);
contextData.put("broadlogId", messageId);
contextData.put("action", "2");
MobileCore.trackAction("tracking", contextData);

Implement a custom event in your application to trigger In-App messages

With iOS

In iOS, the following Experience Platform SDK is required:

Here is a sample implementation of this use case with iOS:

ACPCore.trackAction(mobileEventName, data: [:] )

With Android

In Android, the following Experience Platform SDK is required:

Here is a sample implementation for this use case with Android:

MobileCore.trackAction(mobileEventText, new HashMap<String,String>());

Set linkage fields for additional authentication

With iOS

To set linkage fields for additional authentication for the profile template that is based on In-App messages in iOS, the following Experience Platform SDK is required:

Here is are sample implementations of this use case with iOS.

To set linkage fields:

var linkageFields = [String: String]()
linkageFields["cusEmail"] = "john.doe@email.com"
ACPCampaign.setLinkageFields(linkageFields)

To reset linkage fields:

ACPCampaign.resetLinkageFields(linkageFields)

With Android

To set linkage fields for additional authentication for the profile template that is based on In-App messages in Android, the following Experience Platform SDK is required:

Here is are sample implementations of this use case with Android.

To set linkage fields:

HashMap<String, String> linkageFields = new HashMap<String, String>();
linkageFields.put("cusEmail", "john.doe@email.com");
Campaign.setLinkageFields(linkageFields);

To reset linkage fields:

Campaign.resetLinkageFields()

On this page