Google Dialogflow quick start guide


Prerequisite
  • This feature requires Edge and Media Tier version 1.0.0.8734 or later on premises Edge appliances. The cloud-based media services for Genesys Cloud Voice and BYOC Cloud are already running the necessary versions.

Google and Genesys developed a partnership to help organizations deliver advanced capabilities to enhance customer experiences, blending AI and Google voice interaction technologies with Genesys call center automation.

Google Dialogflow bots use Google machine learning. This machine learning implements natural language understanding (NLU) to recognize a user’s intent and then extracts entities such as time, date, and numbers. With the evolving functionality of artificial intelligence tools, conversational interactions with computers are now mainstream. Contact centers are a natural progression into this world of virtual assistants.

Organizations can stream audio in real time from Genesys Cloud to Google Dialogflow and return intents and slots to Genesys Cloud. The self-service fulfillment of intent can be handled on the Google side or in Architect flows. When required, customers gracefully escalate to an appropriate agent.

Click the image to enlarge.

Quick start steps

This quick start guide helps guide you through implementing the Google Dialogflow integration. Here, you learn how to perform the following steps:

  • Create the Google Dialogflow platform service account credential.
  • Obtain the Google Dialogflow integration from Genesys AppFoundry.
  • Create and configure Genesys Cloud OAuth client credentials.
  • Configure the Google Dialogflow platform service account credential.
  • Configure the Genesys Cloud OAuth credentials and then active Google Dialogflow and activate the integration.
  • Set up a Genesys Cloud Architect flow and then associate the Google Dialogflow bot with the Architect flow.
  • Route a Genesys Cloud phone number to the Architect flow.
Note: Before you can obtain the Google Dialogflow premium application, you must contact Genesys Cloud Sales to update your subscription. For more information about these applications, see What are premium applications? and About premium applications

Step 1: Create the Google Dialogflow platform service account credential

This section describes how to create a Google Dialogflow platform service account credential in the Google Cloud Platform console.

Prerequisites

To create the Google Dialogflow platform service account credential, perform the following steps:

  1. In the Google Cloud Platform console, create a new project and then create a service account for the project. 
  2. Grant the following roles to the service account:
    • Dialogflow API Client
    • Dialogflow API Reader
  3. Create a service account key and download the JSON version of it.  



Step 2: Obtain Google Dialogflow from the Genesys AppFoundry

This section describes how to access and install the Google Dialogflow integration from the Genesys AppFoundry. Before you can obtain the Google Dialogflow premium application, you must contact Genesys Cloud Sales to update your subscription. For more information about these applications, see What are premium applications? and About premium applications


To install Google Dialogflow in your org, perform the following steps:

  1. Log in to Genesys Cloud for the org in which you want to add Google Dialogflow:
    1. Select the appropriate organization.
    2. Enter your email address and password.
    3. Click Log in.
  2. Click Admin.
  3. Under Integrations, click Integrations.
  4. Click Integrations .
  5. In the Search box, type Google Dialogflow. The card for Google Dialogflow appears.
  6. Click the Google Dialogflow card. Information about the app appears.
  7. Click Install.

Google Dialogflow is now available to configure and activate from Genesys Cloud’s Admin > Integrations > Integrations page



Step 3: Create and configure Genesys Cloud OAuth client credentials 

This section describes how to create and configure OAuth client credentials in Genesys Cloud. 


Prerequisites

  • Genesys Cloud Developer role
  • OAuth > Client > Add permission

To create and configure an OAuth client for Google Dialogflow, perform these steps:

  1. In Genesys Cloud, click Admin.
  2. Under Integrations, click OAuth.
  3. Click Add client .
  4. In the App Name box, type a descriptive name of the app.
  5. (Optional) In the Description box, type a brief description of the app.
  6. Under Token duration (seconds), set the duration of time until tokens created with this client expire. Accept the default duration, or enter a value between 300 and 172800 seconds. This setting specifies the lifetime of the token to a maximum of two days or less.
  7. Under Grant Types, select Client Credentials.
  8. Click the Roles tab and enable any role.
  9. Click Save. Genesys Cloud creates a Client ID and a Client Secret token.



Step 4: Configure the Google Dialogflow platform service account credential

This section describes how to configure the Google Dialogflow platform service account credential in Genesys Cloud. 


Prerequisites

To configure the Google Dialogflow platform service account credential, perform the following steps:

  1. In Genesys Cloud, open the Admin menu and navigate to Integrations. Then, search for and open the Google Dialogflow integration.
  2. On the Google Dialogflow integration page, click the Configuration tab.
  3. Click Credentials, and then click Configure.
  4. Open the Google Dialogflow JSON service account key file that you downloaded previously.
  5. Copy the information from the JSON service account key file into the appropriate Genesys Cloud fields.
    1. Copy the “client_id” value from the JSON file into Genesys Cloud’s Client ID field.
    2. Copy the “client_email” value from the JSON file into Genesys Cloud’s Client Email field.
    3. Copy the “private_key_id” from the JSON file into Genesys Cloud’s Private Key ID field.
    4. Copy the “private_key” value from the JSON file into Genesys Cloud’s Private Key field.
      Note: Ensure that you copy all information that appears between the quotation marks. Ensure that you copy and paste the exact value shown, and that no values convert to invalid commands. For example, a third-party copy program can convert the \n value to a new line.
  6. Click OK.



