Engage Digital | Configuring integration settings

Now that you have configured and connected Engage Digital and Google Dialogflow, the primary interface you will use to configure the remaining integration settings will be the Engage Adapter App available at https://edf.ringcentral.com. This interface will allow you to configure a virtual agent that expresses the settings needed to handle conversations and handover rules in Google Dialogflow. A major point of integration is that the virtual agent in the Engage Adapter App specifies an associated chatbot agent from Google Dialogflow, allowing the chatbot agent’s configuration settings to be used.
RingCentral Engage Digital Google Dialogflow adapter Create virtual agent page

Virtual agents and mega agents

Google supports combining multiple Dialogflow agents, called sub-agents, into a single agent, called a mega agent. When you perform a detect intent request against a mega agent, all of the sub-agents are considered, and the best response from the sub-agents is returned. There are two main benefits:
  • Better governance: If you have multiple teams building an agent, each team can be responsible for one sub-agent, which simplifies change conflicts across teams.

  • More intents: If you have agents with a large number of intents, you may approach the intent count limit. In this case, you could create multiple sub-agents and one mega agent.

Configuring a virtual agent

  1. Access the Engage Adapter App at https://edf.ringcentral.com.
  2. Log in using your RingCentral user account with admin credentials.
  3. Click Add a virtual agent.
  4. Enter a name for the virtual agent.
  5. Enter an Output context if desired.
  6. Select an agent from the Choose a Dialogflow agent menu.
  7. Check the Is Mega Agent box if you want this agent to be a mega agent.
  8. If configuring a mega agent, complete the Project Id field. Add more project handles as needed.
  9. Select a category to listen to. It must be a skill category accessible by your Engage user.
  10. In Select sources to listen to, check the boxes for the channels to listen to.
  11. Select a Backup Engage category.  
  12. Specify a fallback message to the user. (optional)
  13. Click Save & Activate.

Configuration settings for virtual agents

  • Name of this virtual agent: A name used only in this application. For example, Greeter bot.
  • Output context: Sent as an input context to Dialogflow with each message. Supported only for Dialogflow ES.
  • Choose a Dialogflow agent: One of the Dialogflow agents available to you. All Dialogflow agents should be using API v2.
  • Is Mega Agent: Indicates that the agent will be a mega agent.
  • Project Id: Specifies the project ID of a sub-agent project to add to the mega agent.
  • Select a RingCentral Engage category to listen to: A category that will be used exclusively in this integration. The bot will be listening only to messages marked with this category. This must be a skill category accessible by your Engage user.
  • Select a RingCentral Engage category to listen to: A category that will be used exclusively in this integration. The bot will be listening only to messages marked with this category.
  • Select sources to listen to: One or more channels that will be used for this virtual agent. You can’t use channels used by other virtual agents. Please make sure that your API key has access to the specified channels.
  • Backup Engage category: A category that will be used exclusively for fallback recategorization. If the bot fails, the specified category will attach to the message thread.
  • Fallback message to be sent: A message used for a fallback notification to the user if the bot fails.
  • Save & Activate: Saves the configuration settings and activates the virtual agent.
  • Remove this virtual agent: Removes the virtual agent. This option will appear only when the virtual agent has been saved and activated.
RingCentral Engage Digital Google Dialogflow adapter virtual agent handover rules page

Configuring virtual agent handover rules for Google Dialogflow ES agents

  1. Access the Engage Adapter App at https://edf.ringcentral.com.
  2. Log in using your RingCentral user account with admin credentials.
  3. Click on the virtual agent’s name to edit.
  4. Select the Handover Rules tab. 
  5. Add the handoff value to the output context fields and match it with categories.
  6. Click Save.

Configuring virtual agent handover rules for Google Dialogflow CX agents

Virtual agent handover rules determine how a virtual agent hands over a conversation to a human agent. Note that these steps apply only to Google Dialogflow CX. Configuring the Live agent handoff in Dialogflow CX allows the virtual agent handover rules to be configured.
Google Dialogflow CX virtual agent fulfillment live handoff configuration page

Adding a live agent handoff dialog option in Google Dialogflow

  1. Access the Google Dialogflow CX console at https://dialogflow.cloud.google.com/cx/projects.
  2. Log in using your generic Google account and create a project. See Dialogflow CX Setup in the Google Cloud documentation for more information.
  3. Go back to the console and select the project you created.
  4. Click Create agent. See Build an agent in the Google Cloud documentation for more information.
  5. Create a flow for the agent. See Flows in the Google Cloud documentation for more information.
  6. In the Build page, click the add page plus sign icon in the Pages section. Enter a name for the page.
  7. Hover over the newly created page then click the More icon that appears at the far right. Click Edit
  8. Click Edit fulfillment in the Page configuration panel on the right side of the page.
  9. Click Add dialogue option. 
  10. Click Live agent handoff.
  11. Add a dialog option in the Live agent handoff text box where the key has to be ‘name’ and the value can be any text. For example:
{
   "name": "transfer_to_support"
}
  1. Click Save.
View of adding a live agent handoff dialog option in Google Dialogflow

Editing the virtual agent handover rules

  1. Access the Engage Adapter App at https://edf.ringcentral.com.
  2. Log in using your RingCentral user account with admin credentials.
  3. Click on the virtual agent’s name to edit.
  4. Select the Handover Rules tab. 
  5. Add the handoff value to the output context fields and match it with categories.
  6. Click Save.

