question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sending and receiving events from webchat in Bot Composer

See original GitHub issue

Hi,

I am able to dispatch an event (with custom name) from webchat and capture it in bot composer using 'Event received ’ trigger as shown in below screenshot.

Eventreceived

But how can I post or send an event activity from bot composer to webchat?

🚨 The issue tracker is not for implementation questions 🚨

[Question]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
felix-gonzalezcommented, Apr 27, 2021

Hello @zuercher8353 , I’m testing it with:

[Activity type = event name = WEB_CHAT/SEND_EVENT value = welcome ]

in a “send response” body in composer and I catch it on webchat side with:

   const store = window.WebChat.createStore({}, ({ dispatch }) => next => action => {

	      console.log(" Action  " + action.type);

      if (action.type === 'DIRECT_LINE/INCOMING_ACTIVITY' && action.payload.activity.type === 'event'){
        console.log('Event received from backend :' + action.payload.activity.value);
      }
     return next(action);
   });
1reaction
madbehercommented, Aug 13, 2020

we tried using the solution you mentioned and it is working for us. Thanks for providing quick solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Capture Data from Custom Events in Bot Framework ...
Create a dialog called Custom Event. Add a send a response activity in the Begin Dialog event. Set the text to a message...
Read more >
Triggers in Bot Framework Composer | Microsoft Learn
Introduction to events and triggers in Bot Framework Composer. ... Take actions on messages received or sent.
Read more >
How can I send a custom event to the client browser using ...
1 Answer 1 · Click the "Open in Bot Framework" button on the topic list page, open the bot in composer. · To...
Read more >
Web Chat samples - Microsoft Open Source
Here you can find all hosted samples of Web Chat. The source code repository can be found on GitHub. These samples are connected...
Read more >
Building a RingCentral bot from scratch
If the bot app is a private app, the access token will be generated and sent to the bot server via an HTTP...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found