Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(messaging): support receiving proactive messages #5728

Merged
merged 6 commits into from
Dec 3, 2021

Conversation

samuelmasse
Copy link
Contributor

@samuelmasse samuelmasse commented Dec 1, 2021

Implement support for event added in botpress/messaging#266. When a converstation is started with a user, messaging emits a conversation.started event that botpress that botpress listens on. We send a event of type proactive-trigger to the event engine that can then be used in a hook to send a proactive message. This now works with any channel.

Screenshot from 2021-12-01 14-25-17

Based on this documentation https://botpress.com/docs/tutorials/proactive

It would be possible to also add a conversation.visit event to messaging, to get the same type of event that the webchat has with the user visit. This migth not be supported by a lot of channel though.

Closes DEV-2071
Closes DEV-1623

@linear
Copy link

linear bot commented Dec 1, 2021

DEV-2071 When the runtime receives a conversation.started event it creates a synthetics event that can be used in a hook to send a proactive message

DEV-1623 Content of proactive messages should not be handled by messaging

We should send a requests to our webhooks instead to inform them that a conversation has started and let them decide what message to send to the user

@samuelmasse samuelmasse marked this pull request as ready for review December 1, 2021 19:07
@samuelmasse samuelmasse merged commit 57c20f3 into master Dec 3, 2021
@samuelmasse samuelmasse deleted the sm-proactive-message branch December 3, 2021 18:11
@EFF EFF mentioned this pull request Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants