Skip to main content

Flow Steps

Flow steps are the building blocks of your workflows. After a trigger activates your flow, steps execute in sequence to accomplish your business logic. Each step performs a specific function—from running AI agents to transforming data to making decisions.
Agent-Centric Design: QuivaWorks flows are designed to be agent-first. Start with an AI agent, attach tools (connectors) to it, and add supporting steps as needed. This approach maximizes the intelligence and autonomy of your workflows.

Step Types


How Steps Work

Steps execute sequentially after your trigger fires. Each step:
  1. Receives input from the trigger or previous steps
  2. Performs its function (run agent, make decision, transform data, etc.)
  3. Outputs results that subsequent steps can use
  4. Passes control to the next step
Trigger: HTTP POST received

Step 1: Agent analyzes request

Step 2: Condition checks agent decision
↓ (if approved)
Step 3: HTTP Request sends to CRM

Step 4: Map formats response

Return: Success message

The Agent-Centric Approach

Start with agents, not automation. Traditional workflow tools force you to map out every step explicitly. QuivaWorks is different—you delegate work to intelligent agents and let them figure out the details.

Traditional Approach (Step-by-Step)

1. Receive customer question
2. Search knowledge base
3. If found: Format answer
4. If not found: Search help docs
5. If found: Format answer
6. If not found: Create support ticket
7. Send response
Problem: Breaks when anything unexpected happens

Agent-Centric Approach

1. Receive customer question
2. Agent (with tools):
   - Knowledge base connector
   - Help docs connector
   - Ticketing system connector
   → Agent decides best approach
3. Send response
Benefit: Agent adapts to any scenario
Best Practice: Let agents handle complexity. Only add additional steps (Conditions, Maps, HTTP Requests) when you need:
  • Explicit branching logic that you control
  • Data transformation before/after agents
  • Direct API calls without agent interpretation
  • Business rules that must be enforced

Common Step Patterns

Let agent make decision, branch based on outcome, take action.
Agent analyzes customer request

Condition: If agent.decision = "refund"
↓ (true)
HTTP Request: Process refund
Use when: Agent provides intelligence, but you need explicit control over outcomes.
Transform data before agent, process with agent, format after.
Map: Extract relevant fields

Agent: Analyze and respond

Map: Format for external system
Use when: Agent needs clean input or output needs specific structure.
Evaluate business rules first, then let agent handle complexity.
Rules: Check eligibility criteria

Condition: If eligible
↓ (true)
Agent: Process application
Use when: Hard requirements must be met before agent processes.
Agent proposes, human approves, agent executes.
Agent: Analyze request and propose solution

Human in Loop: Review and approve

Agent: Execute approved solution
Use when: High-stakes decisions need human oversight.
Fetch external data, transform it, let agent process.
HTTP Request: Get customer data from CRM

Map: Extract relevant fields

Agent: Personalize response using data
Use when: Agent needs context from external systems.
Wait for time-based conditions, then process with agent.
Delay: Wait 24 hours

Agent: Follow up on unanswered inquiry
Use when: Time-based workflows or retry logic.

Step Best Practices

Start Simple

Begin with one agent. Add steps only when needed. The simpler your flow, the easier to maintain.

Let Agents Decide

Don’t hard-code logic that agents can figure out. Use Conditions only for business-critical branching.

Name Steps Clearly

Use descriptive names: “Analyze Customer Request” not “Agent 1”. Makes flows self-documenting.

Test as You Build

Test each step before adding the next. Catch issues early, iterate quickly.

Handle Errors

Add error handling for critical steps. Use Conditions to route failures appropriately.

Use Variables

Reference previous step outputs with variables. Keep data flowing smoothly.

When to Use Each Step

Step TypeUse WhenDon’t Use When
AgentsNeed intelligence, decision-making, or tool usageSimple data transformation
ConditionNeed explicit branching you controlAgent can decide the path
HTTP RequestCalling external APIs directlyAgent should interpret API data
MapTransforming data structure or iterating arraysAgent can handle transformation
RulesComplex business calculations or eligibility checksSimple if/then (use Condition)
Human in LoopHigh-stakes decisions need approvalLow-risk automated processes
DelayTime-based workflows or retry logicImmediate execution needed
EvalCustom JavaScript logic not available elsewhereStandard operations (use Functions)
FunctionsCommon utilities (date, string, array operations)Complex logic (use Eval or Agent)

Step Variables

Every step outputs data you can reference in subsequent steps. Use the variable syntax to access step outputs:
${step_name.output.field}
Examples:
${agent_1.response}          // Agent's text response
${condition_1.result}        // Condition's boolean result
${http_1.body.data}          // HTTP response body data
${map_1.output}              // Map's transformed output
${rules_1.discount.outcome}  // Rules engine outcome
Learn more about variable syntax in Variable Mapping

Next Steps

Ready to build your flow? Start with the most important step: