Dynamic Pricing Engine for Tour Sales Optimization

Team Composition:

  • ML Engineer
  • Backend Engineer + DevOps Capability
  • Frontend Engineer
TravelTech

We built a production-ready pricing engine for a European TravelTech SaaS platform. The system forecasts demand, estimates price elasticity, and optimizes weekly prices across hundreds of tours. It runs as a scalable ML pipeline integrated into the client’s booking system.

  • Python (SARIMA, Prophet, XGBoost)
  • FastAPI
  • Angular
  • PostgreSQL
  • Redis
  • AWS (ECS on EC2, Batch)
  • Terraform as IaC

Background

The client is a European SaaS company serving small and mid-sized tour operators. Over several years of development, their platform evolved from a standalone booking tool into a full operational system that now combines bookings, customer records, payments, and accounting integrations within a single cloud environment. The company plans to expand across Europe and strengthen its AI capabilities.

The client approached Beetroot to design and build a structured, data-driven pricing engine within the existing SaaS platform. We conducted the initial discovery phase in close collaboration with the client to ensure alignment on real booking workflows and revenue targets before selecting the model.

The result is a production-grade ML pipeline wrapped in a web application, supported by event-driven integration APIs for seamless connection to external booking platforms.

CHALLENGE

Tour operators face a recurring revenue optimization problem: pricing hundreds of departures across multiple routes, each with limited capacity and varying demand patterns. Manual pricing struggles to adapt to real-time booking performance, seasonal fluctuations, and competitive pressures.

The client needed a system that could:

  • Forecast demand and price trajectories based on historical booking data;
  • Optimize prices weekly to hit configurable sales targets;
  • Decompose group-level recommendations into tour-specific pricing;
  • Continuously re-optimize as actual bookings deviate from forecasts.

The solution had to work in production, scale across markets, and integrate with the existing booking system.

Solution: ML-Powered Pricing Pipeline

We designed and implemented a modular ML pricing engine integrated directly into the client’s SaaS platform. The ML pipeline runs on a weekly schedule, pulling fresh booking data, retraining models as needed, and pushing updated price recommendations to the integrated booking system. Key contributions included:

  • Adaptive demand forecasting:

    The system evaluates multiple time-series models per project, including SARIMA, Prophet, XGBoost, and hybrid residual ensembles, and selects the best-performing one through grid search based on RMSE over a validation window. Training windows range from full historical datasets to rolling yearly slices, allowing the engine to adapt to route-specific demand patterns and seasonal behavior.

  • Elasticity estimation by the booking stage:

    We implemented log-log regression to estimate price elasticity segmented by Weeks Before Departure (WBD). This segmentation separates price sensitivity from the natural acceleration in bookings that occurs close to departure dates. The resulting elasticity schedule determines how strongly prices adjust during early and late booking periods.

  • Price optimization:

    The optimization layer uses COBYLA (Constrained Optimization BY Linear Approximations) to compute weekly price multipliers. The algorithm moves revenue toward a configurable target, enforces per-tour minimum and maximum price bounds, minimizes deviation from baseline demand forecasts, and applies demand response using elasticity coefficients:
    Q(p) = Q_base × (p / p_base)^β

  • Tour-level decomposition:

    Group-level optimized prices are distributed to individual tours through a combination of proportional scaling based on each tour’s historical price level, urgency adjustments for tours approaching departure with low bookings, revenue rebalancing to recover shortfalls from urgent discounts, and constraint enforcement to ensure final prices respect configured bounds.

  • Continuous re-optimization:

    The system monitors divergence between forecasted and actual bookings. When deviation exceeds defined thresholds, the platform enters a warning state, allowing operators to simulate alternative targets, adjust parameters, and resume optimization without restarting the project lifecycle. Real-time notifications inform users when forecasting or optimization jobs complete, keeping pricing dashboards synchronized with background ML processing.

  • Operational interface and workflow control:

    We built a dedicated web interface for managing pricing projects across their full lifecycle. A guided project wizard supports the setup process — covering date selection, tour filtering, automated data validation, forecast review, and target configuration. Monitoring dashboards display forecasted versus optimized trajectories, cumulative demand against targets, and weekly price schedules per tour, giving operators transparency and control at every stage.

Architecture & Engineering Design

The pricing engine runs as a production-grade ML system embedded within the client’s SaaS platform. The architecture cleanly separates user-facing services from compute-intensive workloads, ensuring stable performance as the platform scales.

  • Containerized backend and async orchestration:

    FastAPI services handle business logic and integration APIs, while background workers process forecasting and optimization jobs through Redis-based queues to keep the application responsive.

  • Isolated ML execution layer:

    Model training and optimization tasks run on AWS Batch. This isolation prevents compute-intensive workloads from affecting real-time application performance, ensuring that a demanding forecasting job never impacts the experience of an operator using the interface.

  • Infrastructure as code and scalable cloud deployment:

    The system runs on AWS with auto-scaling services and multi-zone deployment. Infrastructure is provisioned through Terraform, ensuring consistent releases, controlled scaling, and a reliable path to production across environments.

The validation window per route turned out to be the most consequential early decision. Too short and you miss seasonal patterns, too long and the data no longer reflects how that tour actually sells. We mapped that out with the client during discovery before writing any model code. That upfront work is what made the forecasts reliable in production.

ML Engineer,
Beetroot

Results

The delivered system produced measurable improvements across the client’s pricing operations, bringing the company closer to its broader goals of strengthening its AI positioning and scaling confidently across European markets:

  • 20-30% reduction in manual pricing effort

    through automated weekly recalculation

  • Automated optimization across 100+

    active departures on a recurring cadence

  • Faster response to booking deviations,

    with adjustment cycles reduced from days to hours

  • Configurable revenue targets

    with built-in feasibility validation

  • End-to-end auditability

    of forecasts, elasticity estimates, and price decisions

  • Seamless synchronization

    of optimized prices with the external booking system

Build and scale production-ready AI with one partner:

Discover how Beetroot helps your team move from AI concept to scalable, secure systems — built for real workflows and designed to grow with your product.