Add a chatbot to your APEX app using DialogFlow
- Get link
- X
- Other Apps
This post will show you how you can add a free chatbot to your APEX app using the always free Oracle Autonomous database and Google’s natural language processing (NLP) Dialogflow ES.
This Oracle APEX NSS web site allows users to ask the chatbot for the percentage of students who overall, were satisfied with the quality of the courses at the University of Glasgow. It allows users to query over 1,200 courses. Give it a try by clicking NSS→Russell Group NSS Course Search
Here is some info about how DialogFlow works on another project I built.
How I built it.
Loaded data into autonomous database
I loaded the National Student Survey CSV data into autonomous database using database actions data load;
Created a REST API for the data
Using the REST action above I created a REST API for the data, it takes a course and aim and retrieves it from the Database
Try it out;
https://kjwvivmv0n5reuj-apexkqor.adb.uk-london-1.oraclecloudapps.com/ords/admin/nss/q27/Mathematics/BSc
This returns the following JSON which has selected the question Q27 overall percentage satisfied with Mathematics BSC course. It also returns the course ID and overall rank for UK universities for that course
"items":[{"q27":77,"kiscourseid":"G100-2208","rank":11}]
Create the chatbot
I used DialogFlow ES to create the chatbot.
Call the REST API from DialogFlow
In webhook fulfilment, I added this function that takes a course and aim and calls the REST API. As it is calling a REST API, I used a promise to make the call and return the result to DialogFlow;
The DialogFlow aim intent calls the webhook, which passes in the course and aim;
To get the chatbot HTML to add to your APEX app, select DialogFlow Messenger in Integrations;
this created the code to add to our APEX page;
we now have the chatbot on our APEX app;
- Get link
- X
- Other Apps
Comments
Post a Comment