Zorang – AI Products and Services

How DialogFlow Enables Chatbots For Natural Conversations

Can chatbots in your e-commerce store talk and think like humans? Yes. They can double up as virtual shop assistants who speak in a friendly, helpful manner to your customers. If your online store’s chatbot knows about your product inventory and customer’s order history, then it can effortlessly make product recommendations specific to your customer’s needs. Eventually, this creates a good customer experience over the long-term.

image.png

Our human conversations include a variety of complexities. For example, a customer with an inquiry looks for an answer through the conversation. On the contrary, a customer with a negative feedback looks for acknowledgement and resolution through conversation. ‘Context’ and ‘intuition’ are important components in Machine Learning (ML) which helps build chatbots capable of more human-like conversations. Artificial Intelligence (AI) supports deep learning for machines. As a result, chatbots are constantly learning and improving their conversational skills with each and every dialogue.

Google’s DialogFlow (formerly, API.ai (or) Speaktoit) is a highly intuitive and user-friendly Natural Language Processing (NLP) tool widely used for building AI-driven chatbots and voice assistants. Its technology is scalable and sustainable for both voice and text-based conversations across a diverse range of platforms and devices. It helps chatbots to understand and respond to conversations in a more fluid manner for more than 14 languages.

Let’s say, your online store’s chatbot is integrated with DialogFlow for better efficiency. What’s the benefit? Your customers can experience personalized care and support every single time they visit your online store. How does it work?

  • Firstly, in order to integrate DialogFlow with Salesforce Demandware/Salesforce Commerce Cloud, your product information data is pushed to the DialogFlow service end point in JSON format.
  • DialogFlow provides two service end points for both Intents and Entity.
  • Secondly, you’ve run two jobs to prepare JSON object in proper format.
  • Finally, the data is pushed to DialogFlow service end points.

Building an agent with DialogFlow is the very first step for seamless integration with Salesforce Demandware/ Salesforce Commerce Cloud. Agents are Natural Language Understanding (NLU) modules. They can be integrated into your app, website, product, or service in order to translate text or voice user requests into actionable data. All you need to do is to create intents within your agent that matches a user’s utterance.

But, what are intents?

DialogFlow has 4 major components that help an agent respond better.

  • Intents
  • Entities
  • Integrations
  • Fulfillment

The structure of a basic flow of conversation in an AI-driven chatbot involves the following steps.

  • The user given input.
  • DialogFlow agent parsing given input.
  • The agent returning response to the end user.

Intents:

How does your chatbot know what to respond for a specific query? That’s what intents do. They define how the conversations will work. Intent is the mapping between a user input and chatbot’s response. You’ll define the training phrase (input) and response (output) for each intent within an agent. As a result, an agent needs to have more than one intent for natural conversational experience.

Each Intent consists of 4 main components.

  • Intent name: The name of the Intent.
  • Training phrases: Examples of what users can say to match a particular intent.
  • Action and parameters: Define how relevant information (parameters) is extracted from user utterances. This kind of information include dates, times, names, places, and more.
  • Response: An utterance that’s displayed back to the user.

Entities:

Entities are nothing but values which are part of the user input including date, time, place, etc, In DialogFlow, there a set of pre-defined entities such as address, city, etc. as well as developer entities defined while building an agent. They help the system to identify and extract useful data from user inputs in natural language.

Entities have two components – namely, Entity type and Entity entryEntity type defines the type of information you want to extract from a user input. Entity entry is a user input value. For each entity type there are many entity entries. For example, if ‘vegetable’ is an entity type then we can define ‘carrot’, ‘green onion’ or ‘green chilli’ as an entity entry. If your customer is typing ‘green onion’ in the chatbot interface then the system will identify and extract the user data ‘green onion’ and return it as a ‘vegetable’ entity type.

Integrations:

Did you know? You can reach users from over 500 million devices once you integrate your DialogFlow agent with Actions on Google. When it comes to Salesforce Commerce Cloud, DialogFlow enables natural conversations in Salesforce e-commerce platforms; answering FAQs and sharing knowledge-based articles for customers queries.

It’s quite simple to integrate multiple chat messengers to DialogFlow. Of course, you’ll need to follow a series of steps to integrate a chat messenger to DialogFlow which is clearly described in the DialogFlow console.

Fulfillment:

If you need to integrate DilalogFlow with your own application then you can achieve it by using webhook. It’s important to first enable webhook in DialogFlow console before you follow the steps mentioned in the console.

Fulfillment is code that’s deployed as a webhook. It allows your DialogFlow agent call business logic on an intent-by-intent basis. Practically speaking, during a conversation fulfillment allows you to use the information extracted by DialogFlow’s natural language processing to either generate dynamic responses or trigger actions on your back-end. For example, fulfillment can extend the capabilities of a DialogFlow agent to place orders based on products a customer asks for.

DialogFlow integrated into your Salesforce Commerce Cloud platform helps improve the efficiency of natural conversations between your customers and your chatbot. As a result, human resources need to intervene only for handling more complex cases while running your online store. Adding to it, the DialogFlow-enabled chatbots can help reduce operational costs and resolution time to a greater extent.