External Contact Center Solutions
Your chatbot should be able to manage most of the queries and requests from end users. However, there may be some cases where an agent is required. You can integrate Answers not only with Infobip's contact center solution, Conversations, but also with third-party Contact Center as a Solution (CCaaS) or Customer Relationship Management (CRM) solutions. Example: You can use Answers chatbots with your ticketing system; or use the digital channels, which Answers supports, with your contact center solution.
This section explains how to integrate Answers with third-party CCaaS or CRM solutions. The integration uses the Conversations API, which is available free of charge with Answers.
Prerequisites
A translation layer that enables integration between the CCaaS solution and Conversations API. The translation layer must be able to handle the state of the Answers session and the equivalent entity on the CCaaS solution. Example: interaction, ticket, or case.
The translation layer can be one of the following:
- Part of the CCaaS solution. The CCaaS solution must support integration with Conversations API
- A dedicated middleware application that enables integration between the CCaaS solution and Conversations API
Technical Specifications
The following flow explains how to escalate an Answers session to an agent.
- Inform the CCaaS solution that there is a conversation that the solution needs to handle.
- Provide the conversation history and context to the CCaaS solution.
- Deliver all new inbound messages to the CCaaS solution.
- Enable the CCaaS solution to send outbound messages to the end user.
- Close the Answers session.
Infobip Conversations API
Mandatory APIs
The implementation uses the following mandatory APIs.
For Account Configuration
This API is used to subscribe to all inbound messages so that they can be transferred to the CCaaS solution.
Currently, this API does not support authentication. When subscribing to inbound messages, the resulting Post messages sent by Infobip do not include authentication credentials to gain access to the translation layer.
This API supports only one webhook configuration at a time. So, overwriting a webhook removes the previous configuration.
To Update a Conversation
This API is used to let Answers know that the Answers session should end because an agent will handle the conversation.
To Close a Conversation
This API enables a conversation to be closed when the agent has completed the interaction.
To Obtain Conversation History
This API is used to retrieve the history of the conversation so that it can be forwarded to the CCaaS solution.
To Handle Messages
This API is used by the translation layer to forward messages from the agent to the end user.
Optional APIs
The following optional APIs are used to customize or improve the implementation:
To Add Context to a Conversation
The following APIs are used in the chatbot to add tags that provide context to the conversation. This helps the translation layer identify the relevant queue, language, or campaign in the CCaaS solution to which the conversation must the routed.
To Handle Metadata
The following APIs are used in the chatbot to add metadata that provides context to the conversation for routing and prioritization. Use the relevant key:value pairs.
Implementation
Carry out the instructions in each of the following sections.
Setup to Forward Inbound Messages
After the chatbot hands over the conversation to an agent, you need to make sure that new inbound messages are forwarded from the Conversations API to the CCaaS solution.
Do the following:
- Configure the account (Update Account Configuration API) to send all new inbound messages to the translation layer.
- Configure the translation layer to store the authentication credentials for both Infobip and the CCaaS solution. This enables the translation layer to send and receive messages.
Identify Conversations that Need External Agents
Configure your chatbot such that it can transfer the conversation to an agent.
You can transfer to an agent in the following ways:
- Transfer to agent as a fallback: If the chatbot is unable to understand what the end user wants or the end user exceeds the defined number of unrecognized responses, you can transfer the chat to an agent as a fallback option. To transfer the chat, use the To agent option in the Fallback section of a chatbot element.
- Transfer to agent as part of the dialog: There may be complex situations where human intervention is required or cases where end users ask to speak to an agent. In such cases, use the To agent chatbot element to transfer the chat to an agent.
In the dialog that contains the To agent option or chatbot element, do the following:
- Add a Call API (API chatbot element) that informs the translation layer that the specific ConversationID must be routed to an agent.
- Add a Call API (API element) that updates Conversations API to set the agentId to null. This ends the Answers session. It prevents Answers from responding to further end user messages but leaves the conversation open.
Infobip recommends that you use tags or metadata to add context to the conversation. This helps the translation layer identify the relevant queue, language, or campaign in the CCaaS solution to which the conversation must the routed.
Hand Over to Agent
The translation layer receives the required information to pass the session from Answers (Conversations API) to the CCaaS solution. The translation layer needs to get additional information before forwarding the session to the CCaaS solution.
Configure the translation layer to do the following:
- Use Get Messages to obtain the history. The history contains a maximum of 1,000 messages.
- (Optional) Obtain tags and metadata from the conversation.
- Route the session content to the CCaaS solution.
- Link the external entity and conversation ID.
Handle the Conversation
After the session has been handed over to the CCaaS solution, all new inbound messages must be forwarded from the Conversations API.
- Translation layer: The account configuration webhook (Update Account Configuration API) enables the translation layer to receive and forward end user messages to the CCaaS solution.
- CCaaS solution: Do one of the following as applicable.
- If the CCaaS solution has a webhook to subscribe to agent messages, subscribe to the messages.
- If there is no webhook, the translation layer needs to poll the CCaaS solution to check whether the agent has sent any messages for open conversations.
Close the Conversation
The conversation must be closed to make sure that the end user can have new conversations with the chatbot. Otherwise, the chatbot cannot receive the end user's messages. If the CCaaS solution also does not expect these messages, the messages could be lost.
After the agent closes the conversation or an equivalent entity (Example: case, ticket, or interaction), the translation layer needs to use the Update Conversation API to close the conversation.