3
votes

I am using a customised Microsoft Bot Framework WebChat Client. My bot has the capability to hand to a live chat service with an Agent, when it is unable to provide a solution to the user.

I have the requirement to allow the agents to have a "sneak peek" at what is currently being typed into the Webchat Client.

I have enabled the sendTyping feature in chat.html (i.e. sendTyping: true):

            BotChat.App({
            bot: bot,
            botConnection: botConnection,
            locale: 'agent',
            resize: 'window',
            sendTyping: true,    // defaults to false. set to true to send 'typing' activities to bot (and other users) when user is typing
            user: user
        }, document.getElementById('BotChatGoesHere')
        );

When inspecting the outbound typing message, the typing event is sent (debounced about every three seconds or so), however it contains no text. I suspect this is not a feature, however I would kindly ask the community if anyone has done this previously and if so how to implement?

Thanks in advance.

1

1 Answers

2
votes

This isn't supported indeed, the 'SendTyping' event doesn't contain any metadata about the state of the inputfield.

You could leverage the backchannel to send custom events. In your custom WebChat implementation, you can send a custom event on every keystroke or every x seconds. However, if you link to another agent service, maybe it can be smarter to call their / a custom API directly.

Make sure you have the consent of the user, since I don't think you can just send all keystrokes without consent.