Integrate AI Agent with Voice and Digital channels
Once you've created and configured your AI agents in the Webex AI Agent Studio platform, the next step is to integrate them with the voice and digital channels. This integration allows the AI agents to handle both voice-based and digital conversations with your customers, providing a seamless and interactive user experience.
Set up a flow
1 |
Sign in to Control Hub, choose . |
2 |
Click Manage Flows and then click Create Flows. |
3 |
In the Flow Name field, enter a unique name and click Start Building Flow. The Flow Designer window appears. |
4 |
Enable the Validation toggle to activate the flow validation. Make sure that there are no errors in your flow. |
5 |
Click Publish to publish the flow. If the flow is published successfully, you see the confirmation message. |
Set up the voice channel
1 |
Create an entry point for the voice channel. |
2 |
Assign the Routing Flow to the entry point. For more information, see the article Set up a channel. |
Configure AI agents in flow
The Virtual Agent V2 activity provides a real-time conversational experience for your contacts. You can add the Virtual Agent V2 activity to the call flow to handle speech-based AI-enabled conversations. When a caller speaks, the system matches the speech to the best intent in the AI agent. Further, it assists the caller as part of the Interactive Voice Response (IVR) experience.
OutcomesIndicates the output paths for the activity that occurs based on the outcome of the conversation between the virtual agent and the caller.
-
Handled—The outcome is triggered when the virtual agent execution is completed.
-
Escalated—The outcome is triggered when the call is required to be escalated to the human agent.
Indicates the output path of the activity for any error that occurs during the conversation between the virtual agent and the caller.
Errored—The flow takes this path in any error scenarios.
1 |
Drag and drop the Virtual Agent V2 activity from the Activity Library to the main flow canvas. |
2 |
In General Settings, perform the following actions:
|
3 |
In the Conversational Experience settings,
|
4 |
Use the following Activity Output Variables to handle various use cases:
|
The following is the configuration flow for integrating AI agents with digital channels and enabling them to handle digital interactions with the customers.
Prerequisites
- Configure your digital channel. Webex Connect and Webex Contact Center integration currently supports six channels, namely WhatsApp, SMS, Email, Facebook Messenger, Apple Messages for Business, and Live Chat. For more information to configure the channel assets for each of these channels, see Channel Asset Configuration.
- Create a flow on Webex Connect. For more information, see Creating a Flow on Webex Connect.
Add AI agents to your flow
You can use an AI Agent node to answer specific queries from a corpus or knowledge base. You can also enable multiturn conversations where the AI agent can ask follow-up questions, understand context, and provide personalized responses.
Simply drag and drop the AI Agent node onto your visual flow builder to get started. This node helps you use scripted and autonomous AI agents configured within the Webex AI Agent Studio platform.
Configure input and output variables in AI Agent node
The AI Agent node contains two methods:
-
Process Message—This method allows you to send user messages to the selected agent and get agent responses back.
-
Close session—This method allows you to close a session in the AI agent. In certain scenarios, it may be necessary to close an existing AI Agent session and initiate a new one. This can be achieved using a specific method within the AI Agent node. For example, if a session remains inactive for a specified period, the system closes the session automatically to optimize resources.
- In the Process Message method, configure the following input variables in the Process
Message method:
- Agent type—The type of agent to be used in the flow—whether scripted or autonomous.
- Agent—The agent that is used to process the user message and
get a response.
You can see the AI agents that you have access to in the Webex AI Agent Studio. For more information on managing users and agents in Webex AI Agent Studio, see Managing teammates.
- Message—The variable name that contains the incoming customer message to be sent to the chosen AI agent.
- Language—If the chosen AI agent is multilingual, you can
choose the language of the incoming message in the Language drop-down list. The
drop-down list is populated based on languages in AI agent settings.
For agents with a single language, this drop-down list is disabled.
- Channel—The name of the channel from which the system receives the customer's message.
- User identifier—Next to the Channel drop-down list, the name of the field changes based on the chosen channel. The user's unique identifier for the chosen channel should be provided here.
- Custom Parameters (optional)—Additional information about the
customer can be passed to the Webex AI Agent Studio as a key value pair. This information is associated with the user's profile in \
and can be used for later conversations. For example, you can specify whether a user
is a new customer or an existing customer.
Keys passed as
Customer Parameters
are accessible as ${consumerData.extra_params.<your_key>} in agent responses. - Message Parameters (optional)—Additional information about
the current exchange can be passed to the Webex AI Agent Studio as a key value pair.
This message isn’t stored and is only available for use in the next agent response. Keys passed as
Message Parameters
are accessible as ${extra_params.<your_key>} in agent responses.
-
Configure the following output variables in the Process Message method:
-
TextResponse—The text output configured within the AI agent; works only if no other type of rich/special elements is present. Also for multiple text items in the response, returns the first one.
-
FullResponse —The full response with all rich elements and multiple messages present in the output from the agent. Sends information as an array.
-
Datastore —A SON/dict of all user-defined sessions variables within the agent.
-
TransactionId —The transaction id for the request in Webex AI Agent Studio.
-
SessionId—The session/conversation id in Webex AI Agent Studio.
-
ConsumerId —The customer id in Webex AI Agent Studio.
-
MessageMetadata —The metadata associated with the current response from the configured agent.
-
SessionMetadata —The metadata associated with the session for the current response from the configured agent.
-
ResponsePayload —The complete response payload from Webex AI Agent Studio .
-
- Configure the following input variables in the Close Session method:
- Agent—The agent that is used to process the user message and
get a response.
You can see the AI agents that you have access to in the Webex AI Agent Studio. For more information on managing users and agents in Webex AI Agent Studio, see Managing teammates.
- Session ID—The AI agent session to be closed. Session ID is available as an output variable of the Process message method.
- Agent—The agent that is used to process the user message and
get a response.
Node Outcomes
You can see the list of possible node outcomes for this node. You can customize the node labels using the Edit (pencil) icon. The node exits through one of the node edges corresponding to the outcome of the node. Each AI Agent node corresponds to a node outcome. The following are the node outcomes:
- Error (Red)—indicates the following:
-
onError—when the agent hasn’t responded with a message.
-
onInvalidCustomerID—when a customer identifier is missing.
-
onInvalidMessage —when the message value is missing.
-
- Success (Green)—indicates the following:
-
onSuccess—when the agent responds with a message.
-
onAgentHandover—when the agent raises a request to handover to the agents.
-
- Timeout (Yellow/Amber)—indicates the following:
-
onTimeOut—when the agent hasn’t responded in not more than 15 seconds.
-