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.
But how can I post or send an event activity from bot composer to webchat?
馃毃 The issue tracker is not for implementation questions 馃毃
[Question]
@madbeher - Have you tried using Send a response with an activity structured response template with "event" as the type property?
we tried using the solution you mentioned and it is working for us. Thanks for providing quick solution.
@madbeher - You're welcome, glad to hear it
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.
But how can I post or send an event activity from bot composer to webchat?
馃毃 The issue tracker is not for implementation questions 馃毃
[Question]
Hi, can you help me with one question,
does this 'event recived' is like the proactive message? if not do you know how to create proactive alerts with the Composer?
@madbeher Would you be willing to give some insights off how you achieved to send an event activity from bot composer to webchat? If possible could you share to send the response message you created and the code you used to catch the event in the webchat?
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);
});