Skip to main content

Understanding Flows

Flows are the foundation of automation in QuivaWorks. They allow you to build intelligent workflows that combine AI agents, business logic, data transformation, and integrations to automate complex business processes.

What is a Flow?

A flow is a sequence of connected steps that execute in response to a trigger. Think of it as a recipe for automation:
  • Triggers start your flow (webhooks, schedules, form submissions, etc.)
  • Steps perform actions (run AI agents, make decisions, transform data, call APIs)
  • Connections pass data between steps using variable mappings
Flow Architecture

Core Concepts

Agent-Centric Design

QuivaWorks flows are designed around AI agents as the primary intelligence layer. While traditional automation requires you to program every step, agent-centric flows allow you to:
  • Define what you want to accomplish, not how to accomplish it
  • Let agents make intelligent decisions based on context
  • Handle exceptions and edge cases naturally through reasoning
  • Use tools and connectors dynamically based on the situation

Example: Customer Service Flow

Traditional Automation: If email contains “refund” → Send to refunds team. If email contains “technical” → Send to support team. Else → Send to general inbox.Agent-Centric Flow: Trigger on new email → Agent reads email, understands intent, checks order history, applies policies, and either resolves immediately or routes to appropriate team with context.The agent handles nuance, multiple topics, and exceptions without explicit programming.

Trigger → Agent → Tools Pattern

The optimal flow pattern in QuivaWorks:
  1. Trigger - Start the flow (form submission, schedule, webhook, etc.)
  2. Agent - Process the trigger with intelligence and reasoning
  3. Tools - Give the agent access to your data and systems (connectors)
This pattern allows maximum flexibility while maintaining simplicity.
1

Add a Trigger

Choose how your flow starts (form, API, schedule, etc.)
2

Create an Agent

Define the agent’s role and capabilities
3

Attach Tools

Connect your CRM, database, APIs, and other services
4

Deploy

Activate your flow and let it run

Flow Components

Triggers

Triggers define how and when your flow starts. Every flow needs at least one trigger.

Steps

Steps are the building blocks of your flow. They perform actions, make decisions, and transform data.

Common Flow Patterns

Customer Service Automation

Email Trigger → Customer Service Agent → 
  - Tool: Search Knowledge Base
  - Tool: Get Order History
  - Tool: Apply Return Policy
→ Condition → 
  - Can Resolve → Send Response
  - Needs Human → Human in the Loop

Lead Qualification

Form Trigger → Lead Qualification Agent →
  - Tool: Search CRM
  - Tool: Company Data API
  - Tool: Scoring Rules
→ Condition →
  - Qualified → Add to CRM + Notify Sales
  - Not Qualified → Add to Nurture Campaign

Content Generation

Schedule Trigger → Content Creation Agent →
  - Tool: Get Brand Guidelines
  - Tool: Get Customer Data
  - Tool: Get Performance Metrics
→ Map (Format for Channels) →
→ Multiple HTTP Requests →
  - Post to Social Media
  - Send to Email Platform
  - Update Content Calendar

Invoice Processing

Upload Trigger → Invoice Processing Agent →
  - Tool: Extract Data (OCR)
  - Tool: Get Purchase Orders
  - Tool: Validate Against Rules
→ Condition →
  - Valid → Approve + Update ERP
  - Invalid → Human in the Loop + Flag Issues

Flow Execution

Response Modes

Flows can run in two modes:
The trigger waits for the entire flow to complete before responding. Best for:
  • API endpoints that need to return results
  • Form submissions that show confirmation
  • Chat interactions that need immediate responses

Variable Mapping

Data flows between steps using variable mapping. Each step can access:
  • Trigger data: $.trigger.email, $.trigger.form.name
  • Previous step outputs: $.step_id.response, $.step_id.data
  • Secrets: SECRET::API_KEY::
  • Transformations: Filters, JSONPath, pipes
Learn more about variable mapping in our Advanced Variable Mapping Guide

Building Your First Flow

Ready to get started? Follow these guides:

Best Practices

Begin with a trigger and a single agent. Test thoroughly. Then add conditions, additional steps, and error handling as needed.
Let agents handle reasoning and decision-making. Use condition steps for branching based on clear outcomes. Don’t try to program intelligence into conditions.
Connect relevant data sources and APIs. The more context an agent has, the better decisions it can make.
Add human-in-the-loop steps for critical decisions. Use condition steps to catch errors and provide fallback paths.
Use actual customer emails, form submissions, and edge cases when testing. Agents perform best when trained on realistic scenarios.
Review flow execution logs regularly. Refine agent instructions and tools based on actual performance.

Next Steps

Need Help?