Reading Custom Output Parameters

Hello all,

I am currently trying to implement a solution that sends custom output params along side the TWC supported output params in my development environment.

My goal is to call a number of methods found on the Teneo Web Chat JavaScript API | Teneo Developers webpage depending on certain variables being set in the front end by these custom output params.

The user will use TWC to get to a specific point in the conversational logic where an output has the below example output parameters.

image

Am I able to or how do I access the exampleoutputparam in the frontend?

Any help would be appreciated, thank you :slight_smile:!

Hi. Yes, you can access and use it like that:

window.TeneoWebChat.on('engine_response', ({responseDetails}) => {
	var x = responseDetails.output.exampleoutputparam;
	if (x) x = JSON.parse(x);
	// User x here:
	...
});
1 Like

Thank you, I managed to get it working!

1 Like