trgr
io
Back to Case Studies
Fitness

Smart Form-to-Payment Dynamic Routing System

Eliminated 15% customer drop-off with intelligent payment routing based on course and schedule.

0%Customer drop-off (was 15%)
Payment Routing Interface
Drop-off Reduction Results

The Challenge

A fitness and training center offering 8 different course types with varying pricing — based on course, schedule (morning vs. evening), health fund subsidies (4 different funds with different rates), and seasonal promotions — needed to route each registration to the correct payment page. Their Elementor form could only redirect to a single static URL, meaning staff had to manually send payment links after each registration, creating a 15% customer drop-off between form submission and payment completion. Some customers needed to pay through one merchant account (for subsidized courses) and others through a different one (for full-price courses). The center had tried using multiple separate forms, but managing 30+ form variations was unsustainable and confused customers. They needed a single registration flow that intelligently routed to the right payment page.

Our Solution

We created a custom WordPress plugin that intercepts Elementor form submissions and applies multi-condition redirect logic to route each registrant to their exact payment page. The routing engine evaluates course type, selected schedule, health fund selection, and current date (for seasonal pricing) against a CSV-based rules table that the client can update without developer involvement. The plugin supports dual merchant account switching — courses subsidized by health funds route to Merchant Account A while standard courses go to Merchant Account B, each with their own Sumit.co.il payment page. URL parameters pass the student's name, email, phone, and course details to the payment page for pre-filling. We built a comprehensive test suite with 13 Playwright end-to-end tests covering every routing scenario: each course type, each health fund, schedule combinations, seasonal pricing transitions, and edge cases like expired promotions. The tests run on every plugin update to catch regressions before they reach production.

Smart Routing Logic

Detailed Approach

The routing logic is the heart of this plugin. We built it as a rule evaluation engine that processes conditions in priority order. Each rule in the CSV has columns for: course type, schedule, health fund, date range, merchant account, and target payment URL. When a form submission arrives, the engine iterates through rules top-to-bottom and selects the first matching rule — similar to how firewall rules work. A catch-all rule at the bottom ensures no submission ever falls through without a redirect.

The CSV approach was a deliberate design choice over hardcoding or a database. The client's admin team is comfortable editing spreadsheets, and seasonal pricing changes happen 4-6 times per year. They simply update the CSV via the WordPress admin panel, and changes take effect immediately. The plugin validates the CSV on upload, checking for formatting errors, missing URLs, and rule conflicts (where two rules could match the same input).

The Playwright test suite was essential given the combinatorial complexity — 8 courses Ɨ 4 health funds Ɨ 2 schedules = 64 possible paths, plus seasonal variations. We identified 13 critical paths that cover all routing branches and edge cases. Each test fills out the Elementor form with specific inputs, submits it, and verifies the redirect URL matches the expected payment page with correct pre-filled parameters. The tests run in a CI pipeline on every git push to the plugin repository, and a failing test blocks deployment. This has already caught 3 regressions during routine updates.

Key Results

šŸ• Requirements mapping (documenting all 30+ routing scenarios) took 3 days
  • āœ“Customer drop-off between registration and payment eliminated — from 15% to under 1%
  • āœ“Single registration form replaced 30+ form variations — dramatically simpler for customers
  • āœ“Staff no longer manually send payment links — saving 45 minutes daily
  • āœ“13 automated Playwright tests catch routing errors before they reach production
  • āœ“CSV-based routing rules allow the client to update pricing without developer involvement
  • āœ“Dual merchant account routing handles health fund subsidies automatically

Requirements mapping (documenting all 30+ routing scenarios) took 3 days. Plugin development took 2 weeks. The Playwright test suite was built in parallel during week 2. A 1-week soft launch with staff monitoring confirmed all routes before full go-live.

WordPress Plugin Stack

Technology Stack

WordPressPHPElementorSumit.co.ilPlaywright

Ready for similar results?

Let's talk about how we can automate your business processes.

Get Free Automation Audit

Let's figure out what you need

Tell us about your business and we'll come prepared to our call.

trgr.bot
Online