Skip to main content
Workflows are particularly useful for enriching the call context with external data, dynamically modifying agent configuration, personalizing the customer experience, and preparing your voice agent with relevant information:
  • Retrieve customer history before a call
  • Personalize the welcome message based on available data
  • Dynamically adapt the agent configuration based on the caller’s profile
The pre-call workflow consists of two mandatory main steps:
  1. Pre-call Trigger - Initializes the workflow and configures the test data
  2. Return Context - Prepares and structures the information that will be available during the call

Configuring the Pre-call Trigger

The pre-call trigger is the starting point of your workflow. It allows you to test and validate the data that will be used by the voice agent.
1

Create a Sample Data

To effectively test your workflow, you need to generate a representative sample of data:
  1. In the configuration interface, locate the section Generate Sample Data
  2. Click the Load Sample Data button
2

Configure the Test Data

Once the sample is loaded, you can customize the data according to your needs:
  1. Copy and paste the data into the Test input data field
  2. Modify the values according to your specific requirements
  3. Click Test to validate the configuration
Ensure that the JSON format is valid before testing your configuration. An incorrect format will lead to errors during the execution of the workflow.

Configuring the Return Context

The return context is the final step that prepares the information that will be available to the agent during the call.
If you want to return a context and/or configuration for the triggered call, make sure that the last step in the flow is a Return Context.
The return context allows you to:
  • Structure relevant information for the agent
  • Ensure continuity between pre-processing and the call
  • Personalize the customer experience based on available data
  • Dynamically adapt the agent configuration based on the caller’s profile or the context of the call
In the Return Context step interface, you can define the structure of the response in JSON format using the data selector to access the variables from previous steps.

Set Up Pre-Call Actions

Return structure

In the Return Context step interface, you can define the response structure in JSON format:

Option 1: Context only

If you are only modifying the context, return your data directly:
{
  "customerHistory": "...",
  "preferences": "...",
  "additionalInfo": "..."
}

Option 2: Context and configuration

If you also want to modify the agent configuration, use this structure:
{
  "context": {
    "customerHistory": "...",
    "preferences": "...",
    "additionalInfo": "..."
  },
  "agentConfiguration": {
    "initialMessage": "Hello, how can I assist you today?"
    ...
  }
}
To discover all the parameters available in agentConfiguration and understand how to use them, see the complete documentation on dynamic configuration.
When using the agentConfiguration key, the context must be placed in the context key. Anything not in agentConfiguration or context will be ignored.

Option 3: Explicitly triggering failover

If you detect a condition that prevents the proper execution of the call (missing critical data, external system unavailable, business rule not met), you can explicitly trigger failover:
{
  "failover": true
}
When failover: true is returned, the failover action configured on the agent will be executed immediately. The rest of the pre-call workflow response will be ignored.

Configure the failover action

Learn how to configure the action that will be executed when failover is triggered