This knowledge base has been replaced with https://help.sangoma.com/.
To ensure continued access to our resources, update your bookmarks or links to https://help.sangoma.com/.



Sangoma CX Technical Guide: Google Dialogflow and Sangoma CX Google Dialogflow Connector

Edited: 11/28/2023
Access: Everyone
Supports: Business Voice, Business Voice+

Index

Introduction

What is Google Dialogflow?

Versions of Google Dialogflow

Dialogflow ES (Edition Standard)

Dialogflow CX (Edition Customer Experience)

Capabilities of Google Dialogflow

Samples and Use Cases

Sangoma CX and Google Dialoflow

Configuring Agent Virtual Assistants in Sangoma CX

Prerequisites

Configuration Steps

Where to find the DialogFlow Agent ID

In Dialogflow ES

In Dialogflow CX

Assigning a Service Chatbot to a Sangoma CX inbox

Prerequisites

Configuration Steps

Adding the Handoff and Resolve Intents.

Steps for Adding the Resolve Intent

Steps for Adding the Handoff Intent

How to get the DialogFlow Project ID and Project Key File

Steps to get the DialogFlow Project ID

Steps to generate and get the Project Key File

Appendix A: How to Create FAQ Chatbot and Import a Pre-built Chatbot using Dialogflow

Creating a FAQ Chatbot

Importing a Prebuilt Chatbot

Introduction

Google Dialogflow, is a powerful and versatile conversational AI platform that has rapidly emerged as a leading tool for building chatbots, virtual assistants, and natural language processing applications. Dialogflow has become a go-to choice for developers and businesses seeking to create interactive and intelligent conversational interfaces.

This document aims to provide an overview of Google Dialogflow, including an exploration of its various versions, the capabilities they offer, use cases and how Sangoma CX integrates with it.

What is Google Dialogflow?

Google Dialogflow is a cloud-based, natural language understanding platform that empowers organizations to design, build, and deploy conversational interfaces and chatbots. Developed by Google, Dialogflow combines cutting-edge machine learning techniques and extensive language support to enable the creation of natural, human-like interactions between users and computer systems.

Versions of Google Dialogflow

Dialogflow offers two versions to best fulfill the needs of developers and businesses:

Dialogflow ES (Edition Standard)

Provides fundamental capabilities for building chatbots and virtual agents. It includes text and speech-based conversation support and offers integration with a range of popular platforms and services. It does not provide a workflow, so it is ideal for less advanced or less complex chatbot or virtual assistants. The cost of the service per message is lower when using this edition.

Missing image link-1

Dialogflow CX (Edition Customer Experience)

It has the same core concepts as Dialoflow ES, but includes advanced tools and a workflow designer that permits the creation of complex conversational bots and workflows. It focuses on optimizing the user experience and enables more intricate conversation design, making it well-suited for large enterprises and customer service applications.

Missing image link-2

Capabilities of Google Dialogflow

Google Dialogflow offers a range of capabilities, including:

  • Natural Language Understanding: Dialogflow can understand and process natural language input, making it adept at handling a wide variety of user queries.
  • Multi-language Support: It supports multiple languages, allowing developers to create global and multilingual chatbots and virtual agents.
  • Integrations: Dialogflow can seamlessly integrate with popular messaging platforms and third-party systems by invoking APIs.
  • Customization: Developers can train Dialogflow to understand specific terminology and phrases relevant to their applications.
  • Rich Responses: It supports the generation of rich, dynamic responses with images, cards, carousels, and quick replies.
  • Context Management: Dialogflow keeps track of conversation context, making it easier to build complex, context-aware interactions.
  • Generative AI: Dialogflow allows defining Generators, which allows set generative AI models to create dynamic responses or text that can be used during fulfillment.

Samples and Use Cases

Dialogflow can be applied to a wide range of use cases, including:

  • Customer Support Chatbots: Dialogflow can be used to create intelligent chatbots that assist customers with common queries, troubleshooting, and FAQs.
  • Virtual Assistants: It is an excellent tool for building virtual assistants that help users with tasks like setting reminders, checking status of a request, or providing information.
  • E-commerce and Retail: Dialogflow can power conversational shopping experiences, helping users find products, make purchases, and track orders.
  • Healthcare: It can be used for appointment scheduling, symptom checking, and general health information retrieval.
  • Education: Dialogflow can serve as an educational assistant, providing information and answering questions on various topics.

