Skip to main content

Booking Flow Builder Overview

The Booking Flow Builder is a visual canvas-based editor that allows users to design and configure booking flows for service businesses. Built on ReactFlow, it provides an intuitive drag-and-drop interface for creating complex booking workflows.

Key Concepts

Canvas Architecture

The Booking Flow Builder uses a command-driven mutation tracking system that captures all user interactions and aggregates them into optimized database operations on save.

Node Types

The canvas supports several node types representing different entities in a booking flow:

Node TypeDescriptionEntity
Step NodesFlow steps (service selection, timeslot, customer info, etc.)BookingFlowStep
Question NodesQuestions within SERVICE_SELECTION stepsBookingQuestion
Answer NodesAnswers to questions (plain text or service reference)BookingQuestionAnswer
Category NodesGroupings for organizing answersBookingAnswerCategory

Edge Types

Edges represent relationships between nodes:

Edge TypePurpose
Step EdgesConnect steps in sequence
Question-Answer EdgesLink questions to their answers
Category-Answer EdgesGroup answers under categories
Phantom EdgesUI-only extension points (not persisted)

Documentation Structure

Quick Reference

User Capabilities

  • ✅ Create nodes from the flow palette
  • ✅ Update node content via inline forms
  • ✅ Delete nodes with cascade cleanup
  • ✅ Connect nodes by dragging edges
  • ✅ Reroute edges to different targets
  • ✅ Undo/redo all operations
  • ✅ Multi-select and batch operations

Technical Highlights

  • Command Stack: All interactions create commands enabling undo/redo
  • Strategy Pattern: Each interaction type has a dedicated strategy
  • Per-Entity Optimization: Mutations are aggregated per entity on save
  • Canvas Data Separation: Position/viewport stored separately from entity data