SystemaAI

Functions

clearUserIdHash
Link copied to clipboard
common
abstract suspend fun clearUserIdHash()
getCartComplementary
Link copied to clipboard
common
abstract suspend fun getCartComplementary(payload: CartRecommendationRequest, requestOptions: RequestOptions? = null): SystemaResult<RecommendationResponse>

Get cart complementary API (Coroutine)

abstract fun getCartComplementary(payload: CartRecommendationRequest, requestOptions: RequestOptions? = null, result: (SystemaResult<RecommendationResponse>) -> Unit)

Get cart complementary API (Non-coroutine)

getCartRelated
Link copied to clipboard
common
abstract suspend fun getCartRelated(payload: CartRecommendationRequest, requestOptions: RequestOptions? = null): SystemaResult<RecommendationResponse>

Get cart related API (Coroutine)

abstract fun getCartRelated(payload: CartRecommendationRequest, requestOptions: RequestOptions? = null, result: (SystemaResult<RecommendationResponse>) -> Unit)

Get cart related API (Non-coroutine)

getCategoryPopular
Link copied to clipboard
common
abstract suspend fun getCategoryPopular(payload: RecommendationRequest, requestOptions: RequestOptions? = null): SystemaResult<RecommendationResponse>

Get category popular API (Coroutine)

abstract fun getCategoryPopular(payload: RecommendationRequest, requestOptions: RequestOptions? = null, result: (SystemaResult<RecommendationResponse>) -> Unit)

Get category trending API (Non-coroutine)

getCategoryTrending
Link copied to clipboard
common
abstract suspend fun getCategoryTrending(payload: RecommendationRequest, requestOptions: RequestOptions? = null): SystemaResult<RecommendationResponse>

Get category trending API (Coroutine)

abstract fun getCategoryTrending(payload: RecommendationRequest, requestOptions: RequestOptions? = null, result: (SystemaResult<RecommendationResponse>) -> Unit)

Get category trending API (Non-coroutine)

getComplementary
Link copied to clipboard
common
abstract suspend fun getComplementary(payload: RecommendationRequest, requestOptions: RequestOptions? = null): SystemaResult<RecommendationResponse>

Get complementary API (Coroutine)

abstract fun getComplementary(payload: RecommendationRequest, requestOptions: RequestOptions? = null, result: (SystemaResult<RecommendationResponse>) -> Unit)

Get complementary API (Non-coroutine)

getPopular
Link copied to clipboard
common
abstract suspend fun getPopular(payload: RecommendationRequest = RecommendationRequest(), requestOptions: RequestOptions? = null): SystemaResult<RecommendationResponse>

Get popular API (Coroutine)

abstract fun getPopular(payload: RecommendationRequest = RecommendationRequest(), requestOptions: RequestOptions? = null, result: (SystemaResult<RecommendationResponse>) -> Unit)

Get popular API (Non-coroutine)

getRelated
Link copied to clipboard
common
abstract suspend fun getRelated(payload: RecommendationRequest, requestOptions: RequestOptions? = null): SystemaResult<RecommendationResponse>

Get related API (Coroutine)

abstract fun getRelated(payload: RecommendationRequest, requestOptions: RequestOptions? = null, result: (SystemaResult<RecommendationResponse>) -> Unit)

Get related API (Non-coroutine)

getSimilar
Link copied to clipboard
common
abstract suspend fun getSimilar(payload: RecommendationRequest, requestOptions: RequestOptions? = null): SystemaResult<RecommendationResponse>

Get similar API (Coroutine)

abstract fun getSimilar(payload: RecommendationRequest, requestOptions: RequestOptions? = null, result: (SystemaResult<RecommendationResponse>) -> Unit)

Get similar API (Non-coroutine)

getTrending
Link copied to clipboard
common
abstract suspend fun getTrending(payload: RecommendationRequest = RecommendationRequest(), requestOptions: RequestOptions? = null): SystemaResult<RecommendationResponse>

Get trending API (Coroutine)

abstract fun getTrending(payload: RecommendationRequest = RecommendationRequest(), requestOptions: RequestOptions? = null, result: (SystemaResult<RecommendationResponse>) -> Unit)

Get trending API (Non-coroutine)

getUserSnapshot
Link copied to clipboard
common
abstract suspend fun getUserSnapshot(): SystemaUser

