Behind the Build
Building the Workflow Engine
How we designed Convoya's visual workflow builder from the ground up to handle complex logistics automation.
Julian Luczywo
When we started building Convoya, we knew that workflows would be at the heart of everything. Logistics operations are inherently event-driven: a truck departs, a document arrives, a rate changes. The challenge was building a system that could handle these events reliably at scale.
The Problem
Traditional workflow builders fall into two camps:
- Drag-and-drop tools that are easy to use but can't handle complex logic or branching conditions
- Code-based systems that are powerful but require dedicated engineering resources to maintain
We wanted to build something in between: powerful enough for complex automation scenarios, but accessible enough for operations teams to own and iterate on themselves.
Our Approach
Event Sourcing
Every action in Convoya is captured as an immutable event. This architectural decision gives us several key benefits:
- Complete audit trails for compliance and debugging
- The ability to replay workflows to understand failures
- Time-travel debugging for complex multi-step issues
- Natural support for undo/redo in the editor
Durable Execution
Workflows can run for days or weeks—think tracking a shipment from pickup to final delivery. We needed execution to survive server restarts, network failures, and even data center outages.
Our solution draws heavily from projects like Temporal and Inngest, but optimized for the specific needs of logistics operations where timing and reliability are non-negotiable.
Visual-First Design
The visual builder isn't just a nice-to-have UI layer—it's how we think about workflows internally. Every node in the builder maps directly to a step in the execution engine. What you see is exactly what runs.
This constraint forced us to keep the underlying model simple enough to visualize, which in turn made the system more maintainable.
Lessons Learned
1. Start with the execution model, not the UI
We built three different visual builders before landing on the current design. Each time, we'd hit a wall where the UI couldn't represent something the execution engine supported. Getting the underlying model right made everything else fall into place.
2. Operations teams think in exceptions
The happy path is easy. The real complexity is in handling everything that can go wrong: carrier no-shows, document mismatches, rate disputes, weather delays. We built exception handling as a first-class concept, not an afterthought.
3. Observability is a feature
Being able to see exactly what happened in a workflow (and why) is often more valuable than the automation itself. We invested heavily in execution visualization early on, and it's paid dividends in customer support and debugging.
What's Next
We're working on AI-assisted workflow creation, where you describe what you want in plain English and Convoya suggests the workflow structure. Early results are promising—the model understands logistics concepts surprisingly well. Stay tuned for more on that.
Topics