Sending a response code
Sending an Interaction response code can be useful when displaying Optimizations programmatically and capturing the user's response.
ios://touchpoint/interaction
.To send a response code, call the method shown below by passing the response code and the corresponding Interaction path as parameters:
__block NSError *error;
__block MXOResponseCode *responseCode = [MXOResponseCode initWithResponseCode:@"responseCode" error:&error];
MXOInteraction *interaction = [MXOInteraction initWithString:@"/InteractionPath" error:&error];
[MedalliaMXO sendInteractionResponseCode:[MXOResponseCodeRequest initWithBuilder:^(MXOResponseCodeRequestBuilder * _Nonnull builder) {
builder.interaction = interaction;
builder.responseCode = responseCode;
builder.onError = ^(NSError *error) {
NSLog(@"Error sending response code: %@", [error debugDescription]);
};
builder.onSuccess = ^(MXOInteractionResponse *response) {
[MedalliaMXO processResponse:response error:&error];
};
}] error:&error];
This sends a PUT request to Medallia Experience Orchestration.