Botframework-emulator: Support custom events to test custom Webchat clients.

Created on 18 Feb 2018  ·  15Comments  ·  Source: microsoft/BotFramework-Emulator

Provide a mechanism to post custom events to a bot.

A form should be included to insert the following event details:

  • Name; The name of the event to be handled by bot
  • Value; The event data to be consumed by bot.

The event sent to the bot
screen shot 2018-02-17 at 10 19 47 pm

Custom event form to specify name and value
screen shot 2018-02-18 at 6 00 20 pm

The customEvent button in the address bar menu
screen shot 2018-02-18 at 6 00 29 pm

Backlog Enhancement Help Wanted

Most helpful comment

This is great. I think this is very reasonable request. Help me understand: Are you developing your own chat client that sends custom event activities?

All 15 comments

This is great. I think this is very reasonable request. Help me understand: Are you developing your own chat client that sends custom event activities?

I have a similar need. I use the webchat control, but when the control loads, the page it is on sends custom user information to the bot via the backchannel in order to customize the user's experience (or to use as tokens for backend APIs).

@eanders-MS exactly, I am developing a custom chat client.

@negativeeddy, I have basically the same use-case.

I created a PR, hopefully it gets merged in soon :)

I also need such feature. I'm sending custom event with initialization data such as URL of external Web API's.
Thanks

Hi @eanders-MS, I am developing a custom chat client that sends custom events.

Any suggestions or feedback for my PR?

Hi @Crazedpeanut, we aren't taking PRs against this repo right now, unfortunately. We will resume PR acceptance around mid-May. It is possible to test using your custom client and the emulator. Here are the instructions, in case this is an option for you:

  1. When the emulator starts up, you'll see something like Emulator listening on http://[::]:2032 in the log. That's the emulator's Direct Line endpoint. Make a note of this url, but replace [::] with localhost. Also, your port number will probably be different.
  2. Start a conversation with your bot in the emulator. This step is necessary so that the emulator knows which bot to talk to when your custom client starts a new conversation.
  3. Configure your custom client to talk to the emulator endpoint above.

I hope this helps!

Hi, I downloaded the latest stable version of Emulator for windows but can't see an option to send custom event.

Can I have the link to download of the version that contains send custom event capability?

Thanks,
Muhammad Masood

Any updates on this?

I have the same use case as @negativeeddy and this would significantly reduce testing effort, as I currently have to deploy the bot to test this scenario

Currently, this is still in our backlog, but we have had enough requests for this feature that I think it warrants an internal discussion about possibly implementing it.

@tonyanziano are you still after someone to look at implementing this? I wouldn't mind taking this and adding it into the v4 emulator?

I have similar case, +1 for adding this feature to the botframework emulator update.

@Crazedpeanut @brynetwork This item has been tentatively scheduled for the 4.6 release later this year. #1700

We are currently undergoing an accessibility audit which is pushing a lot of work items in the schedule back, so it may get pushed out to a later 4.6 patch or 4.7 stable release, but it is on our radar.

Closing this in favor of tracking over at #1700

Hi @Crazedpeanut, we aren't taking PRs against this repo right now, unfortunately. We will resume PR acceptance around mid-May. It is possible to test using your custom client and the emulator. Here are the instructions, in case this is an option for you:

  1. When the emulator starts up, you'll see something like Emulator listening on http://[::]:2032 in the log. That's the emulator's Direct Line endpoint. Make a note of this url, but replace [::] with localhost. Also, your port number will probably be different.
  2. Start a conversation with your bot in the emulator. This step is necessary so that the emulator knows which bot to talk to when your custom client starts a new conversation.
  3. Configure your custom client to talk to the emulator endpoint above.

I hope this helps!

@eanders-MS but how can we get the conversation ID from the emulator?

@hraz-msft you can get the conversation ID of the current conversation in the Emulator by clicking on any activity in the conversation pane or log panel.

The conversation ID will be under the conversation property in the JSON inspector.

image

Was this page helpful?
0 / 5 - 0 ratings