sendProperties
sendProperties(request: MXOInteractionRequest): Promise<MXOResult<MXOInteractionResponse>>
Example of usage:
const interactionRequest = {
interaction : 'capacitor://touchpoint/interaction',
properties : {
'key1':'value1',
'key2':'value2'
}
}
MedalliaMXO.sendProperties(interactionRequest)
.then(mxoResult => {
if (mxoResult.value && mxoResult.value.apiName) {
// error case
console.error(mxoResult.value)
} else {
// success case
console.log("Properties are sent to an Interaction: ", mxoResult.value)
}
})
.catch(error => {
console.error(error)
})
try {
const interactionRequest : MXOInteractionRequest = {
interaction : 'capacitor://touchpoint/interaction',
properties : {
'key1':'value1',
'key2':'value2'
}
}
const {value} = await MedalliaMXO.sendProperties(interactionRequest)
if (value && value.apiName) {
// error case
console.error(value)
} else {
// success case
console.log("Properties are sent to an Interaction: ", value)
}
} catch (error) {
console.error(error)
}
capacitor://touchpoint/interaction
.