Sangoma CX and Google Dialoflow

The Sagoma CX Premium tier has built-in connectors that allow embedding or interconnecting with Virtual Agent Assistants or Chabtbots created in Google Dialogflow SE or CX. The connectors are designed to serve two use cases:

  • Agent Virtual Assistants: embeds a Dialogflow Messenger in the Agent Panel interface assisting Contact Center Agents by answering questions or automating specific tasks. The knowledge or tasks the Agent Virtual Assistants can handle, is only limited to the Dialogflow Chatbot created by customers or third parties involved in its development.

Missing image link-3

  • Service Chatbots: all textual-based channels supported in Sangoma CX can invoke a Dialogflow Chatbot. It is possible to specify which Dialogflow Chatbot integrates with each inbox providing the flexibility of using one Dialogflow Chatbot for all Inboxes or using a specific Dialogflow Chatbot per inbox. It is important to mention that:
  • Although the communication between the customer and the Dialogflow chatbot is done through Sangoma CX, the conversation only shows in Sangoma CX monitors and reports when the interaction is queued in an inbox triggered by the Handoff intent.
  • Sagoma CX also allows Google Dialogflow to provide information back in relation to the conversation status:
  • Conversation terminated by Chatbot: In this case, Sangoma CX resolves the conversation as terminated with the customer.
  • Conversation needs a human Agent: in this case, Sangoma CX reassigns the conversation to an available Sangoma CX Agent providing the transcript of the conversation to the assigned Agent between the customer and the Chatbot.

Missing image link-4

Configuring Agent Virtual Assistants in Sangoma CX

Sangoma CX allows enabling a Virtual Assistant created in Google Dialogflow, making it accessible to all the Agents through the Sangoma CX Agent Panel interface.

Prerequisites

The prerequisites are:

  • This capability is only available with a Sangoma CX Premium Tier. Please note that Google DialogFlow services are not included with this tier or provided by Sangoma.
  • A Google DialogFlow Chatbot created and trained to assist the Agents. If you do not have experience creating a Chatbot in Google Dialogflow, we included information in Appendix A that explains how to create an FAQ Chatbot using the Knowledge Base feature available in Google Dialogflow SE.

Configuration Steps

To configure the Virtual Agent assistant:

  1. Log in the Sangoma CX tenant as administrator
  1. Click System at the top of the page then Configuration in the left side menu.
  1. In the Configuration menu, click on “Agent Virtual Assistant”, the following screen is displayed.

Missing image link-5

  1. Click in the Agent Assistance Type fieldcombo and select “Dialogflow”.Missing image link-6
  1. Fill out the following fields:
  1. Title: provide the title that will show up on the Dialogflow Messenger embedded in the Agent Panel.
  1. DialogFlow Agent ID: this information is provided by Dialogflow. The section Where to find the DialogFlow Agent ID, details its location when using Dialogflow SE and CX.
  1. Intent: will initiate the Virtual Agent Assistant invoking a specific Intent.
  1. Language Code: Dialogflow allows creating chatbots that support multiple languages if the Chbatbot is configured to support them. Use en-us for English US.
  1. Save the configuration. Once saved, all Agents logging into the Agent Panel will see the Virtual Assistant icon.Missing image link-7

Where to find the DialogFlow Agent ID

To get the DialogFlow Agent ID follow these steps.

In Dialogflow ES
  1. Login in Dialogflow ES.
  1. Select the Dialoflow Agent.
  1. Click on “Integrations” and then click in the “Dialogflow Messenger” tile. Missing image link-8
  1. Click on the “Enable” button if it has not been clicked before, and you will see the following screen.Missing image link-9
  1. DialogFlow Agent ID is the string within quotes in the line that starts with agent-id=.
In Dialogflow CX
  1. Login in Dialogflow ES.
  1. Select the Dialoflow Agent.
  1. The Dialogflow Agent ID is located in the URL after /agents/

Missing image link-10

Assigning a Service Chatbot to a Sangoma CX inbox

Sangoma CX interconnects any inbox with Google Dialogflow chatbots, automating fully or partially the interaction with customers. This section explains how to configure this integration in Sangoma CX and the specific configuration and information required from these chatbots.

