RocketChat / Apps.Dialogflow

Integration between Rocket.Chat and the Dialogflow Chatbot platform
9 stars 16 forks source link

Adding pre-programmed button support in quick replies. #43

Closed PrajvalRaval closed 4 years ago

PrajvalRaval commented 4 years ago

This PR adds support for buttons that perform a specific action in the app - Handover and Close Chat. Anyone can add them by simply pasting the provided code blocks in your Quick Replies payload.

This way the dev will only have to paste a block with particular actionId set as df_perform_handover and when a visitor clicks on it, it will perform handover to Target department set in App settings. Similarly, on clicking the button with actionId = df_close_chat, it will close the Live Chat session.

Payload Example

Example-Dialogflow-Pre-Programmed-Buttons

PrajvalRaval commented 4 years ago

Requesting @renatobecker for a review. 😄

PrajvalRaval commented 4 years ago

@murtaza98 added a few changes as per your request. Please review and let me know for any changes. Thanks

PrajvalRaval commented 4 years ago

Made your requested changes @murtaza98 😄

murtaza98 commented 4 years ago

@renatobecker This PR is ready to be merged :rocket: