System Transfer Functions
Signal conversation control transfer to external systems with System Transfer Functions.
System Transfer Functions signal that control of the conversation should be transferred from GenerativeAgent to an external system. They can also return reference variables (e.g., a determined “intent,” or details about a charge) for further processing outside of GenerativeAgent.
By using a System Transfer Function, you can:
- End the conversation gracefully, indicating that GenerativeAgent is finished.
- Hand control back to the calling application or IVR once a goal is met.
- Send relevant conversation data (e.g., identified charges, subscription flags, or determined intent) for follow-up workflows.
To create a system transfer function:
- Create a function
- Define input parameters
- Set variables (optional)
- Save the function
- Use the function in a task
Step 1: Create a New Function
Navigate to the Functions page and click “Create Function.”
- Select “System transfer” and click “Next: Function details”
- Specify the Name and Purpose of the Function
- Function Name: Provide a concise, unique name, using underscores (e.g.,
issue_refund_request
). - Function Purpose: Briefly describe what the function does (e.g., “Takes the collected charge info and indicates a refund request should be processed”).
- GenerativeAgent uses this description to determine if/when it should call the function.
- Function Name: Provide a concise, unique name, using underscores (e.g.,
Step 2: Define Input Parameters (JSON)
The input parameters are the values that GenerativeAgent needs to pass when calling this function to transfer control to the external system.
Under “Input Parameters,” enter a valid JSON schema describing the required parameters. GenerativeAgent will gather the necessary information (from user messages or prior context) before calling the function.
Step 3: (Optional) Set Variables
Though System Transfer Functions typically return control to an external system, you can still configure one or more reference variables:
- Configure variables to rename or transform parameter values for the external system
- Use Jinja2 for transformations if needed
- Toggle “Include return variable as part of function response” to make variables immediately available
Jinja2 Templating
Use Jinja2 to transform values before transfer. For example, to convert a string boolean to a proper boolean:
Step 4: Save Your Function
With your function defined, save it by clicking “Create Function”.
After saving, you’ll see a detail page showing the JSON schema and any configured reference variables.
Step 5: Using the System Transfer Function in the Conversation
Once you have created your system transfer function, you must add the function to the task’s list of available functions for GenerativeAgent to use it.
GenerativeAgent may call the function proactively, but we recommend you instruct GenerativeAgent to call the function explicitly.
Always make sure to test your functions with Previewer to ensure they work as expected.
Here’s how the function works within a task and conversation flow:
- GenerativeAgent collects the required parameters from the user (or context).
- (Optional) A “Message before Sending” can be displayed to the user, clarifying why GenerativeAgent is transferring control.
- Jinja2 transformations convert or combine inputs, if defined.
- GenerativeAgent calls the System Transfer Function, signaling that control returns to the external system.
- All reference variables collected during the conversation are passed along.
- If configured, the function’s specific variables also appear in the final response.
Best Practices
Next Steps
Task Best Practices
Learn more about best practices for task and function configuration.
Set Variable Functions
Learn how to store and manipulate conversation data with Set Variable Functions.
Connecting Your APIs
Connect your external systems to enable system transfers.
Previewer
Test your system transfer functions in real-time with the Previewer tool.
Was this page helpful?