Use AI agents for customer interactions
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.
The following sections detail the configuration flow for integrating AI agents with the voice channel, enabling them to manage voice-based customer interactions effectively.
Prerequisites
- Create and configure the AI agents. For more information, see Set up scripted AI agent and Set up autonomous AI agent sections in the Webex AI Agent Studio Administration guide.
- Set up the voice channel:
- Create an entry point for the voice channel.
- Assign the routing flow to the entry point. For more information, see the article Set up a channel.
- Set up a flow. For more information, see the Create and Manage Flows section in the Flow Designer article.
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.
OutcomesThe outcome of the conversation between the caller and virtual agent determines this output path.
-
Handled—The outcome is invoked when the virtual agent execution is completed.
-
Escalated—The outcome is invoked when the call is required to be escalated to the human agent.
Any error that occurs during the conversation between the virtual agent and the caller determines this output path.
Errored—The flow takes this path in any error scenarios.
- Drag and drop the Virtual Agent V2 activity from the Activity Library to the main flow canvas.
- In General Settings, perform the following actions:
- In the Activity Label field, enter a name for the activity.
- In the Activity Description field, enter a description for the activity.
- In the Conversational Experience settings,
- For scripted AI agents:
- Select Webex AI Agent Scripted from the Contact Center AI Config drop-down list.
- Select one of the published scripted agents under the Virtual Agent drop-down list.
- For autonomous AI agents:
- Select Webex AI Agent Autonomous from the Contact Center AI Config drop-down list.
- Select one of the published autonomous agents under the Virtual Agent drop-down list.
- For scripted AI agents:
- In the State Event settings, enter the custom event name and the data in the
Event Name - Event Data columns. The State Event is a mechanism to trigger the
event handler that is configured on the agent bot. In the agent bot, you can configure how
the event must be handled.
-
Event Name–(optional) Indicates the name of the event that is defined on the integrated third-party AI platform.
-
Event Data–(optional) Indicates the JSON data that the system sends (as part of the defined event name) to the integrated third-party AI platform.
You can specify the event name and the data in the form of a static value or expression. For expressions, use this syntax:
{{ variable }}
. The following is an example of the state event that is configured to greet the caller with a custom welcome message.Event Name:
CustomWelcome
Event Data:
{"Name": "John"}
-
- Use the following Activity Output Variables to handle various use cases:
- VirtualAgentV 2.TranscriptURL—Stores the URL that points to the transcript of the conversation between the AI agent and the caller.
-
VirtualAgentV2.MetaData—Stores the JSON data that the system receives from the agent as part of the fulfillment or handling custom event. You can use this data to build more business logic in the flow builder.
-
VirtualAgentV2.StateEventName—Stores the name of the custom event that the system receives from the agent bot after the system triggers a custom state event.
Configure custom events
In the voice channel, custom events allow the flow designer to orchestrate complex interactions with the AI agent. This is particularly useful when fulfilling intents requires actions such as retrieving data from external systems or making calls to third-party APIs. The flow designer implements the necessary logic for these fulfillment actions.
The following sections outline the configuration flow for integrating AI agents with digital channels and enabling them to handle digital interactions with the customers.
Prerequisites
- Create and configure the AI agents. For more information, see Set up scripted AI agent and Set up autonomous AI agent sections in the Webex AI Agent Studio Administration guide.
- Configure your digital channel. Webex Connect and Webex Contact Center integration currently support 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.
Configure AI agents in flow
You can use an AI Agent node to answer specific queries from a corpus or knowledge base. You can also enable multiturn conversations. 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.
Configure input and output variables in AI Agent node
The AI Agent node contains two methods:
-
Process Message—Allows you to send user messages to the selected agent and get agent responses back.
-
Close session—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. It 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 used in the flow—whether scripted or autonomous
- Agent—The agent that processes the user message and gets 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 containing the incoming customer message 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. We populate the drop-down list based on languages in AI agent settings.
We disable this drop-down list for agents with a single language.
- Channel—The name of the channel from which the system receives the customer's message.
- User identifier—The user's unique identifier of the user for the chosen channel must be provided here.
- Custom Parameters (optional)—You can pass additional information about the customer to the Webex AI Agent Studio as a key value pair. We associate this information with the user's profile and use it 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)—You can pass additional information about the current exchange to the Webex AI Agent Studio as a key value pair.
We don’t store this message and it’s 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 or special elements is present. Also, for multiple text items in the response, the first text item is returned.
-
FullResponse —The full response with all rich elements and multiple messages present in the output from the agent.
-
Datastore —A JSON/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 who processes the user message and gets 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—We close the AI agent session. Session ID is available as an output variable of the Process message method.
- Agent—The agent who processes the user message and gets 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. Here’s a list of 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.
-