No Jitter is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Decoding Dialogflow: Fulfilling User Intents

In a recent Genesys-sponsored survey, 64% of respondents indicated that their organizations will be using AI or advanced automation by 2022 to support operational efficiency and other enterprise functions, whereas only 25% said they use AI today. My sense is that even the 25% number is a bit of a stretch, given other surveys I’ve seen. Nevertheless, use of intelligent virtual agents, or bots, for multichannel customer engagement is increasing rapidly.
AI-based virtual agents allow customers to obtain access to information or perform actions via self-service much more rapidly than through an IVR system and live agents. When done well, an intelligent bot not only can benefit customers, but also be a boon to the bot owner by enabling it to decrease customer support costs significantly.
In this article, the eighth in a series, I’ll examine how customer requests are fulfilled when using Google Dialogflow.
Fulfillment Actions Based on Intent
Intelligent bots are useful for many different purposes. The key is to match the user intent with a series of actions that gives the user what he or she wants. In an earlier article, I discussed intents and how to create them in Dialogflow. I should point out that some general-purpose bots, like Google Assistant, Amazon Alexa, and Apple Siri can fulfill thousands of intents; your organization’s bot will support a much smaller number.
Fulfillment is the process of mapping of an intent to actions that will meet the user’s need. Fulfillment is what happens after Dialogflow figures out the user’s intent. You can think of fulfillment as computer code that does three things:
  1. Connects the user’s intent to your business logic
  2. Generates dynamic, user-specific responses based on the intent and the data (called entities or slots) that accompany the intent
  3. Causes actions to occur outside of Dialogflow 
There is a flow, or sequence, to fulfilling an intent, as illustrated in the graphic below.
Intent flow within Dialogflow
Seven steps occur when a user invokes an intelligent bot:
1. First, the user types a phrase or says something by speaking into a telephone or microphone. This launches a Dialogflow session.
2. Dialogflow then uses its natural language processing capabilities to match the user’s utterance with the intents your system knows how to handle.
  • Some back and forth interaction between Dialogflow and the user may occur during this process if any entity data is associated with the intent. For example, if the user wants to check on the status of an order, Dialogflow may need to ask questions to get the user’s name and order number.

3. Once Dialogflow has obtained the intent and any entity information, it sends this information to a cloud function via a webhook request. A webhook is a mechanism for one web service to provide data and information to other web services.

  • Each intent in Dialogflow has a unique webhook function or process associated with it. Sending data to a webhook function is sort of like using a URL as an address and sending a message containing the intent and its entity values to that URL.
4. Based on the information received from Dialogflow, your webhook application can do what is needed to fulfill the user’s request. It can do a data dip into a database, access customer order status, get the weather… it all depends on your business logic and how you choose to implement it to fulfill the user’s intent.
5. When your webhook function has done its work, the function sends a response back to Dialogflow. This response may be information the user requested, confirmation of an action the user asked your system to do, and so on. In some cases, it may cause additional interactions if your business logic needs to query the user for more information, such as authentication information when doing a banking transaction.
6. Dialogflow formats the response in a way that is most advantageous to the user and the device in use, based on how you’ve designed your interface. If you recall from the Decoding Dialogflow article on what makes a good bot, Dialogflow can respond using speech, text, chips, cards, carousels, lists, tables, or media. How Dialogflow responds to the user depends on the interface capabilities of the device in use and how you’ve programmed the response.
7. Dialogflow sends the response to the user via the appropriate interface available on the device in use.
Programming Your Webhook Functions
Dialogflow provides two ways to create webhook functions for fulfilling user intents: custom webhooks and an inline function editor that is part of Dialogflow. The Dialogflow interface includes switches you can set to tell it which method you want to use to create the fulfillment function.
Inserting a function into a webhook service
When the webhook option is enabled, the developer can use any development environment to create the fulfillment webhook function. As illustrated above, the developer then needs to insert the function, instantiated by a URL, into a webhook service. The function should contain some authentication parameters so that only your bot can execute that code.
If you use the inline editor, you can create the webhook function within Dialogflow itself. This will automatically create the URL and authentication parameters. The inline webhook function editor is based on Google Firebase, which provides a NoSQL database, user authentication functionality, scalability, and usage analytics. Using the inline editor has pros and cons, but we won’t go into them here — just note that this option is available and can potentially speed up bot development.
In Summary
  • Fulfillment is at the heart of intelligent bot creation.
  • Fulfillment maps user intents to computer code that executes your business logic.
  • Your fulfillment code will provide the user with any requested information, complete a desired action, or trigger additional Dialogflow interactions.
  • You implement fulfillment functions via webhooks.
  • Dialogflow provides an optional inline editor for developing webhook functions.
What’s Next
The next article in this series will appear in late October, with a focus on how Google’s contact center partners integrate with CCAI and Dialogflow. It will contain some specific examples of several CCAI partners’ interface environments.