Skip to main content
Conversation flows let you define structured, multi-step call scripts for your AI agents. Instead of relying on a single prompt, you can build a directed graph of nodes (steps) and edges (transitions) that guide the conversation through a precise sequence. Flows are defined as a JSON format that we call the flow definition. You can build flows visually in the RevRing dashboard, or generate them programmatically — including with AI tools like ChatGPT — and import them via the API.

Overview

A flow consists of:
  • Begin — which node starts the conversation and who speaks first
  • Nodes — individual steps (conversation, tool call, logic branch, transfer, etc.)
  • Edges — connections between nodes that define transitions and conditions

Flow Definition Reference

Top-Level Structure

Begin

Node Types

Every node has the following base fields:

Conversation

The core node type. The agent speaks and/or listens based on an instruction. Type: "conversation" Example:

Function (Tool Call)

Invokes one of your agent’s custom tools during the flow. Type: "function" Each entry in outputVariables: Example:

Logic Split

A branching node with no data of its own — all logic is defined by its outgoing edges (conditions and an else fallback). Type: "logic_split" The logic split node must have:
  • One or more condition edges (evaluated in order)
  • Exactly one else edge (fallback if no conditions match)
Example:

Call Transfer

Transfers the call to another phone number. Type: "call_transfer" Example:

End Call

Terminates the call, optionally speaking a closing message. Type: "end" Example:

Press Digit (DTMF)

Waits for the caller to press a phone keypad digit. Useful for IVR-style menus or entering account numbers. Type: "press_digit" Example:

Extract Variable

Uses the LLM to extract structured data from the conversation and store it in flow variables for downstream use. Type: "extract_variable" Each entry in variables: Example:

Edges

Edges connect nodes and define how the flow transitions between steps.
Condition edges can be attached to any node type, not just logic split nodes. For example, you can put condition edges directly on a conversation node to branch based on the caller’s response — no logic split needed.

Edge Fields

Edge Kinds

Conditions on Any Node

You can attach condition edges to any node type. This is particularly useful on conversation nodes — branch directly based on the caller’s response without needing a separate logic split node. For example, a greeting node that routes callers to different paths:
If no condition matches, the agent stays at the greeting node and continues the conversation until a condition is met.

Conditions

Conditions determine whether a condition edge is followed. There are two types:

Prompt Conditions

The LLM evaluates a natural language question against the conversation context.

Equation Conditions

Variable-based conditions that compare flow variables against values. No LLM call required.
Each equation: Available operators: ==, !=, contains, not_contains, contained_in, not_contained_in, >, <, >=, <=, exists, not_exists

Global Nodes and Edges

Global nodes can be triggered from any point in the conversation, not just from a specific predecessor node. This is useful for handling requests that can happen at any time, such as “transfer me to a human” or “I want to cancel.” To make a node global:
  1. Set isGlobal: true on the node
  2. Add one or more edges with source: "__global__" targeting that node
  3. Global edges must have a condition — typically a prompt condition

Transition Behavior

After each user reply, the agent evaluates edges in this priority order:
  1. Global edges — checked first, across all global nodes. If a global condition matches, the flow jumps to that global node regardless of where the conversation currently is.
  2. Condition edges on the current node — evaluated in order, first match wins
  3. Else edge — taken if no condition edges matched
  4. Default edge — unconditional, taken if present
  5. No match — the agent stays in the current node and continues the conversation
This means a conversation node doesn’t need a fallback edge. If no conditions match, the agent simply keeps talking at the current step — useful for nodes that need to collect information before moving on (e.g. “keep asking until the caller provides their phone number”).

Validation Rules

When submitting a flow via the API, the following rules are enforced:
  1. schemaVersion must be 1
  2. Every node must have a unique id
  3. begin.startNodeId must reference an existing node
  4. All edge source and target values must reference existing nodes (except "__global__" as source)
  5. logic_split nodes must have exactly one else edge
  6. skipResponse conversation nodes must have exactly one skip edge and no other outgoing edges
  7. Global nodes (isGlobal: true) must have at least one __global__ edge targeting them
  8. __global__ edges must target nodes with isGlobal: true
  9. condition edges must have an order value, unique per source node
  10. Prompt conditions must have non-empty promptText; equation conditions must have at least one equation
  11. Total flow size must not exceed 48 KB

Complete Example

Here is a complete flow for an order status hotline:
This flow:
  1. Greets the caller and asks for their order number
  2. Extracts the order number from the conversation
  3. Calls a tool to look up the order status
  4. Branches based on whether the status is "shipped" or anything else
  5. Responds with the appropriate message
  6. Ends the call
  7. At any point, if the caller asks for a human, the call is transferred (global node)

Importing Flows via API

Agent mode is set at creation time and cannot be changed afterwards. To use conversation flows, create an agent with mode: "conversation_flow".

Creating a flow agent

Use the Create Agent endpoint with mode set to "conversation_flow" and the flowDefinition field set to your flow JSON:

Updating a flow

To update the flow on an existing conversation_flow agent, use the Update Agent endpoint with just the flowDefinition field:
mode is immutable after creation. You cannot convert a single_prompt agent to conversation_flow — create a new agent instead.
You can generate flow definition JSON with AI tools like ChatGPT. Share this reference page as context, describe the conversation flow you want, and paste the generated JSON into the API call or the dashboard’s import feature.

Using Variables in Flows

Flow nodes support {{variable}} syntax in instruction text. Variables can come from:
  • System variables ({{current_time}}, {{user_number}}, etc.) — see Prompting & Variables
  • Default variables configured on your agent
  • Dynamic variables passed via the API or pre-call webhook
  • Extracted variables from extract_variable nodes
  • Tool output variables mapped via outputVariables in function nodes
All variables are available to every node in the flow once set.