Get a snapshot of the impersonated user details

initialize
Link copied to clipboard
common
abstract suspend fun initialize()
setUserIdHash
Link copied to clipboard
common
abstract suspend fun setUserIdHash(uid: String)
smartSearch
Link copied to clipboard
common
abstract suspend fun smartSearch(payload: SmartSearchRequest, requestOptions: RequestOptions? = null): SystemaResult<SmartSearchResponse>

Smart search API (Coroutine)

abstract fun smartSearch(payload: SmartSearchRequest, requestOptions: RequestOptions? = null, result: (SystemaResult<SmartSearchResponse>) -> Unit)

Smart search API (Non-coroutine)

smartSuggest
Link copied to clipboard
common
abstract suspend fun smartSuggest(payload: SmartSuggestRequest, requestOptions: RequestOptions? = null): SystemaResult<SmartSuggestResponse>

Smart suggest API (Coroutine)

abstract fun smartSuggest(payload: SmartSuggestRequest, requestOptions: RequestOptions? = null, result: (SystemaResult<SmartSuggestResponse>) -> Unit)

Smart suggest API (Non-coroutine)

trackAcquisitionComplete
Link copied to clipboard
common
abstract suspend fun trackAcquisitionComplete(order: PurchaseOrder, url: String, referrer: String? = ""): SystemaResult<HttpResponse>

Track Item Acquisition Complete event. Triggered when a "tracked" item from cart was purchased.

abstract suspend fun trackAcquisitionComplete(order: PurchaseOrder, url: String, referrer: String? = "", result: (SystemaResult<HttpResponse>) -> Unit)
trackContainerShown
Link copied to clipboard
common
abstract suspend fun trackContainerShown(productId: String? = null, containers: List<ItemContainer>, url: String? = "", referrer: String? = ""): SystemaResult<HttpResponse>

Track container shown event

abstract fun trackContainerShown(productId: String? = null, containers: List<ItemContainer>, url: String? = "", referrer: String? = "", result: (SystemaResult<HttpResponse>) -> Unit)
trackItemAcquired
Link copied to clipboard
common
abstract suspend fun trackItemAcquired(productId: String, items: List<CartItem>, url: String, referrer: String? = ""): SystemaResult<HttpResponse>

Track Item Acquired event. Triggered when a "tracked" item makes its way into the cart.

abstract fun trackItemAcquired(productId: String, items: List<CartItem>, url: String, referrer: String? = "", result: (SystemaResult<HttpResponse>) -> Unit)
trackItemClicked
Link copied to clipboard
common
abstract suspend fun trackItemClicked(productId: String, url: String = "", recId: String = "", referrer: String = ""): SystemaResult<HttpResponse>

Track Item Clicked event.

abstract fun trackItemClicked(productId: String, url: String = "", recId: String = "", referrer: String = "", result: (SystemaResult<HttpResponse>) -> Unit)
trackItemRelinquished
Link copied to clipboard
common
abstract suspend fun trackItemRelinquished(productId: String, item: CartItem, url: String, referrer: String? = ""): SystemaResult<HttpResponse>

Track Item Relinquished event. Triggered when a "tracked" item is removed from the cart.

abstract fun trackItemRelinquished(productId: String, item: CartItem, url: String, referrer: String? = "", result: (SystemaResult<HttpResponse>) -> Unit)
trackPageViewed
Link copied to clipboard
common
abstract suspend fun trackPageViewed(url: String = "", recId: String = "", referrer: String = ""): SystemaResult<HttpResponse>

Page View for NON-PDP pages.

abstract fun trackPageViewed(url: String = "", recId: String = "", referrer: String = "", result: (SystemaResult<HttpResponse>) -> Unit)
abstract fun trackPageViewed(productId: String, url: String = "", recId: String = "", referrer: String = "", result: (SystemaResult<HttpResponse>) -> Unit)
abstract suspend fun trackPageViewed(productId: String, url: String = "", recId: String = "", referrer: String = ""): SystemaResult<HttpResponse>

Track page view event

trackWishlistAcquired
Link copied to clipboard
common
abstract suspend fun trackWishlistAcquired(productId: String, items: List<WishlistItem>, url: String, referrer: String? = ""): SystemaResult<HttpResponse>

