Embedding and Customizing Oracle Chatbots in APEX
By Derek Renny, Senior Developer
Chatbots Are The Next Big Thing
Carry out a quick survey of the emerging technology trends being discussed on the web right now and you will no doubt see innumerable references to digital assistants or chatbots.
Gartner predicts that by the end of 2020 25% of customer service and support operations will integrate chatbot technology, an increase from just 2% in 2017.
Those that have already embraced the technology have seen significant benefits. Organizations report an increase in customer satisfaction, a reduction of up to 70% in manual phone and email interactions and cost savings of around a third per interaction.
Customer facing assistants are just one aspect of the story though. Chatbots are being successfully employed for all manner of B2B and back office business processes such as streamlining product inventory checks, submitting expense claims, booking business travel, sales lead generation, employee onboarding, holiday requests, the list goes on!
So, What Is A Chatbot?
A digital assistant or chatbot is a program that automates a conversation with the person engaging with it. They combine natural language processing with artificial intelligence to allow the assistant to continually learn and improve the user experience. The aim is to provide a personal, conversational interaction that is more efficient than traditional methods and closer to the real-world interactions that people are used to conducting.
The Oracle Digital Assistant Platform
One of the great things about working for an innovative company like Inoapps is that we frequently get the opportunity to work with and assess emerging technologies. Being an Oracle partner this entails reviewing the latest product offerings from Oracle, so we were excited to get an opportunity to start developing digital assistants using the Oracle Digital Assistant (ODA) platform.
We were instantly impressed with how easy it was to produce digital assistants using ODA and how Oracle have created a scalable, enterprise level solution with a host of powerful features.
Integrating Oracle Digital Assistant
ODA supports the ability to easily integrate digital assistants in multiple channels (i.e. how a digital assistant is presented to its users). These channels include voice integrations such as Alexa and Siri, Facebook Messenger, Slack and Microsoft Teams. There are software development kits (SDKs) that allow integration with Android and iOS mobile applications.
To integrate a digital assistant in a web site, ODA offers the Oracle Web SDK. We explored this channel in particular to establish how we might integrate an assistant in to the many web applications we’ve built at Inoapps over the years using APEX (the low-code web development framework that comes free with the Oracle database).
How Easy Is It To Integrate Oracle Digital Assistant With APEX?
The simple answer is... very easy indeed! The Oracle Web SDK provides a widget that allows an instance of Oracle Digital Assistant to be embedded in any web page.
To embed a digital assistant in an APEX application is a straightforward process that took us just a few minutes. The ODA documentation provides details of how to download the SDK.
Once we had the SDK it was just a matter of adding the relevant file from this to our APEX application as a static workspace file then copying and pasting the documented script code to the HTML Header of our web page. There are a few tags in the code that then need replaced with the relevant values for your assistant and that is pretty much it.
When you run the web page in your browser, the chat icon appears in the bottom right of the screen. Clicking this opens the chat window with the default look and behavior. You can then start chatting to your digital assistant.
Image 1. The Oracle Digital Assistant embedded in an APEX page with the default settings.
The ODA documentation includes instructions of how you can then alter the default look and behavior of the chat window. There are a host of settings that allow you to alter the layout, buttons, icons, colors, position, features, etc. This can be all done by amending the embedded code we previously added to the HTML Header of our web page.
However, rather than continually amend the embedded code we decided to have a look at how these settings could be managed more easily with a set of simple to use web pages created using APEX.
Customizing Digital Assistants In APEX Applications
Creating an APEX admin application to manage the look and behavior of the digital assistant delivers the following benefits:
- Removes the need for code changes each time the digital assistant settings are altered.
- Allows application users to alter settings without requiring a system change.
- Changes automatically generate new settings and immediately update the assistant, allowing multiple, efficient edits during project design and development.
- Allows settings to be easily generated and propagated to multiple locations, e.g. different environments, different customer branding sites, etc. As such APEX can be used as an administration tool to manage settings for multiple assistants.
We created a couple of database tables to hold the objects and key value pairs required by the settings and a database function to extract the data from these tables. The function then calls the APEX_JSON API to generate the settings output in the required JSON format.
In APEX we created web pages that allow the table data to be easily administered and then amended the embedded code in our digital assistant web page so the settings variable was set to the result of our database function.
This was a simple set of changes and in very little time we had a fully functioning administration application to manage our digital assistant. This means in a few button clicks we can now alter the default look and feel of our assistant or generate settings to be used with any assistant. See the screenshots below for a look at how it works in practice...
Image 2. Our web page showing how we administer the data for the digital assistant settings.
Image 3. The manage settings page, showing the “chatTitle” value being set to “Inoapps Digital Assistant”.
Image 4. The embedded Oracle Digital Assistant instantly reflects the latest settings including our updated chat title.
As demonstrated, Oracle have provided a simple method to embed the Oracle Digital Assistant in any web page. Implementing this in an APEX application is straightforward and by adding some additional database objects and components we found it easy to create a user interface that allows us to administer the look and behavior of the digital assistant.
If you need more details of how chatbots and digital assistants can help your organization, contact the team at email@example.com.