Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.33 KB

README.md

File metadata and controls

35 lines (24 loc) · 1.33 KB

DialogFlow Webhook Handler Examples

A Flask application containing two endpoints utilizing recommended approach to clickable list of deals, and show deal details.

The intention is to illustrate the json format required for 'standard' webhook response to initiate successful 'fulfillment' in DialogFlow.

To run Flask application:

python -m venv .venv #optional?
source .venv/bin/activate #optional?
pip install -r requirements.txt
flask --app main run --port 3000 --debug

Endpoints

/list_deals: Returns a formatted 'standard' DF CX response, with richContent formatted selectable list. Relevant links:

/show_deal: Returns a formatted 'standard' DF CX response, with RichContent formatted info component

Embed Example + click handler

See embed.html

DialogFlow CX does not support passing parameters, or data when triggering an Event from client. To address, we add a listener script, and set deal_id session parameter before submitting custom event.