Virtual Agents

Overview

Virtual Agents (VA) introduce conversational artificial intelligence (AI) and Natural Language Processing (NLP) to CCAI Platform.

The AI-powered Virtual Agents can act as the first line of customer support or be configured to handle support requests with limited to no human agent intervention.

You can use Virtual Agents to do the following:

  • Configure multiple, distinct VAs that focus on specific issues and assign to a specific queue.

  • Assign a Virtual Agent to answer incoming calls, chats, or leverage existing routing options at the queue level.

  • Allow your Human Agents to receive escalations from a VA, or transfer a session to a VA.

Customer experience

Customers will experience seamless support, whether chatting with a Virtual or Human Agent.

When VAs reach the limit of their knowledge, or when they experience a technical issue, interactions can be automatically escalated to a Human Agent and a message is displayed in the Customer UI.

The consumer is then placed in queue to be routed to an agent assigned to the queue.

Chat

Aside from the Virtual Agent's configurable name and avatar, there is no noticeable difference between agent types in the Customer UI.

Optionally, CCAI Platform admins can add a button ("Skip to Human Agent" button, headphones icon) to the UI, which enables consumers to skip the VA and be connected with a Human Agent. You can also configure user segments in your CRM to have specific groups of consumers (for example, VIPs) automatically bypass the VA.

Call

VA for Calls uses pre-programmed voice prompts and responses to interact with your consumers. You can build in flows where the consumer can easily be escalated to a Human Agent, or where escalation isn't possible. Audio recordings can be supplied so that you can use your own voice talent, or a simulated voice based on supplied text can be utilized.

Agent Experience

The agent experience is only slightly changed. Agent will see that the session was escalated from a VA in the CRM and in the Agent Adapter. For Chat, the Agent can see the conversation with the VA in the Chat Adapter.

Human and Virtual Agents can transfer calls or chats to queues and to each other. Queues attended by VAs are labeled for the Human Agent's awareness.

Virtual Agent: Creating Google Dialogflow Agents and Linking in CCAI Platform Developer Settings

You can use Dialogflow, a natural language understanding platform, to integrate a conversational profile for Virtual Agent.

Virtual Agent Dialogflow Platforms

Dialogflow ES: This platform only supports agent setup for Chat channels. Select this option to onboard Agents built using Dialogflow ES.

Dialogflow CX - Chat, Voice (Legacy) : This option supports agent setup for both Chat and Voice channels Agent interactions are limited to basic functions such as conversational exchanges and dynamic data handling. DTMF for Voice is not supported. Select this option to onboard Agents built using Dialogflow CX.

Dialogflow CX - Voice: This option only supports Agent setup for Voice channels. Agent interactions include advanced functions such as DTMF support, consumer barge-in*, CCAI Insights tracking*, and many others. Select this option to onboard Agents built using Dialogflow CX.

Create Dialogflow ES and CX Agents

To onboard an Agent into the CCAI Platform Portal, first create one in the Dialogflow Console.

  1. Create a Dialogflow Account

  2. Go to Trial in the side navigation bar.

  3. Select agent type. For more information on the distinction between ES and CX Agents see: Agent Types (ES, CX).

Once you have selected your agent type, follow the steps in the Google quickstarts to create the agents in the Dialogflow console.

To create a Dialogflow agent see Create a Dialogflow ES agent or Create a Dialogflow CX Agent.

Create a service account key for your Dialogflow Agent

To connect this agent to the CCAI Platform Portal, you must first enter a service key into the CCAI Platform Portal. The steps below will walk you through the process of creating the service key in Google Cloud. For more information on understanding the Google service accounts see What are service accounts?.

If you have already created a service key with access to Dialogflow, skip this section.

Once you have set up your agent, the Agent will appear in your side navigation bar.

  1. Navigate to https://console.cloud.google.com/.

    A default project will display.

  2. In the drop-down in the toolbar, select the Google project that has your desired Dialogflow agent set up.

  3. Select IAM & Admin.

  4. In the side navigation select Service Accounts. The service account console will load.

  5. Click +Create Service Account.

Enter the service account details in Google Cloud Service

  1. Enter the Service account details.

  2. Display name for this service account

  3. Service account ID is required and must be unique.

  4. Describe what this service account will do.

  5. Grant this service account access to a project.

  6. In the Select a role drop-down: Assign the Dialogflow API Admin role to the service account.

  7. Click Continue.

  8. (Optional) Grant users access to this service account.