Handover configuration settings for virtual agents

  • If encounter this Google Dialogflow Output Context: An output context that will trigger a handover.
  • Handover to the following Engage Category (Skill): An Engage Digital category that is assigned.
  • Add plus icon: Add an additional handover rule.
  • Delete trash icon: Remove a handover rule.

Intent response logic

Intents have a built-in response handler that can return responses after the intent is matched. You can configure intent responses using several tabs in the Responses menu in the Intents page. The following logic is supported in the integration:
  • If there is a payload from the platform-specific tab, the payload from this tab is taken into account, and the text from the default tab is ignored.
  • If there are several payloads from the different platform-specific tabs, including Facebook, the payload from the Facebook tab is taken into account, and all other tabs are ignored.
  • If there are several payloads from the different platform-specific tabs, excluding Facebook, all tabs are ignored.
  • Otherwise, the payload from the default tab is taken into account.
The toggle ‘Use responses from the DEFAULT tab as the first responses’ should be disabled.

Setting up structured messages

If an Engage Digital channel supports structured messages, the adapter can convert Google Dialogflow structured messages to Engage Digital structured messages. An example of a channel that supports structured messages is Engage Messaging, where structured messages are supported for all device types. Structured messages are supported only by Dialogflow ES. The integration supports these structured message types:
  • Quick replies
  • Templates
  • Carousels
The behavior of each of these types is discussed in more detail below.
 
To use structured messages in Google Dialogflow:
  1. Access the Google Dialogflow console at https://console.dialogflow.com/api-client/#/login.
  2. Log in using your generic Google account.
  3. Go to the Intents page. 
  4. Select an existing intent.
  5. Expand the Responses menu. 
  6. Click the plus icon and add a new messenger for integration from the dropdown.
  7. Disable the Use responses from the DEFAULT tab as the first responses toggle setting.
  8. Click Add Responses.
  9. Depending on the messaging channel, add Quick Replies or Card as a response.
  10. Enter the configuration information for the quick reply or card.

Structured message types

Quick reply

A quick reply is a suggested user response. When a quick reply is tapped, the text is sent back to the agent as a user query. This response allows you to send pre-configured text to Dialogflow, as though the customer provided a response. Note the following constraints when implementing a quick reply:
  • Dialogflow Quick reply type responses must contain a title and text.
  • Only one Quick reply should be configured for each intent.

Cards (Templates)

A Card may consist of several elements, such as image, title, subtitle, and clickable button. The adapter will convert a Card type response to a ‘Template’ if there is only one card in the intent. Note the following constraints when implementing a template:
  • Card type responses must contain a title and at least one button. All other fields are optional.
  • An image will be uploaded to Engage Digital by the adapter.
  • A button with an empty URL or text postback field will be converted to a button with an empty payload.
  • A button with text postback will be converted to a button with a payload. The payload will be filled with a text postback, which can send an event to your postback webhook. This is useful when you want to invoke an action in your bot.
  • A button with a URL will be converted to a link.

Cards (Carousels)

A ‘Carousel’ is an array of ‘Template’ types. The adapter will convert a response to a carousel if it contains several cards. Each card will be one member of the carousel. The constraints described for templates apply equally to carousels.

Custom payload

Using a custom payload allows overriding the DialogFlow limitation for the number of characters in structured messages for ES version, and provides support for structured messages in the CX version. You can set up a custom payload on any response tab but with taking into account the limitations provided in Intent Response Logic.

Quick replies

Field in custom payload
Description
Example
title
The select structured message body.
{
 "quickReplies": {
 "title": "this is the body of the quick replies",
 "quickReplies": [
   "option1",
   "option2",
   "option3",
   "option4",
   "option5"
   ]
  }
}
quickReplies Payload of the structured message.

Template/card

Field in custom payload
Description
Example
title
Title of the template
{
  "card": {
    "imageUri": "https://www.planetware.com/wpimages/2020/01/india-in-pictures-beautiful-places-to-photograph-taj-mahal.jpg",
    "buttons": [
      {
        "text": "button1"
      },
      {
        "text": "button2"
      },
      {
        "postback": "http://ringcentral.com/",
        "text": "button3"
      },
      {
        "text": "button4"
      }
    ],
    "title": "Title of the template",
    "subtitle": "Subtitle of the template"
  }
}
subtitle
Subtitle of the template.
imageUri
The URL to the attachment used to decorate the template with an image.
buttons.text
The title of the item (button)
buttons.postback
URL if you want to open website when clicking on the button
 

Carousel

Several cards are considered as a carousel on the Engage Digital side. The structure of the payload is the same as for the template.

The limitations for each field are described on developers.ringcentral.com in the corresponding sections.

Passing images sent by the customer to Google Dialogflow

When customers send an image, you can pass the image to Google Dialogflow to process the image by other third-party APIs such as the Google Vision API. Passing images is available only for Engage Messaging and Engage Chat channels. For other channels, the integration will execute fallback rules.
 
This feature only supports images. This logic won't process videos, documents, and other files.
 
To pass images to Google Dialogflow use the following parameters:
 
  • ed_data_image_urls: An array of image URLs.
  • ed_has_attachment: Context passed to explicitly match to intents that can process images (ES only).
  • original_body: Text message if the end-user message contains text and image.
The text sent in the message with the images contains only ‘ed_image_attached’. Therefore the intent you plan to use for processing the image should use this phrase as training data.
© 1999-2022 RingCentral, Inc. All rights reserved.
Close X
Thanks!
We've sent you a link, please check your phone!
Please allow a full minute between phone number submissions.
There was an issue with SMS sending. Please try again. If the issue persists, please contact support.