We started our little adventure in the conversational A.I world about one month ago doing a simple PoC for one of our clients.
What we were basically trying to achieve was to get just answers on simple questions about price and stock information from an OpenEdge backend by shouting to a small and inoffensive Amazon Echo Dot device.
For that the easiest way to do it was by using Amazon Lambda with a node.js SDK to consume the RESTFul services exposed by the OpenEdge backend.
Amazon has it’s own conversation builder that helps building ‘skills’ for Alexa assistant where you basically need to define ‘intents’ that based on what the user say will trigger actions, optionally passing on recognised values as parameters on those actions.
Implementing action handlers directly on the OpenEdge webhandlers should be possible as well since it’s all a JSON based conversation format that need to be used, however, for the scope of the PoC we’ve used the node.js SDK available and implement the handlers in a Lambda Function that depending on the intent name calls the corresponding RESTful API passing along the user input, the response received back from the backend is formatted so that the assistant understand it and finally the user will hear the nice lady reading out the information.
After a short period of excitement our geek web developer decided it’s time to look elsewhere and then Google Home entered the stage.
Same as with Amazon, Google has it’s own conversation builder – well, they just took the fast lane and bought one – Dialogflow formerly known as api.ai.
The easiest way to go is probably to use the equivalent of Amazon Lambda functions, Google Cloud Functions which are basically a serverless microservice platform. Again the function is to be written in node.js, the only caveat there is making HTTP request on non HTTPS endpoints is not possible on the free plan.
This can be implemented with just an OpenEdge backend, the conversation language is of course different but with JSON support available on newer versions that shouldn’t be too hard to do.
Since Dialogflow has multiple integration options – including import/export from Alexa, Skype and Facebook chatbot, we’ve also made a simple app that can return the details of an OpenEdge error message when the user provides an error number.
The error description is retrieved by the OpenEdge backend using this sample code, try it out by engaging with @akera.io on Facebook messenger (hopefully soon to be available on Google assistant, still under review).