The Workflow skill allows Admins to create complex automations using visual components such as the Execute action, Function, and Split flow.
The Workflows are executed by a separate system that runs outside the AI Agent's context. This separation ensures a secure execution environment and prevents unintended exposure of sensitive elements such as API credentials, JavaScript logic, or internal variable values to the AI Agent.
The AI Agent only has access to:
- Variables explicitly passed into a Start Flow component.
- Output variables returned from an End Flow component.
The first step in using a Workflow is to create a new Skill for an AI Agent.
After adding a Workflow, we can start editing it.
The following sections constitute the Workflow:
Interact with AI Agent components
The Interact with AI Agent components allow you to configure how the AI Agent should retrieve information and send back information to the AI Agents.
Workflow: Start Flow component
The "Start Flow" component is the starting point for defining the specific Workflow an AI Agent can use during an interaction. It is added by default as the Start of the Workflow skill.
It enables you to configure how the AI Agent interacts with external systems, such as retrieving data, sending updates, or performing predefined operations. With it, you ensure that the AI Agent can deliver efficient responses, tailored to user requests.
The “Start Flow” component has the following details:
- “Name”: The name of the Workflow. It can contain letters, numbers (except as a first character), and underscores, and can be as long as 40 characters. Note: For the best results, we recommend that you use simple and easy-to-understand names.
- “Goal”: The description of the Workflow. It should specify the purpose of the Workflow, such as retrieving information, updating records, or executing predefined tasks. A well-defined goal ensures the AI Agent understands how to use the Workflow effectively to address user needs within a conversation.
-
“AI Agent Input variables”: Input Variables define the data required by the Workflow to complete its task. These variables represent the information that the AI Agent captures during a conversation, such as user-provided details or contextual data. Each variable serves as an input to the Workflow, ensuring it has all the necessary parameters.
Workflow: End Flow component
The "End Flow" component defines the outputs of the Workflow used by the AI Agent, specifying which variables will be provided to the AI Agent context.
This component ensures that the data captured or generated by the Workflow is correctly passed on to the AI Agent for further processing or presentation. By selecting the relevant output variables, you determine which information will be utilized to form the AI Agent responses, allowing for dynamic and contextually relevant interactions.
The End Flow component has the following details:
- “Name”: The name of the “End Flow” component. It can contain letters, numbers (except as a first character), and underscores, and can be as long as 40 characters.
- “AI Agent Output variables”: Output variables represent the data that will be sent to the AI Agent for further processing or to generate responses. These variables capture the results or conclusions derived from the Workflow and are critical in shaping the AI Agent’s subsequent interactions. By defining these output variables, you specify which pieces of information will influence the AI Agent’s responses, enabling it to provide better replies based on the captured data.
For “AI Agent Output variables” there are two possible variable types to Output:
- Workflow variables
- AI Agent Orchestration variables
If you select Workflow variables (variables created during the workflow) then you need to map their value to an AI Agent Orchestration variable.
General Components
Workflow: Execute Action component
The "Execute action" component allows you to leverage Talkdesk Connections™ in a Workflow.
The Execute action component has the following details:
- “Component name”: The name of the "Execute Action" component. The name can only contain letters, numbers (except as a first character), and underscores, and can be as long as 30 characters.
-
“Execute action”: Select a predefined Talkdesk Connection to leverage data contained in a third-party system.
- “Connection”: The Connection to be applied. You need to create a Talkdesk Connection and configure a corresponding action for it first so that you can select a Connection from the drop-down list.
- “Action”: The action to be performed for specific needs and objectives. You need to create an action first so that you can select an action from the drop-down list.
- “Inputs”: Define a value or variable for each field that you want to include in the request. If the variable does not exist in any part of the flow, an error will be displayed.
-
“Outputs”: Define a value or variable for each field that stores the response to the request. If the output variable does not exist, the Autopilot will create it.
Note: As shown in the image above, you can have mandatory fields, which are marked with a red asterisk.
Workflow: Function Component
The Function component allows AI Agent designers to access and manipulate data using JavaScript code (e.g., adapt data to a conversational format and specify variable conditions, among other functionalities).
The Function component has the following details:
- “Component name”: The name of the Function component. The name can only contain letters, numbers (except as a first character), and underscores, and can be as long as 30 characters.
-
“Function”: Here, you can define the code editor field to execute JavaScript code. In this component, you can use standard JavaScript code, as well as the following two methods that allow the conversational designers to manage Autopilot’s variables, namely:
- Context.getVariable(variable name): Get the value from a variable. This method allows getting the AI Agent system variable data so that you are able to use those values in the logic execution previously defined.
- Context.setVariable(variable name, new value): Define the value of a custom variable. This method allows you to set the AI Agent system variable data so that you are able to execute the logic that you previously defined and store the transformed data into an AI Agent variable.
- The code editor has 20 lines by default and will increase in height if you keep editing below, with the scroll on the side.
- There is a limit of 16000 characters and another for an execution timeout of 2 seconds, meaning that if you have code exceeding 2 seconds of running time, the code will stop running, and the component will move with the error exit.
Workflow: Split Flow Component
The Split Flow component defines the possible ramifications that a Workflow may follow.
The Split Flow component has the following details:
- “Component name”: The name of the Split Flow component. The name can only contain letters, numbers (except as a first character), and underscores, and can be as long as 40 characters.
- “If variable”: Enter a variable for validations so that the flow can be split into different branches. The variable needs to have a value defined. This value can come from a System variable, populated on an Action component, a Function component, or an Execute action output. Under the “If variable” field, you can define a list of ramifications (that is, validations or exits) with each containing its name (for example, > and =), type (Number or String), and a variable value for validation comparison. If the type is “Number”, you must enter a valid number.
- “Fallback exit”: The Fallback exit is the default path when none of the conditions defined are matched. On the Split Flow component node, you can see that the Default exit is displayed with other exit options.
Workflow: End Automation Component
The End Automation component is used to terminate the current session within an AI Agent Orchestration.
When this component is reached, the AI Agent Orchestration will return one of two possible statuses:
Termination Status Options
- Success: Indicates that the session completed as expected.
- Escalation: Indicates that the session could not be resolved and should be handed off or flagged for further handling.
Escalation Reason
When using the Escalation status, users can optionally provide additional context by passing a value alongside the escalation. This value can be:
- A static sentence (e.g., "User requested a live agent"),
- A variable (e.g., {reason_for_escalation}), or
- A structured object (e.g., {"type": "billing_issue", "priority": "high"}).
This added information can be used by consumer applications (like Autopilot or Copilot) to better handle the escalation or route it appropriately.
The End Automation component has the following details:
- “Name”: The name of the “End Automation” component. It can contain letters, numbers (except as a first character), and underscores, and can be as long as 40 characters.
- “Studio exit”: A selection between either the “Success” status or the “Escalation” status.
Workflow: Variables
The Workflow: Variables section provides visibility and control over the variables used within a Workflow Skill and across the AI Agent system. It is divided into two main tabs:
1. Workflow variables
This tab displays all Workflow variables created within the current Workflow Skill. These are variables defined and used exclusively in the scope of the Workflow.
Each variable in this list includes:
- Variable name: Identifier used throughout the workflow logic.
- Description: Context to inform the AI Agent about the purpose of the variable.
- Possible values (optional): A set of values that helps the AI Agent better understand the kind of information it is expected to capture or work with.
Users can:
- Create new variables directly in this tab.
- Edit existing variables.
- Remove variables that are no longer in use.
2. AI Agent Orchestration Variables
This tab includes all other variables available in the broader AI Agent orchestration context. It combines:
- System variables provided by the platform or consumer applications (e.g., Autopilot or Copilot).
- Shared variables originating from other Skills within the same AI Agent system.
Note: These variables are read-only and cannot be edited or deleted from this view, but they are essential for understanding how data flows between Skills and how the AI Agent system operates as a whole.