Prerequisites

The prerequisites are:

  • This capability is only available on Sangoma CX Premium Tier. Please note that Google DialogFlow services are not included with this tier or provided by Sangoma.
  • You need to have a Digital Channel inbox configured in Sangoma CX.
  • A Google DialogFlow Chatbot created and trained to serve customers reaching Sangoma CX platform, using any supported textual channel, such as: Webchat, WhatsApp and Telegram. If you do not have experience creating a Chatbot in Google Dialogflow, we included in Appendix A the steps on how to create a service Chatbot importing a pre-built Agent in Google Dialogflow SE.
  • The Google DialogFlow Chatbot requires having two intents that will indicate to Sangoma CX if the conversation has to be terminated because it is finalized in the Dialogflow Chatbot or if the conversation needs to be captured and routed to a Sangoma CX Agent because the chatbot is not resolving successfully the inquiry with the customer. The section Adding the Handoff and Resolve Intents explains how to configure them.

Configuration Steps

To configure the Virtual Agent assistant

  1. Log in the Sangoma CX tenant as administrator
  1. Click System at the top of the page then Configuration in the left side menu.
  1. In the Configuration menu, click on “Dialogflow”, the following screen is displayed

Missing image link-11

  1. Click the button “CREATE DIALOGFLOW BOT

Missing image link-12

  1. Fill out the following fields:
  1. Inbox: select the Digital Chanel inbox you want to integrate with the Chatbot.
  1. DialogFlow Project ID: this information is provided by Dialogflow and Google Cloud Services. The Section How to get the DialogFlow Project ID and Project Key File details how you will be able to get this information.
  1. DialogFlow Project Key File: this information is provided by Google Cloud Services. The Section How to get the DialogFlow Project ID and Project Key File details how to generate the Project Key File and get this information.
  1. Save the configuration. Once saved the selected inbox will route conversations to the integrated Dialogflow Chatbot. Please make sure the “Handoff” and “Resolve” intents are configured in the Chatbot as indicated in section Adding the Handoff and Resolve Intents.

Adding the Handoff and Resolve Intents.

In order to ensure Sangoma CX is on Sync with the Google Dialogflow Chatbot assigned to an inbox, it requires having two intents:

  • Resolve Intent: this is the intent that informs Sangoma CX the conversation was finalized in the Chatbot and needs to be terminated also in Sangoma CX.
  • Handoff Intent: this is the intent that informs Sangoma CX the conversation needs to be assigned to a Sangoma CX Agent.
Steps for Adding the Resolve Intent

Missing image link-13

  1. Login in Dialoflow SE, select the Dialogflow Agent to add the Intent and click on the + symbol next to “Intents”, to create a new intent.
  1. Type “Resolve Intent” as the intent name.
  1. Add the words or phrases that will trigger this event, for example: “Bye”, “Close”, and any other word or phrase that the customer may type to terminate the conversation.
  1. Add a response as “Payload” with the following content.

{

“action”: “resolve”

}

  1. Enable “Set this intent as end of conversation”.
  1. Click the “Save” button.
Steps for Adding the Handoff Intent

Missing image link-14

  1. Login in Dialoflow SE, select the Dialogflow Agent to add the Intent and click on the + symbol next to “Intents” to create a new intent.
  1. Type “Handoff Intent” as the intent name.
  1. Add the words or phrases that will trigger this event, for example: “Talk to an agent”, “Speak with an agent”, and any other word or phrase that the customer may type when trying to reach a human to handle his / her request.
  1. Add a response as “Payload” with the following content.

{

“action”: “handoff”

}

  1. Enable “Set this intent as end of conversation”.
  1. Click the “Save” button.

How to get the DialogFlow Project ID and Project Key File

Steps to get the DialogFlow Project ID
  1. Login in Dialogflow ES.
  1. Select the Dialoflow Agent.
  1. Click on gear next to the Agent name. The project name is visible on the right side of the screen.

Missing image link-15

Steps to generate and get the Project Key File
  1. On the previous screen click the Project ID. This opens a new Browser tab accessing the Google Cloud Platform console. Click the menu IAM & Admin > Service Accounts.

Missing image link-16

  1. Click “+ CREATE SERVICE ACCOUNT”.

