com.medallia.mxo

Automatic API

Get or set the current automatic Interaction tracking configuration using the following:

final MXOAutomaticInteractionTrackingConfiguration config = MedalliaMXO.getAutomaticInteractionTrackingConfiguration();
MedalliaMXO.setAutomaticInteractionTrackingConfiguration(config);

To retrieve an automatic Interaction, use the methods below:

final MXOInteraction interaction = MedalliaMXO.getAutomaticInteraction(activity);
final MXOInteraction interaction = MedalliaMXO.getAutomaticInteraction(fragment);
Note: For more information, see how to disable/enable automatic Interaction tracking.

Automatic Interaction assignment API

Assign an automatic Interaction to a View to be used instead of using the automatic path.

MedalliaMXO.assignAutomaticInteraction(assignment);
Note: For more information, see how to assign an Interaction.

Automatic Interaction exclusion API

Exclude a View from automatically being tracked as an Interaction using the following:

MedalliaMXO.excludeAutomaticInteraction(excludedInterction);
Note: For more information, see how to exclude an Interaction.

Automatic Interaction subscription API

Subscribe to automatic Interaction request responses using the following:

MedalliaMXO.subscribeToAutomaticInteraction(subscriber);
Note: For more information, see examples on how to subscribe to an Interaction.

Configuration API

Get or set the MXO SDK configuration using the following:

final MXOConfiguration config = MedalliaMXO.getConfiguration();
MedalliaMXO.setConfiguration(config);
Note: For more information, see how to configure the SDK or get the current configuration.

Identity APIs

Retrieve the TID of the current user using the following:

String tid = MedalliaMXO.getTid();
Note: For more information, see how to get the current TID.

Clear the current user's TID from the SDK using the following:

MedalliaMXO.clearTid();

This feature enables the SDK to notify MXO when multiple user's may access the same app on the same device.

Note: For more information, see how to clear the current TID.

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:

final MXOIdentityTransferConfiguration config = MedalliaMXO.getIdentityTransferConfiguration();
MedalliaMXO.setIdentityTransferConfiguration(config);
Note: For more information, see how to disable/enable automatic identity transfer.

Process a URI deep link using the methods below:

MedalliaMXO.process(Uri.parse("android://path"))
MedalliaMXO.process(URI.create("android://path"));
Note: For more information, see how to process a deep link.

Generate a URL or Uri with a tid query parameter using the methods below:

try {
	MedalliaMXO.generateIdentityTransferUrl(new URL("https://mySite.com"));
} catch (MalformedURLException e) {
	throw new RuntimeException(e);
}
Uri uri = MedalliaMXO.generateIdentityTransferUri(Uri.parse("https://mySite.com"));
URI uri = MedalliaMXO.generateIdentityTransferUri(URI.create("https://mySite.com"));
Note: For more information, see how to generate identity transfer links.

Interaction API

Process the response returned from sending an Interaction using the following:

MedalliaMXO.process(mxoInteractionResponse);
Note: For more information, see how to process an Interaction response.

Interaction Network API

Send Interactions to MXO using the following:

try {
	final CompletableFuture<MXOInteractionResponse> response = MedalliaMXO.sendInteraction(new MXOInteractionRequest());
} catch (ExecutionException e) {
	throw new RuntimeException(e);
}
Note: For more information, see how to send Interactions.

Send Properties to MXO using the following:

try {
	final CompletableFuture<MXOInteractionResponse> response = MedalliaMXO.sendProperties(new MXOInteractionRequest());
} catch (ExecutionException e) {
	throw new RuntimeException(e);
}
Note: For more information, see how to send Properties.

Send response code to MXO using the following:

try {
	final CompletableFuture<MXOInteractionResponse> response = MedalliaMXO.sendResponseCode(new MXOInteractionRequest());
} catch (ExecutionException e) {
	throw new RuntimeException(e);
}
Note: For more information, see how to send a response code.

Interaction URI API

Programmatic API to track an outbound link when the automatic outbound link tracking is disabled.

Generate a URL or Uri for outbound link tracking using the methods below:

try {
	URL url = MedalliaMXO.sendInteractionForOutboundLink(new URL("https://mySite.com"));
} catch (MalformedURLException e) {
	throw new RuntimeException(e);
}
MedalliaMXO.sendInteractionForOutboundLink(Uri.parse(Uri))
MedalliaMXO.sendInteractionForOutboundLink(URI.parse(URI))
Note: For more information, see how to send an outbound link or disable/enable outbound link tracking.

Location API

Inform the MXO SDK about location details using the following:

MedalliaMXO.process(location);
Note: For more information, see how to send a location object.

Logging API

Get or set the MXO SDK logging configuration using the following:

final MXOLoggingConfiguration config = MedalliaMXO.getLoggingConfiguration();
MedalliaMXO.setLoggingConfiguration(config);
Note: For more information, see how to configure logging.

MXOError

An MXO SDK Runtime exception.

public abstract class MXOError extends RuntimeException {
    public MXOError(String message) {
        super(message);
    }
}
Note: For more information, see an example of using MXO errors.

MXOErrorApi

The error class used to signify that an API error was encountered.

public class MXOErrorApi extends MXOError {
    private final String errorMessage;

    public MXOErrorApi(String errorMessage) {
        super(errorMessage);
        this.errorMessage = errorMessage;
    }

    public String getErrorMessage() {
        return errorMessage;
    }
}
Note: For more information, see an example of using an API error.

MXOErrorSdk

The error class used to signify that an SDK error was encountered.

public class MXOErrorSdk extends MXOError {
    private final int systemCode;
    private final String errorMessage;

    public MXOErrorSdk(int systemCode, String errorMessage) {
        super(errorMessage);
        this.systemCode = systemCode;
        this.errorMessage = errorMessage;
    }

    public int getSystemCode() {
        return systemCode;
    }

    public String getErrorMessage() {
        return errorMessage;
    }
}
Note: For more information, see an example of using an SDK error.

Opt Out API

Get or set the optout settings for compliance with a user's will to be tracked or not using the following:

final MXOOptOutConfiguration config = MedalliaMXO.getOptOutConfiguration();
MedalliaMXO.setOptOutConfiguration(config);
Note: For more information, see how to opt out or into Interaction tracking.

Version API

Get the version of the MXO SDK using the following:
String version = MedalliaMXO.getVersion();
Note: For more information, see how to get the current SDK version.