Class Optimize
java.lang.Object
com.adobe.marketing.mobile.optimize.Optimize
Public class containing APIs for the Optimize extension.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidClears the client-side in-memory propositions cache.static StringReturns the version of theOptimizeextension.static voidgetPropositions(List<DecisionScope> decisionScopes, com.adobe.marketing.mobile.AdobeCallback<Map<DecisionScope, OptimizeProposition>> callback) This API retrieves the previously fetched propositions, for the provided decision scopes, from the in-memory extension propositions cache.static voidonPropositionsUpdate(com.adobe.marketing.mobile.AdobeCallback<Map<DecisionScope, OptimizeProposition>> callback) This API registers a permanent callback which is invoked whenever the Edge extension dispatches a response Event received from the Experience Edge Network upon a personalization query.static voidupdatePropositions(List<DecisionScope> decisionScopes, Map<String, Object> xdm, Map<String, Object> data) This API dispatches an Event for the Edge network extension to fetch decision propositions, for the provided decision scopes list, from the decisioning services enabled in the Experience Edge network.
-
Field Details
-
EXTENSION
-
-
Method Details
-
extensionVersion
Returns the version of theOptimizeextension.- Returns:
Stringcontaining the current installed version of this extension.
-
updatePropositions
public static void updatePropositions(@NonNull List<DecisionScope> decisionScopes, @Nullable Map<String, Object> xdm, @Nullable Map<String, Object> data) This API dispatches an Event for the Edge network extension to fetch decision propositions, for the provided decision scopes list, from the decisioning services enabled in the Experience Edge network.The returned decision propositions are cached in-memory in the Optimize SDK extension and can be retrieved using
getPropositions(List, AdobeCallback)API.- Parameters:
decisionScopes-List<DecisionScope>containing scopes for which offers need to be updated.xdm-Map<String, Object>containing additional XDM-formatted data to be sent in the personalization query request.data-Map<String, Object>containing additional free-form data to be sent in the personalization query request.
-
getPropositions
public static void getPropositions(@NonNull List<DecisionScope> decisionScopes, @NonNull com.adobe.marketing.mobile.AdobeCallback<Map<DecisionScope, OptimizeProposition>> callback) This API retrieves the previously fetched propositions, for the provided decision scopes, from the in-memory extension propositions cache.- Parameters:
decisionScopes-List<DecisionScope>containing scopes for which offers need to be requested.callback-AdobeCallbackWithError<Map<DecisionScope, OptimizeProposition>>which will be invoked when decision propositions are retrieved from the local cache.
-
onPropositionsUpdate
public static void onPropositionsUpdate(@NonNull com.adobe.marketing.mobile.AdobeCallback<Map<DecisionScope, OptimizeProposition>> callback) This API registers a permanent callback which is invoked whenever the Edge extension dispatches a response Event received from the Experience Edge Network upon a personalization query.The personalization query requests can be triggered by the
updatePropositions(List, Map, Map)API, Edge extensionsendEvent(ExperienceEvent, EdgeCallback)API or launch consequence rules.- Parameters:
callback-AdobeCallbackWithError<Map<DecisionScope, OptimizeProposition>>which will be invoked when decision propositions are received from the Edge network.
-
clearCachedPropositions
public static void clearCachedPropositions()Clears the client-side in-memory propositions cache.
-