These docs are for v0.0.1. Click to read the latest docs for v1.0.61.

Discussions

Ask a Question
Back to All

Custom widget and two chat interactions

I'm using AXP Chat widget + custom widget. My custom widget sends messages to the Chat widget using 'api.sendChatMessage(text);' For example the agent clicks on a quick answer in the custom widget and that quick answer is then sent to the Chat widget.

My widget uses 'api = window.WS.widgetAPI(interactionId)' and that works fine with one chat interaction. But when a second chat interaction is started, all messages are send only to the second chat interaction.

I think it has to do with the interactionId that changed when the second chat interaction was accepted.

Do you have example Javascript code for handling multiple chat interactions?