getTid

Retrieving the current TID can be useful if you want to monitor the current user in Medallia Experience Orchestration. The TID can also be used if you need to pass the identity of the current user to another system which sends data to Medallia Experience Orchestration.

Get the current tid parameter used by the Capacitor SDK by calling the following:
getTid(): Promise<MXOResult<string>>

Example of usage:

MedalliaMXO.getTid()
	.then(mxoResult => {
		if (mxoResult.value && mxoResult.value.apiName) {
			// error case
			console.error(mxoResult.value)
		} else {
			// success case
			console.log("TID: ", mxoResult.value)
		}
	})
	.catch(error => {
                console.error(error)
	})
try {
	const {value} = await MedalliaMXO.getTid()
        if (value && value.apiName) {
            	// error case
            	console.error(value)
        } else {
            	// success case
            	console.log("TID: ", value)
        }
} catch (error) {
        console.error(error)
}