Step 5: Copy the Genesys Cloud OAuth client credentials to Google Dialogflow and activate the integration

This section describes how to copy the Genesys Cloud OAuth client credentials to the Google Dialogflow integration in Genesys Cloud. Then, learn how to activate the integration in Genesys Cloud.


Copy the Genesys Cloud OAuth client credentials to the Google Dialogflow integration:

  1. From Genesys Cloud, copy the Client ID and the Client Secret token into a text editor, such as Notepad.
  2. In Genesys Cloud, copy the Client ID to the Google Dialogflow integration:
    1. Click Admin.
    2. Under Integrations, click Integrations.
    3. Click Google Dialogflow.
    4. Click the Configuration tab and then click the Credentials tab.
    5. Under Genesys Cloud OAuth Client Credential, click Change.
    6. In the Client ID box, paste the Client ID credential.
    7. In the Client Secret box, paste the Client Secret token.
  3. Click OK.


  1. In the Status column, click Inactive. The Change Status dialog box opens.
  2. Click Yes. The Google Dialogflow integration status changes to Active.

Click the image to enlarge.



Step 6: Create a Genesys Cloud Architect flow and configure it with a Google Dialogflow bot

In the following example, we demonstrate how to create an Architect flow that allows customers to order flowers for delivery. We provide an extra example that displays how to set up Architect for a pre-configured Google Dialogflow bot for car rental. These examples assume that you have a previously configured Google Dialogflow agent, and also Genesys Cloud queues and data actions.


Prerequisite

To create an Architect flow, perform these steps:

  1. In Genesys Cloud, click Admin.
  2. Under Architect, click Architect. The Architect home page appears.
  3. From the Architect home page, click or hover over the Flows menu and choose the appropriate flow type.
  4. Click Add . The Create Flow dialog box opens.
  5. In the Name field, enter a unique name for the flow.
  6. (Optional) In the Description field, include a short sentence or phrase to describe this flow.
  7. Click the Default Language list and select the flow’s default supported language.
  8. Click the Divisions list and select the division in which to place the flow.
  9. Click Create Flow. The flow configuration page opens.


  1. From the Architect toolbox, expand the Task category and drag a Task action into the Reusable Tasks area.
  2. Click Set this as the starting task.
  3. Name the task.
  4. Under Initial Greeting, assign a prompt or text-to-speech.
  5. Click Click to open.


  1. From the Architect toolbox, expand the Data category and drag a Call Dialogflow bot action beneath the Start action.
  2. In the Call Dialogflow Bot panel, perform these steps:
    1. (Optional) Rename the Call Dialogflow action.
    2. Select the previously configured Dialogflow agent. In this example, we use MyDialogflowBot.
  3. Under Intents > OrderFlowers, use variables to set the number of flowers, delivery address, delivery date, and type.

Example:

Click the image to enlarge.


  1. From the Architect toolbox, expand the Audio category and drag a Play Audio action below the Order Flowers path.
  2. Add a prompt or text-to-speech that thanks the customer for the flower order.
  3. Expand the Transfer category and drag a Transfer to ACD action below the LiveAgent path.
  4. Configure the Transfer to ACD action for the following options:
    • The queue to transfer the customer when they want to speak to a live agent.
    • (Optional) Pre-transfer and failed transfer audio.
    • (Optional) Routing priority, preferred agents, and language skills.
    • (Optional) Failure outputs.

Example:

Click the image to enlarge.


As the following image demonstrates, we also configure the Google Dialogflow bot and associated flow to include a car rental option. This example also includes an Architect Call Data action, for which we configure success, failure, and timeout paths.

Click the image to enlarge.



Step 7: Route a Genesys Cloud phone number to the flow

If you already own a phone number, you can associate it with the flow you created previously. You can also purchase a Genesys Cloud Voice phone number. For more information about Genesys Cloud Voice, see the Learn more section below.


Prerequisites

This task requires the following permissions:

  • Architect > FlowView
  • Telephony > Plugin > All

To configure the call route entry, perform the following steps:

  1. In Genesys Cloud, click Admin.
  2. Under Routing, click Call Routing.
  3. Click Add . 
  4. In the Name field, type a unique call routing name. This name appears in your list of entries on the Call Routing page.
  5. To add phone numbers to associate with the configuration, do the following:
    1. Under Addresses, click Add .
    2. Type the complete telephone number string in numeric format only.
    3. Click Submit.
  6. Repeat step 5 to add more telephone numbers.
  7. Click Save.


To always route to a single flow, do the following:

  1. Under Regular Routing, ensure that the Use Schedule Based Routing toggle is disabled.
  2. Click the All Calls list, type the first few letters of the published flow that users enter when they dial the associated number or numbers, and select it from the list.
  3. Click Save. A message appears, indicating that your entry saved. Your entry may take a few minutes to appear in search results.  

Note: Only flows previously published in Architect appear in this list. You cannot associate a call route configuration with an unpublished flow.



Summary

Congratulations! You are now set up and ready to test your Google Dialogflow Agent with Genesys Cloud. You can now route interactions to a flow in Genesys Cloud Architect. You can also use the Google Dialogflow Agent associated with the Architect flow to steer interactions and set up escalation to a live agent in Genesys Cloud.