How To Gracefully Handle Unwanted Attachments In A Bot Conversation Without Interrupting The Conversation by Frank Nimphius

image

Most if not all messengers support attachments for users to share documents with a chatbot.

Unfortunately, chatbots don’t control the messenger and therefore users could send attachments to a point in time where the bot does not expect an attachment to be sent. While you cannot prevent users from sending attachments, you can handle the gracefully. This article explains how you can suppress attachments in Oracle Digital Assistant skills.

How attachments are sent

Attachments are sent as JSON objects that contain information about the type of attachment and the URL from which the bot can download the document.

Problem statement

When a conversation state is waiting for user input and that user input is not validated against an entity but is stored in a string variable, users who upload attachments without being prompted for an attachment actually risk to interrupt the conversation flow. To avoid this in Oracle Digital Assistant, you can use a default transition handler in a skill that detects an attachment to be received and then prints a user message before proceeding with the current state of the conversation.

Example

The sample skill that you can download at the end of this article has two conversation states defined where users a prompted for input. In both cases, the user input is not validated against entity type variables and therefore happily accept an attachment being uploaded. Read the complete article here.

Developer Partner Community

For regular information become a member in the Developer Partner Community please register here.

clip_image003 Blog clip_image005 Twitter clip_image004 LinkedIn image[7][2][2][2] Facebook image Meetups

Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.