Handoff is the process of transferring an end user conversation from a Customer Experience Agent Studio (CX Agent Studio) agent to a human agent. When you create a conversation profile that uses both Agent Assist features and a CX Agent Studio agent, CX Agent Studio answers incoming voice calls and chat messages. When the end user escalates to a human agent, the CX Agent Studio agent becomes silent and Agent Assist creates a human agent participant so the conversation can continue. This process only works with the bidirectional API.
End session
The end_session tool contains the information that Gemini Enterprise for Customer Experience needs to successfully transfer an end user conversation from a CX Agent Studio agent to a human agent. The end_session tool consists of the following objects that customize your end users' transfer experience.
ESCALATION_MESSAGE: The text of the message that CX Agent Studio delivers to the end user in a voice call or chat.PHONE_GATEWAY_TRANSFER: The phone number to transfer a call to and how Gemini Enterprise for CX sends the SIP signal.LIVE_AGENT_HANDOFF: Whether or not the conversation is transferred to a human agent.
You can use the endSession parameter inside the LIVE_AGENT_HANDOFF object to tell your CX Agent Studio agent to end a voice or chat conversation. The bidirectional API relies on the endSession parameter to determine whether or not to terminate a conversation and the default value is False. If you're using Agent Assist, don't change the value of endSession. With the default value, Gemini Enterprise for CX transfers the conversation from your CX Agent Studio agent to Agent Assist to help the human agent. For example, if an end user says they want to speak to the billing agent, use the end_session tool as follows:
end_session( reason="Billing issue", session_escalated=True, params={
"ESCALATION_MESSAGE": "Transferring your call to a billing agent",
"PHONE_GATEWAY_TRANSFER": { "phoneNumber": "+15552420836", "useOriginatingTrunk": True },
"LIVE_AGENT_HANDOFF": { "endSession": False, "key": "value" } } )
If you're not using Agent Assist, change the value of endSession to True to end the conversation in CX Agent Studio.
Supported parameters
You can use the following parameters within each object of the end_session tool.
LIVE_AGENT_HANDOFF: Each parameter is optional.endSession: A boolean parameter that initiates session end and call hangup.sipRefer: A boolean that specifies if a SIP REFER should be used.uuiHeaders: A list of strings with user-to-user information headers.xHeaders: A map or object with custom SIP X-headers.
PHONE_GATEWAY_TRANSFERphoneNumber: A string that contains the destination number for the transfer.sipUri: A string that contains the SIP URI for the transfer.useOriginatingTrunk: A boolean that specifies whether to use the same trunk for the transfer.