Track Wishlist Acquired event. Triggered when a an item makes its way into the wishlist.

abstract fun trackWishlistAcquired(productId: String, items: List<WishlistItem>, url: String, referrer: String? = "", result: (SystemaResult<HttpResponse>) -> Unit)
trackWishlistRelinquished
Link copied to clipboard
common
abstract suspend fun trackWishlistRelinquished(productId: String, item: WishlistItem, url: String, referrer: String? = ""): SystemaResult<HttpResponse>

Track Wishlist Relinquished event. Triggered when a an item makes its way out of the wishlist.

abstract fun trackWishlistRelinquished(productId: String, item: WishlistItem, url: String, referrer: String? = "", result: (SystemaResult<HttpResponse>) -> Unit)

Properties

apiKey
Link copied to clipboard
common
abstract val apiKey: SystemaAPIKey
clientID
Link copied to clipboard
common
abstract val clientID: SystemaClientID
credentials
Link copied to clipboard
common
abstract val credentials: Credentials
deviceManager
Link copied to clipboard
common
abstract val deviceManager: SystemaDeviceManager
engine
Link copied to clipboard
common
abstract val engine: HttpClientEngine?
environment
Link copied to clipboard
common
abstract val environment: EnvironmentType
hosts
Link copied to clipboard
common
abstract val hosts: Map<EndpointType, Url>
httpClient
Link copied to clipboard
common
abstract val httpClient: HttpClient
kvStore
Link copied to clipboard
common
abstract val kvStore: SystemaKVStore
logLevel
Link copied to clipboard
common
abstract val logLevel: SystemaLogLevel
meta
Link copied to clipboard
common
abstract val meta: Map<String, Any>
proxyUrls
Link copied to clipboard
common
abstract val proxyUrls: Map<EndpointType, Url>

Extensions

addContainerTags
Link copied to clipboard
fun SystemaAI.addContainerTags(v: View, resp: RecommendationResponse, tagMapping: Map<String, Int>? = null): Result<View>

Add recommendation response tags to a container view Here view refers to an element that containers other product related view elements. i.e. ListView

addOnAttachStateChangeListener
Link copied to clipboard
fun SystemaAI.addOnAttachStateChangeListener(v: View, listener: View.OnAttachStateChangeListener? = null, tagMapping: Map<String, Int>? = null, dispatcher: CoroutineDispatcher = Dispatchers.IO, callback: (Result<HttpResponse>) -> Unit = {}): Result<SystemaOnAttachStateChangeListener>
addOnClickListener
Link copied to clipboard
fun SystemaAI.addOnClickListener(v: View, listener: View.OnClickListener? = null, tagMapping: Map<String, Int>? = null, callback: (Result<HttpResponse>) -> Unit = {}): Result<SystemaViewOnClickListener>
addOnLayoutChangeListener
Link copied to clipboard
fun SystemaAI.addOnLayoutChangeListener(v: View, listener: View.OnLayoutChangeListener? = null, tagMapping: Map<String, Int>? = null, dispatcher: CoroutineDispatcher = Dispatchers.IO, callback: (Result<HttpResponse>) -> Unit = {}): Result<SystemaOnLayoutChangeListener>
addProductTags
Link copied to clipboard
fun SystemaAI.addProductTags(v: View, product: Product, referrerUrl: String = "", tagMapping: Map<String, Int>? = null): Result<View>

Add product related tags for a view or button Here view refers to an element that represents a single product

