Sending Properties
Besides sending programmatic Interactions with Properties to Medallia Experience Orchestration, you can also send defined programmatic Properties to a base Touchpoint or a preconfigured Interaction path.
ios://touchpoint/interaction
.Defining Properties
Define Properties you want to send to Medallia Experience Orchestration as a dictionary of String
/String
key-value pairs as shown bellow.
let properties = ["key1":"value1","key2":"value2"]
NSDictionary *properties = @{@"Key1":@"Value1", @"Key2":@"Value2"};
After the Properties are defined, they can be sent to Medallia Experience Orchestration by calling the SDK's public methods from the below sections.
Sending Properties to a base Touchpoint
To send Properties to a base Touchpoint, call the following public method passing a dictionary of defined Properties to it:
if let interaction = try? MXOInteraction(withString: "/") {
do {
try MedalliaMXO.sendProperties(request: MXOInteractionRequest { builder in
builder.interaction = interaction
builder.properties = properties
})
} catch {
print("Error sending properties to base touchpoint: \(error.localizedDescription)")
}
}
NSError *error;
__block MXOInteraction *interaction = [MXOInteraction initWithString:@"/" error:&error];
[MedalliaMXO sendProperties:[MXOInteractionRequest initWithBuilder:^(MXOInteractionRequestBuilder * _Nonnull builder) {
builder.interaction = interaction;
builder.properties = properties;
}] error:&error];
This sends a PUT request to Medallia Experience Orchestration.
/
) or wildcard (/*
) Interaction in Medallia Experience Orchestration. The Attribute Capture Point API name in Orchestration must match the key name sent above.Sending Properties to an Interaction
To send Properties to a specific Interaction, call the following public method, passing a dictionary of defined Properties and providing the Interaction path:
if let interaction = try? MXOInteraction(withString: "/InteractionPath") {
do {
try MedalliaMXO.sendProperties(request: MXOInteractionRequest { builder in
builder.interaction = interaction
builder.properties = properties
})
} catch {
print("Error sending properties to an interaction: \(error.localizedDescription)")
}
}
NSError *error;
__block MXOInteraction *interaction = [MXOInteraction initWithString:@"/InteractionPath" error:&error];
[MedalliaMXO sendProperties:[MXOInteractionRequest initWithBuilder:^(MXOInteractionRequestBuilder * _Nonnull builder) {
builder.interaction = interaction;
builder.properties = properties;
}] error:&error];
This sends a PUT request to Medallia Experience Orchestration.