Edit the actions in Service Accounts page in Google Cloud (to create a key)

The Google Cloud Service Accounts page displays the service accounts created. This will be uploaded to the CCAI Platform Portal.

To create a service account key see Create a service account key

Follow Google recommended best practices for storing your key.

Based on how your company handles segmentation within Dialogflow, you can create multiple Virtual Agent Platform entries and add specific Dialogflow Agents, or create one platform with many Dialogflow Agents.

Repeat the above steps for each Dialogflow Agent that you need to onboard to the CCAI Platform Portal.

Add a Virtual Agent Dialogflow Platform

Dialogflow ES - This platform only supports agent setup for Chat channels. Select this option to onboard Agents built using Dialogflow ES.

Dialogflow CX - Chat, Voice (Legacy) - This option supports agent setup for both Chat and Voice channels Agent interactions are limited to basic functions such as conversational exchanges and dynamic data handling. DTMF for Voice is not supported. Select this option to onboard Agents built using Dialogflow CX.

Dialogflow CX - Voice - This option only supports Agent setup for Voice channels. Agent interactions include advanced functions such as DTMF support, consumer barge-in*, CCAI Insights tracking*, and many others. Select this option to onboard Agents built using Dialogflow CX.

  1. Go to Settings > Developer Settings > Virtual Agent.

  2. Click + Add Platform.

    The Add a Virtual Agent platform dialog appears.

  3. Enter a name for the new platform.

  4. Select from the following services:

    Dialogflow ES

    Dialogflow CX - Chat, Voice (Legacy)

    Dialogflow CX - Voice

  5. Click Create.

Re-onboard an existing Dialogflow Agent and attach to a conversation profile

Re-onboard an exiting Dialogflow Agent using the Dialogflow CX - Voice platform. You will need to attach the existing Dialogflow Agent to an Agent Assist Conversation Profile.

  1. Navigate to the Agent Assist Projects page. The Select Projects dialog is displayed.

  2. Select the Google Cloud project from the list of displayed projects. The Agent Assist Console is displayed.

  3. Change the region of the Agent Assist console to match the region of your Virtual Agent, by updating the URL: projects/{project_name}/locations/{dialogflow_agent_region}/conversation-profiles

  4. Click the Conversation Profiles tab on the left navigation pane. The Conversation Profiles page is displayed.

  5. Click the Create new button. The New Conversation Profile page is displayed.

  6. Enter the conversation profile name in the Display Name field.

  7. To link the existing Virtual Agent to the conversation profile:

    - Navigate to Choose to use Dialogflow section.

    - Turn ON the Enable virtual agent toggle switch

    - Enter the Dialogflow Agent ID in the Agents field

  8. Click the Create button to create and deploy the conversation profile.

Now, you can re-onboard this Dialogflow Agent using the Dialogflow CX - Voice platform selection in the CCAI Platform Portal.

Virtual Agent Platform statuses

CCAI Platform validates keys based on JSON structure and key validity. A Dialogflow Agent is fully authenticated only when its key is in Valid status:

  • Valid: All workflows in the platform are valid.

  • NeedsAttention: One or more workflows in the platform are Invalid. Replace with valid keys to resolve.

  • Invalid: All workflows in the platform are Invalid. When a platform status is invalid, the platform is automatically disabled. Replace invalid keys with valid keys to resolve.

If the status is Invalid or Needs Attention, replace the invalid keys by verifying the JSON file that you uploaded or generate a new JSON file from Dialogflow.

When the configuration steps are complete, your Virtual Agents are ready to work. For more information about how to manage them, see Virtual Agent: Managing, Assigning, and Reporting.

Virtual Agent: Managing, Assigning, and Reporting

Overview

The CCAI Platform Virtual Agent for Web Chat and Voice introduces conversational artificial intelligence (AI) and Natural Language Processing (NLP) to the CCAI Platform platform. The AI-powered Virtual Agents can act as the first line of customer support or be configured to handle support requests with limited to no human agent intervention.

Manage Virtual Agents

Virtual Agents, like Human Agents, must be added to the CCAI Platform Portal and then assigned to queues. You can personify a Virtual Agent with a name and avatar.

