dialogFlow Controller Logic - abrazik/AI-Pointment GitHub Wiki
- Small talk - Interactions that do not require data from database to be written or read
- Find available appointments - User inquires about available appointment times - READ FROM DATABASE
- Schedule an available appointment - User affirms their intent to book a specific appointment - WRITE TO DATABASE
- User enters message into text box on UI
- User clicks submit button
- User message from text box is sent to server via POST request, wait for POST request response
- POST request is received on server
- Intent is read from response
- POST request response message, and response context, is formatted into JSON
- JSON response is sent to user
- POST request response is received by user
- Chat response is added to BOT side of message conversation
- User enters message into text box on UI
- User clicks submit button
- User message from text box is sent to server via POST request, wait for POST request response
- POST request is received on server
- Intent code is read from response
- Available appointments are read from database
- Available appointments, response message, and response context are formatted into JSON
- JSON sent to user from server
- POST request response is received by user
- Chat response is added to BOT side of message conversation
- User enters message into text box on UI
- User clicks submit button
- User message from text box is sent to server via POST request, wait for POST request response
- POST request is received on server
- Intent code is read from response
- Date and time variables are read from response
- Appointment is written to database
- Appointment time and date, response message, and response context are formatted into JSON
- JSON sent to user from server
- POST request response is received by user
- Chat response is added to BOT side of message conversation
const postReq = {
response: /*MESSAGE FROM GOOGLE CHATBOT AI*/,
context: /*MESSAGE CONTEXT FROM GOOGLE CHATBOT AI*/
}