The Adobe Experience Platform Offer Decisioning mobile extension is currently in BETA. Use of this extension is by invitation only. Please contact your Adobe Customer Success Manager to learn more and get access to the materials for this tutorial.
Adobe Experience Platform Offer Decisioning mobile extension can deliver personalized offers that are managed in Offer Decisioning. You can create your offers and other related objects using the Offer Decisioning user interface (UI) or APIs. To learn more about Offer Decisioning, please refer to Offer Decisioning product documentation.
IMS organization is enabled for edge decisioning
Offers and Activities are created
Adobe Experience Platform Core and Edge mobile extensions have been implemented in the app
Launch UI config is published
To enable Offer Decisioning, you need to perform the following steps:
In Adobe Experience Platform Launch, navigate to the Edge Configurations from the left panel, then select the configuration that needs to be updated.
Enable Adobe Experience Platform in your edge configuration and check the Offer Decisioning
box
Add AEP Offer Decisioning extension to the project.
Use Cocoapods for integrating with AEP Mobile SDK:
platform :ios, '10.0'​use_frameworks!target 'YourAppTarget' do# Mobile SDK Core Bundlepod 'AEPServices', :git => '[email protected]:adobe/aepsdk-core-ios.git', :branch => 'main'pod 'AEPCore', :git => '[email protected]:adobe/aepsdk-core-ios.git', :branch => 'main'pod 'AEPLifecycle', :git => '[email protected]:adobe/aepsdk-core-ios.git', :branch => 'main'pod 'AEPIdentity', :git => '[email protected]:adobe/aepsdk-core-ios.git', :branch => 'main'pod 'AEPSignal', :git => '[email protected]:adobe/aepsdk-core-ios.git', :branch => 'main'pod 'AEPRulesEngine', :git => '[email protected]:adobe/aepsdk-rulesengine-ios.git', :branch => 'main'pod 'AEPEdge', :git => '[email protected]:adobe/aepsdk-edge-ios.git', :branch => 'main'​# AEP Offer Decisioning SDKpod 'AEPOfferDecisioning', :git => '[email protected]:adobe/aepsdk-offer-ios.git', :branch => 'main'​end
import UIKitimport AEPCoreimport AEPEdgeimport AEPIdentityimport AEPLifecycleimport AEPSignalimport AEPOfferDecisioning​@UIApplicationMainclass AppDelegate: UIResponder, UIApplicationDelegate {​var window: UIWindow?​func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {MobileCore.configureWith(appId: YOUR_APP_ID)​// register Mobile Core and AEP Edge extensionsMobileCore.registerExtensions([Edge.self, Identity.self, Lifecycle.self, Signal.self, OfferDecisioning.self])​return true}}
After you get everything correctly set up, you can now use the AEP Offer Decisioning extension to prefetch and retrieve the offers and then render the content in your app.
For Offer Decisioning, Decision Scope is the JSON data structure which contains the activity and placement IDs you want the offer decisioning service to use to propose offers.
Decision scope JSON:
{"activityId":"xcore:offer-activity:11cfb1fa93381aca","placementId":"xcore:offer-placement:1175009612b0100c"}
AEP Offer Decisioning extension provides a convenient class for you to construct the Decision Scope.
AEP Offer Decisioning exension provides separate APIs to prefetch the offers and retrieves the offer contents. This design aims to help apps to build better user experience for their end users. We recommend the app to prefetch the offers in advance, so there is no latency by the time you retrieve the offer contents and render them.
let decisionScope1 = DecisionScope(activityId: "xcore:offer-activity:11cfb1fa93381aca", placementId: "xcore:offer-placement:1175009612b0100c")let decisionScope2 = DecisionScope(activityId: "xcore:offer-activity:11cfb1fa93381aca", placementId: "xcore:offer-placement:1175009612b0100d")​OfferDecisioning.prefetchOffers(decisionScopes: [decisionScope1, decisionScope2])
Once the offers have been prefetched, use the retrievePrefetchedOffers
API to get the contents for the targeted decision scopes.
let decisionScope = DecisionScope(activityId: "xcore:offer-activity:11cfb1fa93381aca", placementId: "xcore:offer-placement:1175009612b0100c")​OfferDecisioning.retrievePrefetchedOffers(decisionScopes: [decisionScope]) { offersDict, _ in​// handle responseif let offers = offersDict[decisionScope] {let offer = offers[0]// render the offer with offer.content}}
Offer prefetch can not only be triggered by the aforementioned prefetchOffers
API, calling Edge.sendEvent()
or using Rules are alternate approaches to prefetch offers. AEP Offer Decisioning extension is listening for all the responses from Offer Decisioning Services, no matter how the requests are triggered.
The app can register a listener for offer update, so it is notified whenever there are new offers being cached or updated.