Class Optimize
-
- All Implemented Interfaces:
public class OptimizePublic class containing APIs for the Optimize extension.
-
-
Method Summary
Modifier and Type Method Description static StringextensionVersion()Returns the version of the Optimizeextension.static voidupdatePropositions(@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. static voidupdatePropositions(@NonNull() List<DecisionScope> decisionScopes, @Nullable() Map<String, Object> xdm, @Nullable() Map<String, Object> data, @Nullable() AdobeCallback<Map<DecisionScope, OptimizeProposition>> callback)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. static voidupdatePropositions(@NonNull() List<DecisionScope> decisionScopes, @Nullable() Map<String, Object> xdm, @Nullable() Map<String, Object> data, double timeoutSeconds, @Nullable() AdobeCallback<Map<DecisionScope, OptimizeProposition>> callback)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. static voidgetPropositions(@NonNull() List<DecisionScope> decisionScopes, @NonNull() 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 voidgetPropositions(@NonNull() List<DecisionScope> decisionScopes, double timeoutSeconds, @NonNull() 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(@NonNull() 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 voidclearCachedPropositions()Clears the client-side in-memory propositions cache. -
-
Method Detail
-
extensionVersion
@NonNull() static String extensionVersion()
Returns the version of the
Optimizeextension.- Returns:
String containing the current installed version of this extension.
-
updatePropositions
@Deprecated() 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 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.
-
updatePropositions
static void updatePropositions(@NonNull() List<DecisionScope> decisionScopes, @Nullable() Map<String, Object> xdm, @Nullable() Map<String, Object> data, @Nullable() AdobeCallback<Map<DecisionScope, OptimizeProposition>> callback)
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 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.callback-AdobeCallback<Map<DecisionScope, OptimizeProposition>>which will be invoked when decision propositions are received from the Edge network.
-
updatePropositions
static void updatePropositions(@NonNull() List<DecisionScope> decisionScopes, @Nullable() Map<String, Object> xdm, @Nullable() Map<String, Object> data, double timeoutSeconds, @Nullable() AdobeCallback<Map<DecisionScope, OptimizeProposition>> callback)
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 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.timeoutSeconds-Doublecontaining additional configurable timeout(seconds) to be sent in the personalization query request.callback-AdobeCallback<Map<DecisionScope, OptimizeProposition>>which will be invoked when decision propositions are received from the Edge network.
-
getPropositions
static void getPropositions(@NonNull() List<DecisionScope> decisionScopes, @NonNull() 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.
-
getPropositions
static void getPropositions(@NonNull() List<DecisionScope> decisionScopes, double timeoutSeconds, @NonNull() 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
static void onPropositionsUpdate(@NonNull() 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 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
static void clearCachedPropositions()
Clears the client-side in-memory propositions cache.
-
-
-
-