Discussions
Custom widget and two chat interactions
over 1 year ago by Michaël van Schagen
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?