getAddToCartListener
Link copied to clipboard
fun SystemaAI.getAddToCartListener(getItems: () -> List<CartItem>, tagMapping: Map<String, Int>? = null, callback: (Result<HttpResponse>) -> Unit = {}): Result<SystemaOnClickListener>
getAddToWishlistListener
Link copied to clipboard
fun SystemaAI.getAddToWishlistListener(getItems: () -> List<WishlistItem>, tagMapping: Map<String, Int>? = null, callback: (Result<HttpResponse>) -> Unit = {}): Result<SystemaOnClickListener>
getOnAttachStateChangeListener
Link copied to clipboard
fun SystemaAI.getOnAttachStateChangeListener(tagMapping: Map<String, Int>? = null, dispatcher: CoroutineDispatcher = Dispatchers.IO, callback: (Result<HttpResponse>) -> Unit = {}): Result<SystemaOnAttachStateChangeListener>
getOnClickListener
Link copied to clipboard
fun SystemaAI.getOnClickListener(tagMapping: Map<String, Int>? = null, dispatcher: CoroutineDispatcher = Dispatchers.IO, callback: (Result<HttpResponse>) -> Unit = {}): Result<SystemaViewOnClickListener>
getOnLayoutChangeListener
Link copied to clipboard
fun SystemaAI.getOnLayoutChangeListener(tagMapping: Map<String, Int>? = null, dispatcher: CoroutineDispatcher = Dispatchers.IO, callback: (Result<HttpResponse>) -> Unit = {}): Result<SystemaOnLayoutChangeListener>
getParentOnScrollChangeListener
Link copied to clipboard
fun SystemaAI.getParentOnScrollChangeListener(recContainer: View, tagMapping: Map<String, Int>? = null, dispatcher: CoroutineDispatcher = Dispatchers.IO, callback: (Result<HttpResponse>) -> Unit = {}): Result<SystemaOnParentScrollChangeListener>
getRemoveFromCartListener
Link copied to clipboard
fun SystemaAI.getRemoveFromCartListener(getItem: () -> CartItem, tagMapping: Map<String, Int>? = null, callback: (Result<HttpResponse>) -> Unit = {}): Result<SystemaOnClickListener>
monitorAddToCartButton
Link copied to clipboard
fun SystemaAI.monitorAddToCartButton(btn: View, product: Product, getItems: () -> List<CartItem>, onClickListener: View.OnClickListener? = null, callback: (Result<HttpResponse>) -> Unit = {}): SystemaOnClickListener?
monitorAddToWishlistButton
Link copied to clipboard
fun SystemaAI.monitorAddToWishlistButton(btn: View, product: Product, getItems: () -> List<WishlistItem>, onClickListener: View.OnClickListener? = null, callback: (Result<HttpResponse>) -> Unit = {}): SystemaOnClickListener?
monitorNonProductPage
Link copied to clipboard
fun SystemaAI.monitorNonProductPage(view: View, pageUrl: String, attachStateChangeListener: View.OnAttachStateChangeListener? = null, callback: (Result<HttpResponse>) -> Unit = {}): SystemaOnAttachStateChangeListener?
monitorProductPage
Link copied to clipboard
fun SystemaAI.monitorProductPage(view: View, product: Product, attachStateChangeListener: View.OnAttachStateChangeListener? = null, callback: (Result<HttpResponse>) -> Unit = {}): SystemaOnAttachStateChangeListener?
monitorRecContainer
Link copied to clipboard
fun SystemaAI.monitorRecContainer(recContainer: View, resp: RecommendationResponse, containerLayoutChangeListener: View.OnLayoutChangeListener? = null, scrollableView: View? = null, systemaScrollChangeListener: SystemaOnParentScrollChangeListener? = null, callback: (Result<HttpResponse>) -> Unit = {}): SystemaOnLayoutChangeListener?
monitorRecItem
Link copied to clipboard
fun SystemaAI.monitorRecItem(view: View, product: Product, onClickListener: View.OnClickListener? = null, callback: (Result<HttpResponse>) -> Unit = {}): SystemaViewOnClickListener?
monitorRemoveFromCartButton
Link copied to clipboard
fun SystemaAI.monitorRemoveFromCartButton(btn: View, product: Product, getItem: () -> CartItem, onClickListener: View.OnClickListener? = null, callback: (Result<HttpResponse>) -> Unit = {}): SystemaOnClickListener?
monitorRemoveFromWishlistButton
Link copied to clipboard
fun SystemaAI.monitorRemoveFromWishlistButton(btn: View, product: Product, getItem: () -> WishlistItem, onClickListener: View.OnClickListener? = null, callback: (Result<HttpResponse>) -> Unit = {}): SystemaOnClickListener?
setParentOnScrollChangeListener
Link copied to clipboard
fun SystemaAI.setParentOnScrollChangeListener(recContainer: View, containerParent: View, listener: View.OnScrollChangeListener? = null, tagMapping: Map<String, Int>? = null, dispatcher: CoroutineDispatcher = Dispatchers.IO, callback: (Result<HttpResponse>) -> Unit = {}): Result<SystemaOnParentScrollChangeListener>