Supervisor assist performs the following useful actions to ensure that customer service conversations with both Dialogflow CX playbook live agents and generative agents are resolved or escalated successfully.
- Scans all conversations for specific escalation triggers.
- Automatically flags conversations that meet escalation trigger criteria.
- Displays only flagged conversations to an assigned supervisor.
- The supervisor monitors the conversations and intervenes as necessary.
Before you begin
To use supervisor assist, you need access to the following resources.
- A working playbook live or generative agent that uses the bidirectional streaming API and a connected phone number.
- A project with the
CCAI_GAvisibility label, a Pub/Sub topic, and a conversation profile.
Step 1: Create or choose a Google Cloud project
Choose a project that will host your Dialogflow CX playbook live or generative agent, and note the project ID.
Step 2: Enable Dialogflow API
Follow these steps to enable the Dialogflow API for your project.
Navigate to Google Cloud console.
Select your project.
Click APIs & Services > +Enable APIs & services.
Click Dialogflow API > Enable.
Step 3: Create or choose an agent
Supervisor assist requires a working playbook live or generative agent that uses the bidirectional streaming API. The feature scans and monitors all the agent's active conversations for escalation signals.
You can build your own playbook live agent or generative agent, import an agent from a prior export, or choose an existing agent. Take note of your agent's name and ID.
Step 4: Setup escalation
When you create or choose an agent, you must also setup escalation which tells the agent how to transfer a conversation to a human when the agent can't help. A supervisor can also click Transfer to agent to initiate an escalation.
Setup playbook live agent escalation
Use the Conversational Agents console and Python code to set up escalation for a playbook live agent.
Navigate to the Conversational Agents console and select your project.
Navigate to Conditional actions.
Click +New logic.
For the trigger, choose Event and enter escalate-to-agent.
For the action, select Provide a response to the end user.
Add an Agent dialogue for the response.
Add a phone number for the Telephony transfer call.
Click Update.
Click an action.
Navigate to Define actions with Python (advanced).
Enter a script like the following example to define your agent's behavior.
@EventHandler(event = "escalate-to-agent") def _supervisor_triggered_call_transfer(): # the below message can be changed respond("Let me get you to a live agent who can assist you.") _escalate_to_agent_fn() def _escalate_to_agent_fn(): # replace with your transfer logic done() return
Setup generative agent escalation
Follow these steps to setup escalation for your generative agent.
Navigate to the generative agent console and select your project and app.
Add the following prompt to your
root_agentinstruction.- customer asking for a live agent, execute the
end_sessiontool withsession_escalated=true
- customer asking for a live agent, execute the
Add the
end_sessionsystem tool to your root agent and all sub agents.Create an
ESCALATION_MESSAGEvariable for the interactive voice response (IVR) before call transfer.Create a
PHONE_GATEWAY_TRANSFERvariable with a phone number like the following.{ "phone_number": "+1yyy-yyy-yyyy" }
See the generative agents documentation for details about the end session tool.
Step 5: Attach a phone number to your agent
Supervisor assist also requires a working phone number attached to the playbook live or generative agent. Follow these instructions to attach a phone number to your playbook live agent. Follow these instructions to attach a phone number to your generative agent. When you attach a phone number, the agent also creates a conversation profile. Note the conversation profile name and ID.
Follow these optional steps if you already have a phone number attached to your playbook live or generative agent.
- Run the following command to map your existing phone number, name, and ID to the telephony number.
curl -X GET
-H "Authorization: Bearer "$(gcloud auth print-access-token)"
-H "X-Goog-User-Project: your-project-id"
-H "Content-Type: application/json; charset=utf-8"
https://dialogflow.googleapis.com/v2beta1/projects/{your-project-id}/locations/{your-region-id}/phoneNumbers Update the phone number to use your conversation profile.
Example:
{ "phoneNumber": { "name": "projects/your-project-id/locations/global/phoneNumbers/your-phone-number", "conversationProfile": "projects/your-project-id/locations/your-region-id/conversationProfiles/your-conversation-profile-id" }, "updateMask": "conversationProfile" }
Step 6: Create a Pub/Sub topic
Pub/Sub is a messaging service where the senders of messages are decoupled from the receivers of messages. Pub/Sub topics are useful for providing conversation monitoring metrics and alerts. Follow the Pub/Sub instructions to create a topic and note the topic ID.
Step 7: Create a summarization generator
Summarization is an AI-based Agent Assist feature that automatically summarizes customer service conversations. Follow the summarization instructions to create a generator and note the generator ID.
Step 8: Configure your conversation profile
Follow these steps to verify that the conversation profile associated with your playbook live or generative agent exists.
Navigate to the Agent Assist console and select your project.
Click the conversation profile associated with your playbook live or generative agent.
Enable Conversation summarization (generator) and enter the name of the generator you created.
Confirm that Enable virtual agent is enabled with your playbook live or generative agent's name.
Navigate to Telephony settings and enable Use Bidirectional Streaming API.
Select the following options for the SIP configuration:
- Create Conversation On The Fly
- Use Multi Sdp Ports
- Allow Virtual Agent Interaction
Click Save.
Step 9: Gather configuration details
Gather the following details.
- Google Cloud project ID
- Playbook live agent ID or generative agent ID
- Conversation profile ID
- Pub/Sub topic name
Step 10: Add your project to the allowlist
To add your project to the allowlist, file an issue with the customer engagement team and include the details you gathered in the previous step.
Step 11: Choose sentiment or AI coach
You must decide whether to use sentiment analysis, AI coach, or both to monitor your conversations. After you create an agent and a conversation profile, follow the instructions to choose sentiment or AI coach and add your decision to your conversation profile.
Step 12: Configure rules to monitor conversations
Follow the instructions to configure escalation rules that determine when to alert a human supervisor during a conversation.
Step 13: Monitor real time conversations
Follow these steps to monitor your conversations.
- To open the monitoring simulator, enter the following link in your browser with your project ID:
https://agentassist.cloud.google.com/projects/project-id/locations/location-id/human-supervisor
- Call the conversational agent you configured.
- Express negative sentiments during the conversation.
- Notice the conversation is listed on the dashboard.
Monitoring desktop
Agent Assist provides a monitoring desktop for supervisors to monitor conversations. Multiple participants can launch the monitoring desktop and make themselves available to monitor calls. When a call begins, supervisor assist assigns it to one participant after another until all participants have contributed.
To access the monitoring desktop, you need the following roles:
Viewerdialogflow.virtualAgentMonitoringSupervisordialogflow.processor
Follow these instructions to monitor calls with the monitoring desktop.
- To open the monitoring desktop, enter the following link in your browser with your project ID:
https://agentassist.cloud.google.com/human-supervisor/projects/project-id/locations/location-id/dashboard
- Click Make me available.
- Call the agent you configured.
- Express negative sentiments during the conversation.
- Notice the conversation is listed on the dashboard when a call is routed to you.
Change the agent
Within a conversation profile, you can change which playbook live or generative agent that supervisor assist monitors. Follow these steps to change the agent.
Navigate to the Agent Assist console and select your project.
Click Conversation profiles.
Select the conversation profile that you added to the allowlist.
Navigate to Choose to use Dialogflow.
Enable Enable virtual agent.
Click close Close to remove the existing playbook live or generative agent name, and enter the name of the agent you want to monitor.