botpress / v12

Botpress OSS – v12
https://v12.botpress.com
GNU Affero General Public License v3.0
76 stars 88 forks source link

[FEATURE] Thumbs Down Hooking #1265

Open hacheybj opened 3 years ago

hacheybj commented 3 years ago

Is your feature request related to a problem? Please describe. I would like to trigger certain flows when users provide negative or positive feedback

Describe the solution you'd like To be able to register a hook or action to the event somehow

Describe alternatives you've considered Thumbs up/down to be a different event type rather than an API route call

Additional context

petitroto commented 3 years ago

+1 This is exactly what I need right now.

davidvitora commented 3 years ago

@EFF @allardy we could archive this by adding a method in the store that adds a callback to the 'sendFeedback' function, later it could be used alongside botpress/botpress#4777 to add a callback that uses WebchatApi (available at the store object) to send a custom event, this would be more reusable. Another alternative is to add a call to WebchatApi direct in the code as well.