setConfiguration

To set or update the Capacitor SDK configuration call the following:setConfiguration(config: MXOConfiguration | null): Promise<MXOResult<null>>

Example of usage:

const config = { siteKey : "ONE-XXXXXXXXXX-1022", touchpoint : "capacitor://yourTouchpoint", host : "https://eu2.thunderhead.com", mode : 0 } MedalliaMXO.setConfiguration(config) .then(mxoResult => { if (mxoResult.value && mxoResult.value.apiName) { // error case console.error(mxoResult.value) } else { // success case console.log("Configuration is set") } }) .catch(error => { console.error(error) }) try { const config : MXOConfiguration = { siteKey : "ONE-XXXXXXXXXX-1022", touchpoint : "capacitor://yourTouchpoint", host : "https://eu2.thunderhead.com", mode : 0 } const {value} = await MedalliaMXO.setConfiguration(config) if (value && value.apiName) { // error case console.error(value) } else { // success case console.log("Configuration is set") } } catch (error) { console.error(error) }