Class Optimize

java.lang.Object
com.adobe.marketing.mobile.optimize.Optimize

public class Optimize extends Object
Public class containing APIs for the Optimize extension.
  • Field Details

    • EXTENSION

      public static final Class<? extends com.adobe.marketing.mobile.Extension> EXTENSION
  • Method Details

    • extensionVersion

      @NonNull public static String extensionVersion()
      Returns the version of the Optimize extension.
      Returns:
      String containing 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 extension sendEvent(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.