Skip to main content

Logic Flows

Overview

A Logic Flow is a sequence of steps executed in a specific order. Each step is an action that performs computation, manipulates data, or interacts with external systems. If a Logic Block is a reusable function, a Logic Flow is a program—a complete workflow with loops, flow control, branching, and variable assignment.

The key distinction between Logic Blocks and Logic Flows:

AspectLogic BlockLogic Flow
State ChangeImmutable (read-only)Mutable (changes state)
PurposeCalculate values, make decisionsExecute actions, orchestrate processes
OperationsComputation onlyCreate, update, delete records; call APIs
AnalogyA functionA program

While Logic Blocks calculate and return values without side effects, Logic Flows change the system's state. A Flow can create records, update fields, delete data, send emails, invoke external APIs, and orchestrate complex multi-step business processes.

Why Logic Flows?

Logic Flows empower citizen developers to describe complex business logic without writing code. The visual designer and rich library of built-in steps make it possible to:

  • Automate business processes: Create workflows that respond to events and execute actions
  • Integrate systems: Connect Dynamics 365 with external APIs and services
  • Orchestrate data: Move, transform, and synchronize data across entities
  • Implement business rules: Execute complex logic with conditions, loops, and branching
  • Extend Dynamics 365: Add capabilities beyond out-of-the-box functionality

Flow Structure

A Logic Flow consists of:

ComponentDescription
NameUnique identifier for the flow
DescriptionWhat the flow accomplishes
InputsData passed into the flow when invoked
OutputsData returned by the flow upon completion
VariablesInternal data storage during execution
StepsThe sequence of actions to execute

Flow Execution

When a Logic Flow is invoked:

  1. Inputs are received and made available to steps
  2. Steps execute in sequence from top to bottom
  3. Control flow steps (conditions, loops, switches) alter the execution path
  4. Variables store intermediate results between steps
  5. Outputs are set and returned to the caller

Flow Steps

Logic Flows offer a rich library of built-in steps that cover data operations, flow control, integrations, and more. Steps are organized into categories based on their purpose.

CategoryPurposeDocumentation
Data OperationsCreate, read, update, delete recordsData Operations
RelationshipsManage entity relationshipsRelationships
Flow ControlControl execution pathFlow Control
VariablesManage data during executionVariables
IntegrationConnect with external systemsIntegration
InvocationCall other logic constructsInvocation
EventsPublish business eventsEvents
Error HandlingHandle errors and exceptionsError Handling

Logic Blocks vs. Logic Flows

AspectLogic BlockLogic Flow
PurposeCalculate values, make decisionsExecute actions, orchestrate processes
StateImmutable (no side effects)Mutable (changes data)
OperationsRead-only computationCreate, update, delete, integrate
StructureSingle calculation/decisionSequence of steps with control flow
ReusabilityCalled from Flows and other BlocksCalled from Recipes, other Flows, APIs