Add and personify a Virtual Agent

If you have built Agents in Dialogflow and connected them to a CCAI Platform Virtual Agent Platform, you can now complete the following steps to add and personify those agents in the CCAI Platform Portal:

  1. Go to Settings > Virtual Agent.

  2. Click Add Virtual Agent.

  3. Enter a name.

  4. Select a Virtual Agent Platform and Workflow from the dropdown. Workflows represent authenticated Dialogflow Agents.

  5. (Chat only) Select the languages this Virtual Agent will use. Only languages that have been added in Settings > Languages and Messages will appear here.

  6. To upload a custom avatar, mouse over the default image and click Update. A file selection screen appears and, once selected, you can use the built-in tool to crop the image:

  7. Click Save.

  8. At the top of the Virtual Agent page, depending on which channels you are using Virtual Agents for, toggle Virtual Agents on for Chat and or Calls On.

Assign Virtual Agents to queues

Each Virtual Agent can be assigned to one or more queues. They can be assigned to a queue with or without Human Agents assigned.

  1. Go to Settings > Queue > Web (for chat VA) or IVR (for call VA).

  2. Click on the queue to which the Virtual Agent should be assigned:

  3. On the queue settings page, click Assign Virtual Agent.

  4. From the VirtualAgent dropdown select an Agent. Only Virtual Agents in the On state are available:

  5. Select this Virtual Agent's Hours of Operation:

    • 24 Hours: The Virtual Agent is available to take chats any time. If there are no Human agents online, no escalations are possible.

    • Queue hours: The Virtual Agent is available only during the queue hours set in Settings > Support Center Details.

  6. (Chat only)To give consumers the option of skipping the Virtual Agent, select Display Skip to human agent button. When this checkbox is marked, a headphones icon appears on the Consumer UI. The consumer can click the icon any time during the chat session to be connected to a Human Agent.

  7. (Chat only) If you have user segments configured in your CRM, you can Exclude users from Virtual Agent workflow. Consumers who belong to the specified user segment are sent directly to a Human Agent. Toggle the feature to On, then select a segment field and value from the drop-down menu.

  8. Click Save.

  9. On the queue Settings page, mark the Virtual Agent Chat checkbox for chat or Virtual Agent checkbox for voice.

  10. The Virtual Agent is now enabled for the queue.

CRM Integration configuration

The below setting only applies to the chat channel.

For sessions handled by Virtual Agents, the CRM behavior is set on the Operations Management page.

  1. Go to Settings > Operation Management > Virtual Agent

  2. Mark the checkbox, Create CRM cases for chats attended by Virtual Agents:

    • All attended chats: Each time an interaction is initiated by a consumer, a case is created in your CRM.

    • Minimum chats: Set the minimum chat message threshold, below which a CRM case is not created. This can reduce the number of unnecessary cases.

  3. If desired mark the checkbox, close CRM cases when the chat session is resolved by a Virtual Agent.

  4. To enable the gathering of a pre-configured metadata packet from your Web SDK when a chat is picked up by a Virtual Agent, mark the checkbox, Collect configured custom data in chat session. The collected metadata is attached to the CRM ticket for that chat.

  5. Click Save changes.

Set a default user for Virtual Agent

When a Virtual Agent creates a session or a record, an Admin can specify where the new sessions or records will go.

  • Assign to a Default User: If enabled, sessions and records created by a Virtual Agent will be assigned to the default user.

  • Leave unassigned: Sessions and records created by a Virtual Agent will not be assigned to any CRM user.

  • Assign to a specific user: Sessions and records create by a Virtual Agent will go to a specified user. Enter the CRM user ID to specify the user.

Specify a default user

  1. Go to Settings > Operations Management.
  2. Locate Virtual Agent > Default User.
  3. Select Assign to a specific user and enter the user ID.

For more information, see CRM Default User.

Real-time Reporting

Virtual Agent dashboard for chats

A full dashboard for Virtual Agent-specific data can be found in Dashboard > Virtual Agent.

Chats: Queued, Ongoing, Completed

The Chat monitoring pages have an Answered By column that indicates whether a chat was initially answered by a Virtual or Human Agent.

Custom payload handling

