Configure Fulfillment Flows for AI Agent Actions
This document outlines the procedure for configuring fulfillment flows for AI Agent actions on Webex Connect.
Introduction
This document outlines the procedure for configuring fulfillment flows for AI Agent actions on Webex Connect and the steps to select AI Agent-triggered fulfillment flows within the Webex AI Agent Studio. When an AI Agent action is executed on the Webex AI Agent Studio, it triggers the selected flow on Webex Connect. By default, Webex Connect activates a notification mechanism for flows that begin with an AI Agent as the Start node. Upon completion of the flow execution, the outcome is communicated to the AI Agent, accompanied by the payload specified in the flow outcome settings.
Configure AI Agent Fulfillment Flow
Steps to create an AI Agent fulfillment flow:
-
Click on the preferred Service from the Services dashboard.
-
Click the Create Flow button from the Services page.
-
Enter the Flow Name.
- Under Method, select New Flow as the Flow option. You can also Copy from existing or Upload a new flow.
When constructing an AI Agent fulfillment flow, ensure that whether you are copying from an existing flow or uploading a new one, the AI Agent should be set as the start node. - If you are building a new flow, select the Start from Scratch option to create a flow from the beginning and click on Create to proceed.
- Under Method, select New Flow as the Flow option. You can also Copy from existing or Upload a new flow.
-
Select AI Agent Trigger category as the Start node.
Note
If you change the start node, the notification set from the flow outcome will be disabled and the configured payload in the start node will get deleted automatically. The following warning message is displayed as shown below:
-
Once you choose AI Agent as the Start node, you will find the event auto-populated as “Trigger from AI Agent to initiate flow“.
In the configuration popup, you can observe an endpoint URL. The Webex AI Agent Studio uses this URL to trigger the fulfillment flow on Webex Connect. Please note that the URL is protected by Webex CI authentication.
A sample input JSON is provided by default in the Provide sample JSON and you can update the sample JSON, which is available in the Webex AI Agent Studio. For more information, refer to and click Parse to view the parameters of the sample payload as output variables. Additionally, you can configure conditions on the payload, enabling conditional triggering to be achieved, which means the flows will be invoked only when the conditions are met.Note
The use of Waiting Nodes like Delay, Social hour, Receive Node, and Call Workflow node is restricted because the AI Agent flow must complete execution within 5 minutes. If the execution exceeds 5 minutes, the journey fulfillment response will not be received by the AI Agent causing unexpected issues in AI Agent Action fulfillment.
-
Build your flow by dragging and dropping the nodes.
-
The AI Agent is notified of flow completion. By default, the notification for AI Agent is enabled under the flow setting with the default payload. You can update the payload shared with the AI Agent on flow completion.
Under Flow Settings, click on Flow Outcomes.In the Flow Outcomes, open the ‘Last Execution Status’ Outcome. The ‘Notify AI Agent’ radio button is enabled by default for the start node with 'AI Agent’ as the trigger.
You can either use Key and Value to send simple JSON or click Paste Json to send a payload that has an array in the JSON. TransactionID, service name, status code, and flow name are default variables provided for key and value. You can add more or delete the previous one as required. For the key, you can provide the key name, and for the value, you can give the value, or you can click on the variable from the Input variables panel to get populated. This payload would be sent to the AI Agent after the execution of the flow.
Note
- Last Execution Status captures the last status of node outcome and doesn’t require a mapping between node event and flow outcome in the End pop up screen. Last Execution Status automatically captures the last node event and sends a notification to AI Agent (given the AI Agent notification is not disabled).
- Disabling the outcome will prevent the AI Agent from receiving notifications, the same is explained in a toast message appearing on the screen as illustrated below. It is essential to enable notifications for the AI Agent; otherwise, the AI Agent will not receive the fulfillment outcome. If you intend to disable the notification, ensure you comprehend the implications.
You may toggle on notify to restore the notification. This will retrieve your last configured payload or key-value information.
-
Click Make Live to publish the flow live. Before going live, make a few settings.
- Select the asset that is used in the flow.
- Enter the Comments for the flow.
-
Click Make Live.
Upon completion of flow execution, the AI Agent will be notified of the flow outcome. The payload you have configured in the flow setting screen will be used in the notification. For more information, please refer to the notification section.
Fulfillment Flow Selection in Webex AI Agent Studio
Steps to select a flow in Webex AI Agent Studio:
-
Log in to Webex AI Agent Studio by crosslaunching from Control Hub.
-
Launch the agent. Go to Actions. Select the Action for which you want to configure the fulfillment flow.
-
Scroll down to Webex Connect Flow Builder Fulfillment section on the Actions page.
-
Select a service that is configured in the Webex Connect client workspace. This will enable you to view a list of the selected service's flows, where the start node is the AI Agent.
Note
The Webex AI Agent Studio can only access service and flows configured within the Client-level workspace.
-
Select a flow from the dropdown. When the action executes, the selected flow in Webex Connect, the outcomes will be notified to the AI Agent.
Configure the Flow Outcomes for AI Agent in Webex Connect
-
Click on Flow Settings on the Flow Builder page.
-
Click Flow Outcomes to configure the outcomes of a flow.
The AI Agent notification is enabled by default with a default-configured payload. -
Select Enter key and value or Enter JSON to use the nested payloads. You can modify the default outcomes as required.
Note
- Variables can be added with a '$' prefixed. Variable names are case-sensitive.
- Sending flow outcomes is mandatory for AI Agent flow with the ‘AI Agent’ as the Start node.
-
In a flow, each node is assigned a variable and a corresponding value using the Transaction Action, which ensures that the AI Agent receives the most up-to-date value of the variable as the flow is executed. When the flow reaches its endpoint, the latest value of the variable at that stage is sent to notify the AI Agent.
For instance, consider a flow that begins with a start node and progresses through two HTTP nodes. Each HTTP node is configured with a variable namedphone
but assigned different values—1
for the first HTTP node and2
for the second. If the flow concludes at the first HTTP node, the value sent to the AI Agent is1
. Conversely, if the flow ends at the second HTTP node, the value sent is2
.
How to get the payload on Webex AI Agent Studio
- Log in to Webex AI Agent Studio by crosslaunching from Control Hub.
-
Launch the agent. Click on Actions tab. Select the Action for which you want to configure the fulfillment flow.
-
Scroll down to Slot filling on the Update Action page.
-
Under Input entities, you would see the list of entities added to the flow. The input entities have to be converted into a JSON.
For example, for the above screenshot, the JSON example for the input entities is below:
{"city": "city_value", "country": "country_value"}
Updated about 21 hours ago