article by Frank Nimphius, July 2019
Chatbot use-cases like incident and expense reporting require bot users to be able to upload images and documents through the messenger client and the bot to a remote server. So when the conversation pauses for the user to provide input, then the following could happen
- The user enters free text
- The user taps a list item or button, if the input allows it
- The user uploads a document or image
Oracle Digital Assistant supports uploading images and documents through the System.Text, System.List, and System.CommonResponse components. This article explains how to implement the uploading of images and documents from end to end.
Using the custom component provided for this article, a well as the sample Oracle Digital Assistant skill, you can start a conversation just by typing 'hi'. When prompted, use the messenger's upload functionality to upload a document or image.
After sending the image URL to the bot, the custom component downloads the binaries from the messenger channel and uploads them to the configured target server or service. As a response, the sample skill provided with this article prints the download URL it obtained from the messenger channel.
Image attribution: pixabay.com
Related Content
TechExchange Quick-Tip: Customizing the Oracle Bots Node.js SDK Component Template