Sending Interactions
Besides sending automatic Interactions to Medallia Experience Orchestration, you can also send Interactions programmatically. Programmatic Interactions can be sent to only a preconfigured Interaction path and with defined Properties.
See in the examples below how you can send an Interaction request, Interaction request with Properties, and how to retrieve responses for those requests.
android://touchpoint/interaction
.Sending an Interaction request
Send an Interaction request programmatically by calling the mxoSendInteraction
Kotlin top-level function in a Coroutine or the MedalliaMXO.sendInteraction
Java method, as shown below:
To capture errors, set the throwErrors
parameter to true
and wrap the method in a try/catch
block, as shown below:
This sends a POST request to Medallia Experience Orchestration. Only the Tid from the response is used by the SDK; all other response objects are ignored.
Main
thread.Sending an Interaction request and retrieve the response
Send an Interaction request programmatically, access its response, and then process that response by calling the mxoSendInteraction
Kotlin top-level function in a Coroutine or the MedalliaMXO.sendInteraction
Java method and enqueue with a callback, as shown below:
To capture errors, set the throwErrors
parameter to true
and wrap the method in a try/catch
block, as shown below:
This sends a POST request to Medallia Experience Orchestration.The response can be passed to the MedalliaMXO.process
method, as shown above. This method returns the response to the SDK to process, attaching any Activity capture, Attribute capture, or Optimize instructions to the interaction.
Main
thread.Sending an Interaction request with Properties
To send an Interaction request with Properties, call the mxoSendInteraction
Kotlin top-level function in a Coroutine or the MedalliaMXO.sendInteraction
Java method passing an Interaction path and array of defined Properties, as shown below:
To capture errors, set the throwErrors
parameter to true
and wrap the method in a try/catch
block, as shown below:
This sends a POST request to Medallia Experience Orchestration. Only the tid from the response will be used by the SDK; all other response objects are ignored.
Sending an Interaction request with Properties and retrieve the response
To send an Interaction request with Properties and retrieve the response, call the mxoSendInteraction
Kotlin top-level function in a Coroutine or the the MedalliaMXO.sendInteraction
Java method passing an Interaction path and array of defined Properties, as shown below:
To capture errors, set the throwErrors
parameter to true and wrap the method in a try/catch
block, as shown below:
This sends a POST request to Medallia Experience Orchestration.
The response can be passed to the process
method as a parameter as shown above. This method returns the response to the SDK to process, attaching any capture, track or optimize instructions to the Interaction.