Skip to main content

Workflow Concepts

What is a Workflow?

A workflow in XY is an automated sequence of steps that accomplishes a specific business outcome—like processing an insurance claim, extracting data from documents, or managing patient scheduling. Think of it as a digital assembly line where each station (step) performs a specific task, and the work flows smoothly from one station to the next.

Core Components

1. Steps

The fundamental building blocks of any workflow. Each step represents a single action or decision point:

  • Agent Steps: AI-powered agents that handle complex tasks (e.g., extracting data from a PDF, checking claim codes)
  • Integration Steps: Connect to external systems (e.g., pull data from DrChrono, send to a billing system)
  • Decision Steps: Conditional logic that routes work based on rules (e.g., if claim > $10,000, route for manual review)
  • Human Steps: Points where a person needs to review, approve, or provide input

2. Agents

Specialized AI workers that execute intelligent tasks within workflows:

  • Each agent has a specific expertise (claims processing, data entry, scheduling, etc.)
  • Agents can use tools to interact with external systems
  • They process inputs and produce structured outputs for the next step
  • Think of them as your digital workforce—each trained for specific jobs

3. Data Flow

Information moves through your workflow like water through pipes:

  • Inputs: Starting data (files, form submissions, API calls)
  • Variables: Store and pass data between steps
  • Transformations: Modify data as it flows (extract, format, validate)
  • Outputs: Final results (updated records, processed documents, notifications)

4. Dependencies

Steps can depend on other steps completing first:

  • Sequential: Steps run one after another in order
  • Parallel: Multiple steps run simultaneously when possible
  • Conditional: Steps run only when certain conditions are met

Workflow Types

Template Workflows

Pre-built, reusable workflow patterns for common tasks:

  • Invoice processing
  • Claims submission
  • Patient intake
  • Appointment scheduling

Think of these as blueprints—you can use them as-is or customize them for your needs.

Custom Workflows

Workflows built specifically for your unique processes:

  • Tailored to your organization's specific requirements
  • Combine multiple agents and integrations
  • Include your business rules and logic

Instance Workflows

Active, running copies of workflows processing real data:

  • Created from templates when triggered
  • Track their own progress and state
  • Can be monitored and managed individually

Execution Modes

Manual (Co-pilot)

  • You initiate each workflow run manually
  • Great for testing or one-off tasks
  • Full visibility into each step's execution
  • Ability to pause, modify, or stop mid-flow

Supervised (HitL - Human in the Loop)

  • Workflows run automatically but pause for human input at key points
  • Ideal for high-stakes decisions or exception handling
  • Humans approve critical steps before proceeding
  • Balances automation with human judgment

Automated (Autopilot)

  • Fully autonomous execution from start to finish
  • Triggered by schedules, events, or API calls
  • Runs 24/7 without intervention
  • Best for repetitive, well-defined processes

Key Concepts to Remember

Idempotency

Workflows are designed to be safely re-run without causing problems. If a workflow fails halfway through, it can often be restarted without duplicating work already completed.

Error Handling

Every workflow includes built-in error handling:

  • Retries: Automatic attempts to recover from temporary failures
  • Fallbacks: Alternative paths when the primary path fails
  • Notifications: Alerts when human intervention is needed
  • Logging: Complete audit trail of all actions taken

Queue Management

Workflows use queues to manage work:

  • Each workflow gets its own dedicated queue for isolation
  • Items wait in queues until resources are available
  • Priority levels ensure urgent work gets processed first
  • Failed items can be retried or sent to error queues

State Management

Workflows maintain their state throughout execution:

  • Pending: Waiting to start
  • Running: Currently executing
  • Paused: Waiting for human input or scheduled time
  • Completed: Successfully finished
  • Failed: Encountered an unrecoverable error

Real-World Example

Let's say you need to process insurance claims:

  1. Trigger: A claim PDF arrives via email
  2. Step 1: Data Gateway Agent extracts the attachment
  3. Step 2: Data Entry Agent reads and structures the claim data
  4. Step 3: Claim Validation Agent checks for required fields and valid codes
  5. Decision Point: If validation passes, continue; if not, route to human queue
  6. Step 4: Database Agent saves the claim to your system
  7. Step 5: Notification Agent alerts the billing team
  8. Complete: Claim is processed and ready for submission

This entire process happens automatically, taking minutes instead of hours, with full visibility and control at every step.

Why Workflows Matter

Workflows transform manual, error-prone processes into reliable, scalable operations:

  • Consistency: Every task follows the same proven process
  • Speed: Parallel execution and 24/7 operation
  • Accuracy: AI agents don't make typos or miss fields
  • Visibility: Track every step and decision
  • Scalability: Handle 10 or 10,000 items with the same workflow
  • Compliance: Built-in audit trails and approval gates

Next Steps

Now that you understand the concepts, you're ready to:

  • Start building automated processes for your organization
  • Connect workflows to your existing systems and tools
  • Work with your XY customer success representative to create workflows tailored to your needs