MedalliaMXO APIs
Automatic API
Get or set the current automatic Interaction tracking configuration using the following:
open class var automaticInteractionTrackingConfiguration: MXOAutomaticInteractionTrackingConfiguration?
To retrieve an automatic Interaction, use the function below:
open class func getAutomaticInteraction(for
viewController: UIViewController
) -> MXOInteraction?
Property | Type | Description |
---|---|---|
viewController | UIViewController | The View Controller to get an automatic Interaction for. |
Automatic Interaction assignment API
Assign an automatic Interaction to a View to be used instead of using the automatic path using the following:
open class func assign(automaticInteraction
assignInteraction: MXOAutomaticInteractionAssignment
) throws
Property | Type | Description |
---|---|---|
assignInteraction | MXOAutomaticInteractionAssignment | The Interaction to assign to automatic tracking. |
Automatic Interaction exclusion API
Exclude a View from automatically being tracked as an Interaction using the following:
open class func exclude(automaticInteraction
excludeInteration: MXOAutomaticInteractionExclusion
) throws
Parameter | Type | Description |
---|---|---|
excludeInteration | MXOAutomaticInteractionExclusion | The Interaction to exclude from tracking. |
Automatic Interaction subscription API
Subscribe to automatic Interaction request responses using the following:
protocol MXOAutomaticInteractionSubscription
Use the convenience function to subscribe to automatic Interaction tracking:
open class func subscribe(toAutomaticInteraction
subscriber: MXOAutomaticInteractionSubscriber
) throws -> MXOAutomaticInteractionSubscription
Parameter | Type | Description |
---|---|---|
subscriber | MXOAutomaticInteractionSubscriber | The subscriber for an Interaction. |
Configuration API
Get or set the MXO SDK configuration using the following:
open class var configuration: MXOConfiguration?
Identity APIs
Retrieve the TID of the current user using the following:
open class func getTid() -> String?
Clear the current user's TID from the SDK using the following:
open class func clearTid()
This feature enables the SDK to notify MXO when multiple user's may access the same app on the same device.
Identity Transfer API
Programmatic API to process a deep link to an app that has had the MXO Orchestration Plugin disabled or has had the identity transfer disabled therefore preventing the automatic sending of deep link parameters to MXO.
Get or set the MXO SDK identity transfer configuration using the following:
open class var identityTransferConfiguration: MXOIdentityTransferConfiguration?
Process a URL deep link using the function below:
open class func process(deepLink
url: URL
) throws
Parameter | Type | Description |
---|---|---|
url | URL | The deep link URL to process. |
Generate a URL with a tid
query parameter using the function below:
open class func generateIdentityTransferUrl(_
url: URL
) throws -> URL
Parameter | Type | Description |
---|---|---|
url | URL | The URL to generate. |
Interaction APIs
Send Interactions to MXO using the following:
open class func sendInteraction(
request: MXOInteractionRequest
) throws
Parameter | Type | Description |
---|---|---|
request | MXOInteractionRequest | The Interaction request to be sent. |
Send Properties to MXO using the following:
open class func sendProperties(
request: MXOInteractionRequest
) throws
Parameter | Type | Description |
---|---|---|
request | MXOInteractionRequest | The Interaction request to be sent. |
Send response code to MXO using the following:
open class func sendInteraction(responseCodeRequest
request: MXOResponseCodeRequest
) throws
Parameter | Type | Description |
---|---|---|
request | MXOResponseCodeRequest | The response code to be sent. |
Generate a URL for outbound link tracking using the function below:
open class func sendInteraction(forOutboundLink
link: URL
) throws
Parameter | Type | Description |
---|---|---|
link | URL | The URL for outbound link tracking. |
Process the response returned from sending an Interaction using the following:
open class func process(
response: MXOInteractionResponse
) throws
Parameter | Type | Description |
---|---|---|
response | MXOInteractionResponse | The Interaction response to process. |
Location API
Inform the MXO SDK about location details using the following:
open class func process(
location: CLLocation
) throws
Parameter | Type | Description |
---|---|---|
location | CLLocation | The device location to send to MXO. |
Logging API
Get or set the MXO SDK logging configuration using the following:
open class var loggingConfiguration: MXOLoggingConfiguration?
MXOErrorCode
An MXO SDK Runtime exception.
public struct MXOError : CustomNSError, Hashable, Error {
public init(_nsError: NSError)
public static var errorDomain: String { get }
public enum Code : Int, @unchecked Sendable, Equatable {
public typealias _ErrorType = MXOError
case sdkError = 9000
case apiError = 9001
case invalidRequestError = 9002
case invalidParamError = 9003
case invalidSubscriberError = 9004
}
public static var sdkError: MXOError.Code { get }
public static var apiError: MXOError.Code { get }
public static var invalidRequestError: MXOError.Code { get }
public static var invalidParamError: MXOError.Code { get }
public static var invalidSubscriberError: MXOError.Code { get }
}
Enum | Description |
---|---|
sdkError | Used to specify that an SDK error was encountered. |
apiError | Used to specify that an API error was encountered. |
invalidRequestError | Used to specify that an invalid request error was encountered. |
iInvalidParamError | Used to specify that an invalid param error was encountered. |
subscriberError | Used to specify that an invalid subscriber error was encountered. |
Opt Out API
Get or set the optout
settings for compliance with a user's will to be tracked or not using the following:
open class var optOutConfiguration: MXOOptOutConfiguration?
Version API
open class func getVersion() -> String