Webhooks from DialogFlow - abrazik/AI-Pointment GitHub Wiki
DialogFlow looks for certain parameters within users messages.
For example:
- A user enters: "I would like an appointment at 5pm tomorrow"
- Dialog flow recognizes:
time = 17:00
anddate = 8/12/21
When DialogFlow recognizes those variables it will send a POST request to the respective API endpoint on the AI-Pointment server.
When the customer wants to know which appointments are available DialogFlow will send a post request to the respective API endpoint.
Example: /api/v1/appointments/available
The AI-Pointment server must then respond to the post request with a response string listing the available appointments. That response string will then be sent to the user as a response message.
When the customer wants to book an available appointment DialogFlow will send a post request to the respective API endpoint.
Example: /api/v1/appointments/book
The AI-Pointment server must then respond to the post request with a confirmation string. That confirmation string will then be sent to the user as a response message.