SentioCX Developers Hub Help

Handoff flows

Main Flow

CustomerChatbotSeamless Handoff APICECAgentalt[Authentication available]Conversation continuesCustomer is waiting while SentioCX is pairing the Handoffloop[Until Agent is paired]par[Predicted Wait Time updates][Customer messages]Customer-Agent conversationInteraction closed by AgentHelloHow can I help you?Initiate authenticationAuthenticationRequest personal detailsPersonal detailsEscalation to Human is requiredcreate ConversationConversation createdSend Escalation message[Webhook] Escalation Accepted messageStart pairing"I will transfer you to an agent"[Webhook] Predicted Wait Time message"An Agent will be with you in 2 minutes""I have a new message"Send Text messageAgent pairedCreate and assign interaction to agentAssign interaction[Webhook] Paired to Agent message"You are connected with agent""Message from Agent""Message from Agent"[Webhook] Text message"Message from Agent""New message"Text message"New message""New message"Interaction closed[Webhook] Escalation Complete message. Reason: agent_left"Agent left. Is there anything else I can help you with?"CustomerChatbotSeamless Handoff APICECAgent

Flow

  1. Customer initiates a conversation with the Chatbot.

  2. Authentication


    The customer can be authenticated or the chatbot can request customer details in an ad-hoc manner.

  3. The conversation continues between the Customer and the Chatbot.

  4. 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

  5. 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.

  6. 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).

  7. 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": { } }
  8. 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.

ChatbotSeamless Handoff APIUpdate escalationcreate ConversationConversation createdSend Escalation message[Webhook] Escalation Accepted messageSend Escalation messageUpdate escalation[Webhook] Escalation Accepted messageChatbotSeamless Handoff API

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

CustomerChatbotSeamless Handoff APIPairing is in progressPairing is not possible. Not agent is availableContinue conversationcreate ConversationConversation createdSend Escalation message[Webhook] Escalation Accepted message[Webhook] Escalation Complete message. Resolution: no_agent_foundCustomerChatbotSeamless Handoff API

Escalation Complete message body example:

{ "type": "escalation_complete", "session": "session_unique_1234", "id": "message_50", "timestamp": "2023-10-12T07:50:54.52Z", "text": "Sorry, we did not find an agent for you.", "author": "sentiocx", "data": { "resolution":"no_agent_found" } }

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.

CustomerChatbotSeamless Handoff APIEscalation in progress. Pairing is in progress.Close or timeoutCustomer Left messageEnd escalation[Webhook] Escalation Complete message. Resolution: customer_leftCustomerChatbotSeamless Handoff API

Escalation Complete message body example:

{ "type": "escalation_complete", "session": "session_unique_1234", "id": "message_50", "timestamp": "2023-10-12T07:50:54.52Z", "text": "The customer has left the conversation.", "author": "sentiocx", "data": { "resolution":"customer_left" } }

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.

CustomerChatbotSeamless Handoff APICECEscalation in progress, Customer - Agent conversationClose or timeoutCustomer Left messageNotify customer leftInteraction closedEnd escalation[Webhook] Escalation Complete message. Resolution: agent_leftCustomerChatbotSeamless Handoff APICEC

Escalation Complete message body example:

{ "type": "escalation_complete", "session": "session_unique_1234", "id": "message_50", "timestamp": "2023-10-12T07:50:54.52Z", "text": "The agent has left the conversation.", "author": "sentiocx", "data": { "resolution":"agent_left" } }

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.

ChatbotSeamless Handoff APIEscalation in progress. Pairing is in progress.Resolved By Bot messageEnd escalation[Webhook] Escalation Complete message. Resolution: resolved_by_botChatbotSeamless Handoff API

Escalation Complete message body example:

{ "type": "escalation_complete", "session": "session_unique_1234", "id": "message_50", "timestamp": "2023-10-12T07:50:54.52Z", "text": "The chatbot has resolved the conversation.", "author": "sentiocx", "data": { "resolution":"resolved_by_bot" } }

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.

CustomerChatbotSeamless Handoff APIopt[Chatbot informs the customer]Escalation not possible. Outside business hours.opt[Chatbot informs the customer]Continue conversationcreate ConversationConversation createdSend Escalation message"I will forward you to a human agent"[Webhook] Escalation Complete message. Resolution: outside_business_hours"Thank you for reaching out to us. Our contact center is currently closed."CustomerChatbotSeamless Handoff API

Escalation Complete message body example:

{ "type": "escalation_complete", "session": "session_unique_1234", "id": "message_50", "timestamp": "2023-10-12T07:50:54.52Z", "text": "Thank you for reaching out to us. Our contact center is currently closed. We'll get back to you when we reopen.", "author": "sentiocx", "data": { "resolution":"outside_business_hours" } }

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

CustomerChatbotSeamless Handoff APIPairing is in progressPairing is not possible. End of business hours.Continue conversationcreate ConversationConversation createdSend Escalation message[Webhook] Escalation Accepted message[Webhook] Escalation Complete message. Resolution: outside_business_hours"Thank you for reaching out to us. Our contact center is currently closed."CustomerChatbotSeamless Handoff API

Escalation Complete message body example:

{ "type": "escalation_complete", "session": "session_unique_1234", "id": "message_50", "timestamp": "2023-10-12T07:50:54.52Z", "text": "Thank you for reaching out to us. Our contact center is currently closed.", "author": "sentiocx", "data": { "resolution":"outside_business_hours" } }

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.

CustomerChatbotSeamless Handoff APIEscalation endsEscalation requiredcreate ConversationConversation createdSend Escalation message[Webhook] Escalation Accepted message"Message""Message"Send Escalation messageUpdate escalation parameters[Webhook] Escalation Accepted messageCustomerChatbotSeamless Handoff API

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

CustomerChatbotSeamless Handoff APIcreate ConversationConversation createdSend Escalation message[Webhook] Escalation Complete message. Resolution: intent_deactivatedCustomerChatbotSeamless Handoff API

Escalation Complete message body example:

{ "type": "escalation_complete", "session": "session_unique_1234", "id": "message_50", "timestamp": "2023-10-12T07:50:54.52Z", "text": "We're sorry but we can't process your request at the moment. Please try again later.", "author": "sentiocx", "data": { "resolution":"intent_deactivated" } }

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

CustomerChatbotSeamless Handoff APIEscalation in progressintent deactivated[Webhook] Escalation Complete message. Resolution: intent_deactivated"We're sorry but we can't process your request at the moment. Please try again later."CustomerChatbotSeamless Handoff API

Escalation Complete message body example:

{ "type": "escalation_complete", "session": "session_unique_1234", "id": "message_50", "timestamp": "2023-10-12T07:50:54.52Z", "text": "We're sorry but we can't process your request at the moment. Please try again later.", "author": "sentiocx", "data": { "resolution":"intent_deactivated" } }

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.

CustomerChatbotSeamless Handoff APICECInteraction closed by AgentCustomer returns for more discussions on the issuePairing in progres.alt[Original Agent is available]Interaction closed[Webhook] Escalation Complete message. Reason: agent_left"Agent left. Is there anything else I can help you with?"MessageCheck in progress issue (ticket/case/etc.)Issue in progressSend Escalation message[Webhook] Escalation Accepted messageCheck Sticky AgentDirect pairing.Start pairing using original intentAgent pairedPaired to Agent messageCustomerChatbotSeamless Handoff APICEC
Last modified: 15 March 2024