Plan Your Chatbot Design

Before you begin developing chatbots using Oracle Digital Assistant, you need to make some design choices. You should decide what chat services you will provide, how you will handle requests to talk to a human, and which messaging services you will support.

Define Intents

You create intents for the services that your chatbot performs on behalf of your customers. When you define an intent, you categorize typical user requests by the tasks that your chatbot performs.

Intents contain the permutations of typical user requests and statements, which are also referred to as utterances. You can create the intent by naming a compilation of utterances for a particular action. Your chatbot's cognition is derived from these intents. You should create each intent from a data set that’s robust and varied, so that your chatbot can interpret ambiguous user input. A robust set of utterances enables a chatbot to understand what the user wants.

When you define intents, do the following:

  • Plan the services that you want your digital assistant and skills chatbots to offer.
  • Group similar services into specific skill chatbots. For example, if your domain is human resources, then consider creating a payroll chatbot, a health care chatbot, and a leave chatbot. Your digital assistant can route messages to the specific chatbot.
  • Define the utterances for each intent. Create 10 to 20 phrases for each intent, using as many permutations as you can.
  • Include utterances that include commonly misspelled and misused words.
  • Define an intent to handle conversational smalltalk. Your digital assistant can route customers toward a specific request using this intent.
  • Define an intent that resolves inappropriate user input or gibberish.

Define Entities

You define entities to help add relevance to user intents and to identify objective data in a user request. For example, if your customers message is "What's my balance", you may need to determine if the request is for checking account, savings account, or credit card balance.

Entities provide objective data values to customer requests, for context. The context helps define the conversational flow. Entities can define the number of days or hours, the start date, and end date. Entities are the variables that a skill chatbot passes to a custom component to execute a customer's request.

Oracle Digital Assistant provides predefined entities, including number, currency, date, address, time, and phone number entities, and an entity to handle yes and no responses. You can apply the predefined entities to any business domain.

Entities must also be able to distinguish between different user inputs that mean the same thing, for example, yeah, yup, yep, and ok, all mean yes.

You can create entities by basing them on existing entities, by using regular expressions, or by creating a set of related entities that define a larger concept.

When you define entities, do the following:

  • Build your entities based on the business domain context in which they are used.
  • Associate each entity with a specific intent.
  • Define synonyms for your custom entities.

Create Form-Based Data Input

You can collect data by using a form when the data that is required to complete an action is complex.

Users interact with a chatbot through the exchange of messages. Some conversations can become long, especially when your customer must provide complex data. To keep chatbot conversations short, you can use the built-in Webview component to handle long and complex data entries. The Webview component allows you to build your own web forms using tools such as Oracle Visual Builder or Oracle JET. During the conversation flow, skill chatbots can navigate to a form where users enter data. This option shortens the overall chatbot conversation, and can allow users to correct previously provided information.

When you build a Webview component, do the following:

  • Provide hints in the form about the format of the required data.
  • Perform data evaluation immediately and provide help to correct errors.
  • Clearly identify how the customer must submit the form.

Determine When to Hand Off to a Person

When your chatbot can't handle a customer's request, Oracle Digital Assistant enables seamless handover to a human agent, such as a customer support rep (CSR) operating using Oracle Service Cloud.

The agent integration framework in Oracle Digital Assistant provides the complete chatbot history to the human agent so that no data loss occurs. The human agent can use this context to trigger the appropriate action on the customer's behalf, or the agent can talk with the customer through the chatbot to request more information. This interaction happens entirely on the same channel and within the same user session.

Your customer can request a handoff, or your chatbot can recommend a handoff as part of a dialog flow. Interaction with the human agent ends either when the agent executes a command in the session flow or when the chatbot ends the session by using closing words, such as bye or goodbye.

Integrate with Services Through Components

To act on intents, you must integrate your chatbot with back-end services through custom components.

Components are the reusable units of work that perform tasks and functions on behalf of your chatbot. Components can be built-in components or custom components. The type of component that you use depends on the action that you need your chatbot to perform.

  • Built-in components: These predefined components support actions that you can use in any chatbot, such as OAuth 2.0 security, parsing the user input, routing the dialog flow based on user input, and displaying the chatbot’s responses.
  • Custom components: These components are JavaScript applications that you create and deploy either to the Oracle Digital Assistant embedded container or to another Node.js server, including Oracle Application Container Cloud Service. Your chatbot accesses custom components through REST calls after registering the custom component with the custom component service. Custom components are often used to initiate a service on a back end system (for example, perform a booking). Data returned to the custom component can be added to the chatbot's response.

Select Channels for Your Chatbot

You can specify where your customers will access your chatbot by selecting one or more channels.

Channels carry the conversation between your customers on messaging services and your digital assistants and skill chatbots. Channels can connect to a digital assistant or to an individual skill chatbot.

When a channel connects a messaging service to a digital assistant, the digital assistant routes messages to a skill chatbot. The communication between the skill chatbot and the channel pass through the digital assistant.

Oracle Digital Assistant supports the following types of channels:
  • User channels: Including Facebook Messenger, text-only channels (for example, Twilio and WeChat), client-messaging applications, web pages, and webhooks.
  • Agent integration channels: Used with live agent applications, including Oracle Service Cloud to connect a chatbot with a human agent.
  • Application channels: Used by an external application to send notifications to a skill chatbot so that the chatbot can trigger a conversation.
  • System channels: Used by developers to test skill chatbots.