Integrate Google Dialogflow ES

Before completing the tasks on this page, be sure that the prerequisites for the integration have been met.

Create a Script

Permissions Required: View Scripts, Create/Edit Scripts

You need to create at least one Studio script to route interactions to your virtual agent. Follow the script guidelines and requirements for integrating a virtual agent. The supported virtual agent action for this provider is VoiceBot Exchange.

You can learn more about Studio scripting in the Fundamentals and Technical Reference Guide sections of the online help.

Custom Payload Best Practices

Follow these best practices when integrating custom payload data Google Dialogflow ES into CXone

  • CustomPayload is used to pass context for an intentClosed The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish. Context helps the virtual agent understand the user's intent. Contexts aren't required, but they help the virtual agent match an utteranceClosed What a contact says or types. to an intent.
  • In a Snippet action in your script, create a customPayload object that follows the format outlined in the Google Dialogflow ES documentationIcon indicating the link goes to an external website for REST Resource: projects.agent.sessions.context. The Studio online help provides additional information about dynamic data objects.
  • You can also pass custom data with customPayload without contexts. To do this, include standard JSON key-value pairs in a dynamic data object.
  • Speech contexts are passed in custom payload in the speech_contact parameter. You can see the contents of this parameter in Studio traces and application logs.
  • The customPayload dynamic object is passed as a virtual agent parameter as JSON, as shown in the example script.
  • Speech context hints can be passed with custom payload in the speechContexts parameter. The value of speechContexts.phrases must be a Google class token A square with an arrow pointing from the center to the upper right corner. for the hint you want to give. The token must match the language and locale of your contacts. For example:

    DYNAMIC customPayload
    customPayload.speechContexts.phrases="$OOV_CLASS_ALPHANUMERIC_SEQUENCE"
    customPayload.speechContexts.boost=10		

Add an App to Virtual Agent Hub

Permissions Required: View Scripts, Create/Edit Scripts

Adding a configuration app to Virtual Agent Hub establishes the connection between CXone and your virtual agent provider.

  1. In Studio, open or create a script and add a virtual agent action, if it doesn't contain one already.
  2. Double-click the virtual agent action to open Virtual Agent Hub.
  3. Click Add Bot.
  4. Enter a Virtual Agent (Bot) Name and click Google Dialogflow ESNuance MixLex V2 in the list of virtual agent providers.

  5. Click Next.

  6. Complete the fields in the configuration form and click Next. You can find details about this form in the Configuration Page Details section on this page.

  7. Click Next.

  8. See the Configure Voice Integration Options section on this page.

  9. Click Next.

  10. On the Transcript page, select the option for whether you want the conversation transcript and intent information captured. You can choose to Capture and Archive Intent Info Only, to Capture and Archive Transcript and Intent Info, or to Capture and Archive Transcript Only. You can also choose Do Not Capture or Archive Transcript or Intent Info.

  11. Click Next.

  12. On the Test + Add page, you can test your bot's connection by sending voice or text prompts. If your test messages don't work, click Back to return to the Configuration page and verify the settings. You may also need to verify configurations in your virtual agent provider's management console.

  13. Click Add.

Google Dialogflow ES Configuration Page Details

Use the information in the following table when completing the Configuration page. You see this page when adding an app in Virtual Agent Hub

Configure Google Dialogflow ES TTS Output

Complete the steps in this section if you want to use the Google TTS service. The fields in the following image appear when you enable the Perform Output TTS option on the Dialogflow ES Configuration page in Virtual Agent Hub.

  1. In Virtual Agent Hub, add a new configuration app and configure it according to the steps in Add an App to Virtual Agent Hub section on this page.
  2. EnablePerform Output TTS.
  3. To use a custom voice model, enable Use Custom Voice and enter the name of the AutoML model you want to use in the Custom Voice Model field.

  4. If you want to use a Google voice model, select the TTS Voice Name from the drop-down.

  5. Select the machine learning Model and Model Variant that you want the Google TTS services to use when synthesizing speech.

  6. To add silence to the start of the virtual agent's audio response, enter the number of milliseconds of silence to add in the Add Leading Silence field. The recommended amount of silence is 500 milliseconds.

  7. Enter the Speaking Rate, Pitch, and Volume Gain to configure how you want the TTS voice to sound.

  8. Return to the Add an App to Virtual Agent Hub section  on this page to finish adding the configuration app.

Configure Voice Integration Options