Custom Payload for Dialogflow allows you to enhance your Virtual Agent experience beyond plain text-based chat and voice support interactions. By using Custom Payloads in Dialogflow agents, you can configure your Virtual Agent to render Custom Responses and Custom Actions.

Custom Responses allows you to render the following messages types:

  • Text

  • Inline buttons

  • Sticky buttons

  • Images

  • Videos

  • Documents

  • Complex views (combination one or more message types)

Custom Actions allow Virtual Agents to perform the following actions:

  • Escalations to human agents

  • Planned transfers to human agents

  • End support session

CCAI Platform payload

To be used in Dialogflow as the custom payload. The following example demonstrates the format for responses in the webSDK using Dialogflow. Sticky buttons and inline buttons cannot be used together in the same payload.

{
  "ujet": {
    "type": "text|inline_button/sticky_button|image|video|document|complex|action",
    "action": "escalation|end",
    "title": "message displayed on the top of the message",
    "escalation_reason": "by_consumer|by_virtual_agent",
    "session_variable": {
      "capture_target": "payload|end_user_response",
      "capture_key": "key",
      "payload": {
      }
    },
    "messages": [
      "Hello",
      "How can I help you?"
    ],
    "buttons": [
      {
        "title": "Button 1",
        "action": "quick_reply"
      },
      {
        "title": "Button 2",
        "action": "quick_reply"
      }
    ],
    "images": [
      {
        "url": "https://image.url",
        "text": "an alternate text for an image for when failed to load an image"
      },
      {
        "url": "https://image.url",
        "text": "an alternate text for an image"
      }
    ],
    "videos": [
      {
        "url": "https://video.url",
        "text": "an alternate text for an video for when failed to load a video"
      },
      {
        "url": "https://video.url",
        "text": "an alternate text for an video"
      }
    ],
    "documents": [
      {
        "url": "https://document.url",
        "text": "an alternate text for an document for when failed to load an document"
      },
      {
        "url": "https://document.url",
        "text": "an alternate text for an document"
      }
    ],
    "components": [
      {
        "type": "text",
        "messages": [
          "We need the information for helping you.",
          "Could you please choose the following options?"
        ]
      },
      {
        "type": "inline_button",
        "buttons": [
          {
            "title": "Button 1",
            "action": "quick_reply"
          },
          {
            "title": "Button 2",
            "action": "quick_reply"
          }
        ]
      },
      {
        "type": "image",
        "images": [
          {
            "url": "https://image.url",
            "text": "an alternate text for an image for when failed to load an image"
          },
          {
            "url": "https://image.url",
            "text": "an alternate text for an image"
          }
        ]
      },
      {
        "type": "inline_button",
        "buttons": [
          {
            "title": "Button A",
            "action": "quick_reply"
          },
          {
            "title": "Button B",
            "action": "quick_reply"
          }
        ]
      }
    ]
  }
}

Chat Message Format For Custom Payload

Used with the CCAI Platform SDK to show a proper UI. It is the same with Dialogflow Custom Payload format but doesn't have "ujet" field in the root. See the below examples for the details.

Examples

Type

Dialogflow Custom Payload

Text

{
  "ujet": {
    "type": "text",
    "messages": [
      "Hello",
      "How can I help you?"
    ]
  }
}

Escalation

Type

Dialogflow Custom Payload

Escalation to the same queue

{
  "ujet": {
    "type": "action",
    "action": "escalation",
    "escalation_reason": "by_virtual_agent"
  }
}
{
  "ujet": {
    "type": "action",
    "action": "escalation",
    "escalation_reason": "by_consumer"
  }
}

Escalation to the targeted queue

{
  "ujet": {
    "type": "action",
    "action": "escalation",
    "escalation_reason": "by_virtual_agent",
    "menu_id": 100,
    "language": "ko"
  }
}
{
  "ujet": {
    "type": "action",
    "action": "escalation",
    "escalation_reason": "by_consumer",
    "menu_id": 100,
    "language": "ko"
  }
}

End Conversation

Type

Dialogflow Custom Payload

End the current conversation

{
  "ujet": {
    "type": "action",
    "action": "end"
  }
}

Inline Button

Type

Dialogflow Custom Payload

Inline Button

{
  "ujet": {
    "type": "inline_button",
    "title": "Select a menu",
    "buttons": [
      {
        "title": "Lorem Ipsum",
        "action": "quick_reply"
      },
      {
        "title": "Lorem Ipsum Dolor Sit Amet",
        "action": "escalation"
      }
    ]
  }
}