Missing image link-17

  1. Fill out the: Service account name, Service Account ID, and Service account description. Click the “CREATE AND CONTINUE” button.

Missing image link-18

  1. In the combo role select “Dialogflow API Client”. Click the “CONTINUE” button.

Missing image link-19

  1. Click the “DONE” button.

Missing image link-20

  1. The service account we just created will be displayed, click on it.

Missing image link-21

  1. Click on “KEYS”.

Missing image link-22

  1. Click on “ADD KEY” and select “Create new Key”.

Missing image link-23

  1. A modal Window will be displayed. Make sure the key type selected is JSON and click on “CREATE''. A file will download.

Missing image link-24

  1. Click on “CLOSE”.

Missing image link-25

  1. Open the downloaded file with a text editor. Copy all the text inside that file. That content must be copied in the field “Dialogflow Project Key File” in the “CREATE DIALOGFLOW BOT” configuration screen in Sangoma CX.

Missing image link-26

 

Appendix A: How to Create FAQ Chatbot and Import a Pre-built Chatbot using Dialogflow

This appendix must be considered a short guide that allows you to experiment with DialogFlow to create:

  • FAQ chatbots that can be used as Virtual Agent Assistants.
  • Sample service chatbots that resemble a specific vertical.

By no means this appendix is suggesting the information provided will allow mastering Google Dialogflow or is enough to create a production ready chatbot. Make sure you get proper training on this subject and extend your knowledge on Google Dialog Flow and Google Cloud Services by reviewing the extensive set of resources available on the Internet.

Creating a FAQ Chatbot

The easiest way to create an FAQ Chatbot is by using the Knowledge Base capabilities in Google Dialogflow ES and feed it with a FAQ file in CSV format done in Excel or Google Sheets that contains the list of Questions and Answers.

The following YouTube video details the few steps that are required to create this chatbot that can be used as Agent Virtual Assistant to resolve Agents questions: https://www.youtube.com/watch?v=5-UbL6xg-8U

Please note:

  • The Chatbot is not generative and it only has a relation between Questions and Answers.
  • The NLU engine decides if the question typed is similar to a question loaded in the FAQ. If the NLU engine considers the match it is statistically relevant, provides the Answer stored in the FAQ.
  • The Chabot can be improved by fine tuning it in Dialogflow or by using more advanced capabilities available in this Google Service.

Importing a Prebuilt Chatbot

Google Dialogflow has a set of prebuilt agents that can be later, adapted to your needs. The benefit of using Pre-build Agents is that it allows you to experience and experiment with a real Chatbot in very little time and without having too much knowledge in the tool. It is a great option that enables you to jump into this subject and start learning this fascinating tool and technology using the extensive set of resources available on the Internet.

To create a Chatbot by importing a prebuilt agent, follow these steps

  1. Login in Dialogflow CX and Click on “Prebuilt Agents”.

Missing image link-27

  1. Browse through the extensive list of prebuilt agents.
  1. Click the “Import” button inside the tile with the prebuilt agent you want to import.

Missing image link-28

  1. Give it a unique name to the agent, select “Create a new Google project” in the combo and click the “CREATE AGENT FROM TEMPLATE” button.

Missing image link-29

  1. The import process will start. This can take several minutes.

Missing image link-30

  1. Once finished click the “GO TO AGENT” button.

Missing image link-31

  1. If the gear is spinning, wait until it finishes. This means Dialogflow is still processing the intents and will give you an error message if you try to use it.

Missing image link-32

  1. Now you can use the option of “try it now” that will provide details of the triggered intent, contexts, action, parameters, sentiment and diagnostic information.

Missing image link-33

  1. You can also interact with the Chatbot using a messaging interface to test the responses, click on Integrations > Dialogflow Messenger > ENABLE.

Missing image link-34

  1. Then click on “TRY IT NOW” and a Dialogflow Messenger widget will appear allowing you to interact with the Chatbot.

Missing image link-35

 

up
60 users have voted.

Technical Support

If you have any technical questions or need to get in touch with Tech Support, please email us at service@sangoma.com to open a ticket.

Customers With Disabilities

Sangoma values its customers with disabilities. If you are in need of assistance with a Sangoma service or feature, please email service@sangoma.com.

Website Suggestion

Do you have a suggestion about our Knowledge Base website, let us know?