Handoff flows
Main Flow
Flow
Customer initiates a conversation with the Chatbot.
Authentication
The customer can be authenticated or the chatbot can request customer details in an ad-hoc manner.
The conversation continues between the Customer and the Chatbot.
Escalation
Chatbot detects an escalation to a human Agent is necessary and creates a conversation in SentioCX.
The endpoint is documented here. Request body example:
{ "session": "session_unique_1234", "bot_id": "1035", "channel_type": "Web", "locale":"en-US", "customer_details": { "external_id": "cust_1501", "email": "john@gmail.com", "phone_number": "+40752875392", "name": "John Doe", "metadata": {} } }Chatbot sends an escalation message in the previously created conversation. The endpoint is described here: Messages. Message body example:
{ "type": "escalation", "session": "session_unique_1234", "id": "message_4", "timestamp": "2023-10-12T07:20:50.52Z", "text": "I will transfer you to an agent", "author": "bot", "data": { "intent_id": "1234", "sentiment_score":0.75, "transcript": [ { "id": "message_1", "timestamp": "2022-01-04T12:30:00Z", "text": "Hello", "author": "customer" }, { "id": "message_2", "timestamp": "2022-01-04T12:30:01Z", "text": "How can I help?", "author": "bot" }, { "id": "message_3", "timestamp": "2022-01-04T12:40:00Z", "text": "I want to cancel my contract", "author": "customer" } ] } }SentioCX replies with an Escalation Accepted message. Message body example:
{ "type": "escalation_accepted", "session": "session_unique_1234", "id": "message_5", "timestamp": "2023-10-12T07:20:51.52Z", "text": "One moment, we are searching a suitable live agent.", "author": "sentiocx" }Notes on the escalation sequence:
Note the session remains consistent across all messages.
The chatbot is the author for the escalation message.
The escalation message payload details:
intent_id: the id of the intent as known to the bot
sentiment_score: the customer sentiment score determined by the bot
transcript: the conversation history between the customer and the bot
This message represents an acknowledgement that the Handoff has been created and routing has started.
Strategies for for text field values:
Chabot uses its own message to communicate the escalation to the customer
The escalation text field value is the text the Chatbot sends to the customer to inform about the escalation
The chatbot may inform the customer before or after the escalation is accepted by SentioCX
Chatbot uses the message defined in Sentio Manager to communicate the escalation to the customer
The escalation text value can be any text
The escalation accepted message text value is the value defined in Sentio Manager and will be used by the Chatbot to inform the customer about the escalation
Handoff pairing phase
Predicted Wait time
SentioCX sends regularly a Predicted Wait Time message. Message body example:{ "type": "pwt", "session": "session_unique_1234", "id": "message_6", "timestamp": "2023-10-12T07:20:53.52Z", "text": "A live agent will be with you in in 2 minutes", "author": "sentiocx", "data": { "pwt": 115 } }Notes:
The frequency for PWT messages can be configured in Sentio Manager
The text value is customizable in the Responses section in Sentio Manager
SentioCX transforms the raw waiting time in seconds into a human friendly text
The Chatbot could ignore the text, process the raw pwt value and send a custom message to the customer
Customer message
In case the customer continues to send messages, the chatbot forwards these to SentioCX together with a sentiment assessment. Message body example:{ "type": "text", "session": "session_unique_1234", "id": "message_7", "timestamp": "2023-10-12T07:20:54.52Z", "text": "I have an urgent problem and nobody is helping me", "author": "customer", "data": { "sentiment_score": -1.5 } }Notes:
the sentiment score may show customer frustration. SentioCX considers the sentiment to adjust the Handoff ranking during pairing.
Agent paired
SentioCX routing pairs an Agent to the Handoff and proceeds with the creation of an interaction/ticket/case/conversation/etc. in the Customer Engagement Center (depending on the integration). Additionally, the full conversation transcript is transferred to the CEC.
SentioCX informs the chatbot that the agent is connected to the conversation through an Agent Paired message. Message body example:
{ "type": "paired_to_agent", "session": "session_unique_1234", "id": "message_8", "timestamp": "2023-10-12T07:25:54.52Z", "text": "You are now talking to Duncan", "author": "sentiocx", "data": { "external_agent_id": "external_agentid_2345", "agent_name": "Duncan" } }Notes:
The text value is defined in the Response section in Sentio Manager. The chatbot can use this as-is to inform the customer that the agent is connected.
The chatbot may choose to inform the customer using a different text. The agent name and identifiers are present in the massage payload.
The external_agent_id value corresponds to the agent identifier in the agents platform (CEC).
Conversation between Customer and Agent
Customer and Agents exchange messages in the conversation.
Example of message sent from the Customer:
{ "type": "text", "session": "session_unique_1234", "id": "message_20", "timestamp": "2023-10-12T07:39:54.52Z", "text": "Sounds great.", "author": "customer", "data": { } }Example of message sent from the Agent:
{ "type": "text", "session": "session_unique_1234", "id": "message_21", "timestamp": "2023-10-12T07:39:54.52Z", "text": "Happy to hear that.", "author": "agent", "data": { } }Escalation end
The escalation may be ended from the Agent or from the Customer side. This flow highlights the former. See other flows for conversations ended by customers.
SentioCX is informed the Agent ended the conversation through the CEC connector and sends an Escalation Complete type message to the chatbot. Message body example:
{ "type": "escalation_complete", "session": "session_unique_1234", "id": "message_50", "timestamp": "2023-10-12T07:50:54.52Z", "text": "Agent left", "author": "sentiocx", "data": { "resolution":"agent_left" } }Notes:
the resolution field value is "agent_left"
the text field value is configurable in the Responses section in Sentio Manager app
The chatbot informs the customer that the escalation has ended.
Updating a handoff
The chatbot can update the in progress handoff parameters when it detects changes in customer sentiment, intent or urgency. The chat performs the update by sending a new Escalation message.
SentioCX handles subsequent Escalation messages depending on the phase of the in progress escalation:
Pairing: new Escalation message is handled as an update to the in progress escalation. The intent_id and sentiment_score fields are updated, and the transcript is merged into the existing message set of the conversation.
Conversation in progress with Agent: a best effort is made for the transcript to merge new messages into the existing conversation (this use case accommodates potential inconsistencies or errors in transmitting transcript messages).
Other: the message is not processed.
SentioCX always responds with an Escalation Accepted message.
Notes:
the handoff_id field value is the same in both Escalation Accepted messages. SentioCX allows a single active escalation at a given moment in time. This might change in the future with the emergence of advanced conversation models like Human in the Loop.
Agent not found
Escalation Complete message body example:
Notes:
the resolution field value is "no_agent_found"
the text field value is configurable in the Responses section in Sentio Manager app
Conversation ended by customer
The conversation may be ended from the customer, either before or after agent pairing.
Conversation ended by customer before pairing
SentioCX ends the escalation immediately and sends an Escalation Complete message.
Escalation Complete message body example:
Notes:
the resolution field value is "customer_left"
the chatbot may choose to process the message or not
the text field value is configurable in the Responses section in Sentio Manager app
Conversation ended by customer after paring
SentioCX processes the message and initiates the escalation termination, including the CEC side. The escalation is ended only after the interaction is ended in the CEC.
Escalation Complete message body example:
Notes:
the resolution field value is "agent_left"
the chatbot may choose to process the message or not
the text field value is configurable in the Responses section in Sentio Manager app
Conversation resolved by chatbot
SentioCX provides the possibility to end an escalation as resolved by the chatbot. It is up to the chatbot to make best use of this feature.
Escalation Complete message body example:
Notes:
the resolution field value is "resolved_by_bot"
the chatbot may choose to process the message or not
the text field value is configurable in the Responses section in Sentio Manager app
Outside Business Hours
The escalation may be triggered outside CEC business hours, or the business hours end when an escalation is in progress in pairing phase.
Escalation triggered outside business hours
SentioCX does not proceed with the escalation and immediately sends an Escalation Complete message.
Escalation Complete message body example:
Notes:
the resolution field value is "outside_business_hours"
the text field value is configurable in the Responses section in Sentio Manager app
the chatbot may choose to send notifications to the customer before and after the escalation
End of business hours - conversation in pairing
Escalation Complete message body example:
Notes:
the resolution field value is "outside_business_hours"
the text field value is configurable in the Responses section in Sentio Manager app
Re-escalate a conversation
Sometimes it is necessary to escalate a conversation once again. Once an escalation has ended and control is back to the chatbot, the customer and chatbot can resume the conversation which leads to a new escalation.
The new escalation follows the same recipe.
Notes:
the handoff_id field value is different for the second Escalation Accepted message
Dynamic Intent deactivation
Dynamic Intent deactivation is a method to throttle the incoming handoffs volume in the situations when defined SLAs are not met. The intents are reactivated when SLA numbers are back to normal.
The event of intent deactivation has impact on both new escalations, and existing escalations in pairing state:
New handoffs are not accepted for the deactivated intent
Existing handoffs (for the deactivated intent) are terminated and the chatbot takes over control
Intent deactivation and new handoffs
Escalation Complete message body example:
Notes:
the resolution field value is "intent_deactivated"
the text field value is configurable in the Responses section in Sentio Manager app
Intent deactivation while handoff in pairing
Escalation Complete message body example:
Notes:
the resolution field value is "intent_deactivated"
the text field value is configurable in the Responses section in Sentio Manager app
Customers with open cases
The flow covers the scenario where a handoff is finished, but there is no final resolution on the actual issues raised by the customer. In this case, the best user experience is to take the customer directly to the agent, and skip the bot.