Example

Sticky Button

Type

Dialogflow Custom Payload

Inline Button

{
  "ujet": {
    "type": "sticky_button",
    "title": "Select a menu",
    "buttons": [
      {
        "title": "Lorem Ipsum",
        "action": "quick_reply"
      },
      {
        "title": "Lorem Ipsum Dolor Sit Amet",
        "action": "escalation"
      }
    ]
  }
}

Example

Image View

Type

Dialogflow Custom Payload

Inline Button

{
  "ujet": {
    "type": "image",
    "title": "Please see the following images",
    "images": [
      {
        "url": "https://image1.url",
        "text": "an alternate text for an image for when failed to load an image"
      },
      {
        "url": "https://image2.url",
        "text": "an alternate text for an image"
      }
    ]
  }
}

Video View

Type

Dialogflow Custom Payload

Inline Button

{
  "ujet": {
    "type": "video",
    "title": "Please see the following videos",
    "videos": [
      {
        "url": "https://video1.url",
        "text": "an alternate text for an video for when failed to load an video"
      },
      {
        "url": "https://video2.url",
        "text": "an alternate text for an video"
      }
    ]
  }
}

Document View

Type

Dialogflow Custom Payload

Inline Button

{
  "ujet": {
    "type": "document",
    "title": "Please see the following document",
    "documents": [
      {
        "url": "https://document1.url",
        "text": "an alternate text for an document for when failed to load an document"
      },
      {
        "url": "https://document2.url",
        "text": "an alternate text for an document"
      }
    ]
  }
}

Complex View

Type

Dialogflow Custom Payload

Complex View

{
  "ujet": {
    "type": "complex",
    "title": "Welcome to CCAI Platform world!",
    "components": [
      {
        "type": "text",
        "messages": [
          "We need the information for helping you.",
          "Could you please choose the following options?"
        ]
      },
      {
        "type": "inline_button",
        "buttons": [
          {
            "title": "Button 1",
            "action": "quick_reply"
          },
          {
            "title": "Button 2",
            "action": "quick_reply"
          }
        ]
      },
      {
        "type": "image",
        "images": [
          {
            "url": "https://image1.url",
            "text": "an alternate text for an image for when failed to load an image"
          },
          {
            "url": "https://image2.url",
            "text": "an alternate text for an image"
          }
        ]
      },
      {
        "type": "inline_button",
        "buttons": [
          {
            "title": "Button A",
            "action": "quick_reply"
          },
          {
            "title": "Button B",
            "action": "quick_reply"
          }
        ]
      }
    ]
  }
}

Configuring a custom payload in Dialogflow

For more information on how to configure your custom payload using Dialogflow, please refer to the Custom Payload Responses (Dialogflow ES) or Custom Payload (DialogflowCX) resources in the Google Cloud help center.

For more additional information, see Custom Session Variables for Custom Payload Handling.

VA transfer to phone or SIP endpoint

Voice VA has the ability to transfer a call to a specific phone number or SIP endpoint, ensuring that the consumer is connected to the appropriate person or department.

To enable call transfer to a phone number or SIP endpoint, use the following Dialogflow custom payloads. When the payload is received, the CCAIP system will transfer the call to the specified phone number or SIP endpoint.

If the connection is successful, the VA will be removed from the call session and the call session will continue. However, if the connection cannot be established, a transfer failure message will be played and the call will continue with the VA.

The transfer to phone or SIP is functional for both internal and external transfers. To track transfers to SIP/Phone numbers, they will be recorded as Planned Transfers in VA metrics.

To transfer a call to a phone number, you can use the following Dialogflow payload:

{
"ujet": {
"type": "action",
"action": "deflection",
"deflection_type" : "phone",
"phone_number": "+16509424879"
}
} 

To transfer a call to a SIP endpoint, you can use the following Dialogflow payload:

{
    "ujet": {
       "type": "action",
       "action": "deflection",
       "deflection_type" : "sip",
       "sip_uri": "sip:1-999-123-4567@voip-provider.example.net"
    }
}

Custom Session Variables for Custom Payload Handling

Use Custom Session variables to capture values from the Intent Response and the End User Response, then collect all of them and upload them to CRM as a comment.