Permissions Required: View Scripts, Create/Edit Scripts

  1. In Virtual Agent Hub, add a new configuration app and configure it according to the steps in the Add an App to Virtual Agent Hub section  on this page.
  2. Click Next on the Configuration page.

  3. On the Voice page under Voice Integration Options, select Turn by Turn Control (CXone Voice Bot Gateway).
  4. Under Text to Speech Options, select Use CXone Cloud TTS if you want to use the CXone TTS option. To use the virtual agent provider's TTS service instead, clear this checkbox and configure TTS output on the Configuration page of the wizard.

    If the form won't allow you to select Use CXone Cloud TTS, click Back to return to the Configuration page. Click the Perform Output TTS slider to Off. You can now enable Cloud TTS on the Voice page.

  5. Select a TTS Vendor, if you're using Cloud TTS. If you're using your virtual agent provider's TTS service, this field is not visible and you can skip this step.
  6. Under Transcription Options, select the option for the transcription service you want to use.

  7. If you choose to use a CXone transcription profile, click Transcription Profile to select the one you want to use. Click Add New Turn by Turn Transcription Profile to create a new profile.
  8. Click Next.
  9. Return to the Add an App to Virtual Agent Hub section  on this page to finish adding the configuration app.

Assign the Google Dialogflow ES App to an Action

Permissions Required: View Scripts, Create/Edit Scripts

When the virtual agentClosed The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish app is set up and configured in Virtual Agent Hub, you need to assign it to the virtual agent actions in your script. This connects the action and the script to your virtual agent provider.

The action you use depends on your virtual agent and what it supports.

  1. In Studio, open the script you want to modify.
  2. If you haven't done so already, click the Tools tab, expand the Automation and AI category, and add the virtual agent action you want to use. Be sure to put it in the correct location in your script. If you don't see the action you expect, verify that your script media type is correct. For example, if you're creating a script for a voice virtual agent, the script must be a phone script.

  3. Double-click the action to open Virtual Agent Hub.

  4. In the left column, locate the virtual agent that you want to assign to the action and click the selection option An icon of a circle with a checkmark inside. next to it.
  5. Click Close.

Change the Transcription Profile

Permissions Required: View Scripts, Create/Edit Scripts

A transcription profile allows you to use a different transcription service from the one the virtual agent provider offers. Each virtual agent can have one transcription profile. You only need to follow the steps in this section if you are working with a voice virtual agent and need to change the transcription profile.

  1. In Studio, open or create a script and add a virtual agent action, if it doesn't contain one already.
  2. Double-click the virtual agent action to open Virtual Agent Hub.
  3. In the list of virtual agent configuration apps on the left side of the Virtual Agent Hub page, click the one you want to modify.
  4. In the center of the virtual agent app properties page, click the Voice tab.
  5. Under Transcription Options, select Use CXone transcription Profile if it isn't already selected.

  6. Select the Turn by Turn Transcription Profile you want this virtual agent integration to use. If the option you want to use isn't there, you can add it.

  7. Click Save.
  8. Test your transcription service by using the microphone option in the Test section of your virtual agent app properties page.

Test Your Virtual Agent

Permissions Required: View Scripts, Create/Edit Scripts

You can test many aspects of your virtual agent to make sure everything works as intended. You can run tests from the virtual agent app's properties page in Virtual Agent Hub. You can: 

  • Verify that the virtual agent app is correctly configured to communicate with the virtual agent provider.
  • Add custom payload JSON to test the virtual agent's handling of custom payload data.
  • Trigger a welcome intent event to test how the virtual agent begins a conversation.
  • Trigger a custom intent event to test any custom events you've created for your virtual agent.
  • Trigger a timeout event to test how the virtual agent responds when the contact times out.
  • Test how the virtual agent handles DTMFClosed Signaling tones that are generated when a user presses or taps a key on their telephone keypad. input.

The following image is an example of the properties page for a virtual agent app in Virtual Agent Hub. It shows the Configuration and Voice tabs and the Test pane.

  1. In Studio, open or create a script and add a virtual agent action, if it doesn't contain one already.
  2. Double-click the virtual agent action to open Virtual Agent Hub.
  3. Click to select the configuration app for the virtual agent you want to test from the list on the left.
  4. In the Test pane, enter a test message in the Type a message field and press Enter to send it. You can also click Microphone An icon shaped like a microphone. and speak into your computer's microphone.

  5. Click Start with welcome intent to start a test conversation from the beginning. The virtual agent responds with its default welcome message. You can enter test messages.
  6. Click More Options An icon with three dots stacked vertically. to test other aspects of your virtual agent.

  7. Click Reset to start your test again.
  8. If you need to make changes based on the results of your testing, you can: 

    • Modify the Studio scripts for the virtual agent.
    • Modify the configuration settings in the virtual agent's app in Virtual Agent Hub.
    • Modify the virtual agent's configuration settings in the provider's console. Click the large square button on the app properties page in Virtual Agent Hub. The example at the beginning of this section shows the Google Dialogflow CX app with the provider button. It has the An icon that has a square with an arrow overlaid on top of it. The arrow points from the center of the square to the top right corner of the square. icon on it to indicate that the link opens an external site.
  9. Test the virtual agent thoroughly after each change to your scripts or any configuration settings.
  10. When you're finished testing, click Close.