Capture from End User Response

Flow

  1. The CCAI Platform Server requests the response to Dialogflow.

    Dialogflow may callback it to the customer's server by Fulfillment.

    The customer's server is supposed to fill session_variable field in the response.

  2. Dialogflow returns the response with the custom payload including session_variable field with capture_target = end_user_response

  3. An end-user sends a message.

  4. The CCAI Platform Server keeps the end-user message in step 3.

  5. The CCAI Platform Server will post all session variables which have been captured in the chat session to CRM as a comment when a virtual agent left from a chat.

Custom Payload Format

{
  "ujet": {
    "session_variable": {
      "capture_target": "end_user_response",
      "capture_key": "key"
    }
  }
}

The next consumer message immediately after a virtual agent sends a custom payload will be captured as a session variable with the key "key".

Capture from Intent Response

Flow

  1. The CCAI Platform Server requests the response to Dialogflow.

    1. Dialogflow may callback it to the customer's server by Fulfillment.

    2. The customer's server is supposed to fill session_variable field in the response.

  2. Dialogflow returns the response with the custom payload including session_variable field with capture_target = "payload".

  3. The CCAI Platform Server keeps payloadobject in step 2.

  4. The CCAI Platform Server will post all session variables which have been captured in the chat session to CRM as a comment when a virtual agent left from a chat.

Custom Payload Format

{
  "ujet": {
    "session_variable": {
       "capture_target": "payload",
       "payload": {
         "status": "Cancelled",
         "order_id": "12345"
       }
     }
  }
}

Custom Session Variable Upload on CRM

For each session variable, the server is supposed to gather all session variables internally then upload them on CRM when a virtual agent leaves.

CRM Message Example

###########################

Chat ID: 1
Menu ID: 1
Chatbot Platform: Platform Name
Chatbot Workflow: Workflow Name
Virtual Agent: Virtual Agent Name

###########################

Intent: Intent Captured from End User Response
Captured At: 2020-06-25 14:54:19

Captured Variables
request: Cancel Order

###########################

Intent: Intent Captured from Payload
Captured At: 2020-06-25 14:58:23

Captured Variables
status: Cancelled
order_id: #12345

###########################

Example

Scenario

Chat Message

Intent Response (Custom Payload)

Captured Session Variable

Virtual Agent: How can I help you?

[Button] Show My Orders

[Button] Cancel My Order

{
  "ujet": {
    "type": inline_button",
    "title": "How can I help you",
    "buttons": [
      {
        "title": "Cancel My Order",
        "action": "quick_reply",
        "reply_message": "cancel_order"
      }
    ]
  }
}

None

End-User: (Click "Cancel My Order" button

None

Virtual Agent: Can you provide the order id?

{
  "ujet": {
    "type": "text",
    "messages": [
      "Can you provide the order id?"
    ],
    "session_variable": {
       "capture_target": "end_user_response",
       "capture_key": "order_id"
    }
 }
}

None

End-User: Order id is #12345.

order_id: Order id is #12345.

Virtual Agent: Order #12345 is canceled.

Virtual Agent: Do you need anything else?

{
  "ujet": {
    "type": "text",
    "messages": [
      "Order #12345 is canceled."
      "Do you need anything else?"
    ],
    "session_variable": {
       "capture_target": "payload",
       "payload": {
         "order_id": "#12345",
         "order_status": "canceled"
   }
  }
 }
}
order_id: #12345
order_status: canceled

End-User: I would like to speak with a human agent.

None

Virtual Agent is left from the conversation.

{
  "ujet": {
     "type": "escalation"
  }
}   

None

Custom Session Variable Upload on CRM

From the scenario above, the following comment posts on the CRM ticket:

---------------------------------

Chat ID: 1
Menu ID: 1
Chatbot Platform: Platform Name
Chatbot Workflow: Workflow Name
Virtual Agent: Virtual Agent Name

--------------------------------

Intent: Intent Captured from End User Response
Captured At: 2020-06-25 14:54:19

Captured Variables
order_id: Order id is #12345.

--------------------------------

Intent: Intent Captured from Payload
Captured At: 2020-06-25 14:58:23

Captured Variables
order_id: #12345
order_status: canceled

--------------------------------

Custom payload: VA transfer to phone or SIP endpoint