Build SMS lead-routing engine — Supabase + Twilio + n8n + Stripe (fixed price, 7 days)
Worldwide
What you're building A hands-off lead-routing system for a freight lead-matching platform (solo founder). Shippers submit a form, the system texts the lead to up to 2 verified carriers, carriers reply 1 to accept or 2 to pass, credits deduct on accept only. All accounts are mine (Supabase, Twilio, n8n Cloud, Stripe, WordPress). You build inside my accounts. I own all code and configs at handoff. Scope Supabase: run my 4-table schema (carriers, leads, lead_offers, credit_transactions) plus a small markets config table (slug, status open/waitlist, outbound Twilio number, waitlist alert thresholds, alert-notified flag). Leads add market, sms_opt_in (boolean, default false) and booked_carrier_id (nullable FK to carriers). RLS: service_role full access, anon = insert on leads only. Lead form: self-contained HTML/JS block (embeds in a WordPress Gutenberg Custom HTML block, no plugins) posting to Supabase. Client-side validation. Auto-classifies each lead standard (1 credit) or premium (3 credits) by freight type. Market dropdown (Laredo preselected) and an SMS-consent checkbox (writes sms_opt_in). Leads submitted for a waitlist market get an honest on-page + email "you're on the list" response instead of routing. Carrier signup: HTML block + signup logic that grants free credits by tier: carriers 1–5 get 6 credits, 6–10 get 3, 11+ get 0. Tiers count per market (each market runs its own 1–5 / 6–10 sequence) and a carrier's tier locks at verification time, in verification order — not signup order. Credits activate only when I flag the carrier verified. Never a flat DB default. Carriers may sign up for waitlist markets: they store as pending with zero credits, consume no tier slot and never enter routing until their market opens and I verify them. route-lead Edge Function: validate + dedupe (same shipper + lane + pickup date within 24h) → market check (waitlist markets store the lead and never route) → build eligible pool (active, verified, balance ≥ lead cost, lead market matches carrier service_areas) → walk order (founding carriers first) → wave routing: keep (2 − accepts) SMS offers live at once, top up on every pass or 5-minute timeout, stop at 2 accepts or empty pool, void all still-live offers the moment the 2nd accept lands. No market names hardcoded anywhere in functions or flows — all market behavior (status, outbound number) reads from the markets table. Twilio SMS via n8n: outbound offer template, inbound parse (1 = accept, 2 = pass, else clarify). Accept = atomic slot check + credit deduction + shipper contact sent to carrier. A late accept on a voided offer gets a polite "lead's taken" and is NOT charged. n8n Flow 1: instant SMS + email to me on every new lead. Notify only. Nothing ever waits on my reply. Market-warming alert (ships feature-flagged OFF): when a not-yet-open market's waitlist crosses a configurable threshold (defaults: 4 pending carriers or 10 waitlist leads in a rolling 30 days, set per markets row), send me one SMS + email flagging that market is warming. Alert only — it must NOT open the market, activate carriers, change any market's status, or trigger anything downstream. Opening a market stays a manual data change I make. Deploys disabled; I flip it on once a second market is in play. Stripe: Checkout session Edge Function + webhook on checkout.session.completed → credits auto-post + credit_transactions row. Shipper disposition follow-up (ships feature-flagged OFF): scheduled n8n flow fires 24h after a lead's first accept, only if the shipper opted in. One SMS: did you book — reply 1 for [Carrier A], 2 for [Carrier B], 3 booked elsewhere, 4 not booked yet. Inbound parsing keys on sender phone (shippers and carriers share the Twilio line). Writes booked_carrier_id and sets lead status closed_won / closed_lost; no reply stays unknown. Deploys disabled — I flip it on later. During build, shipper-facing SMS goes to my test numbers only. Handoff package: SQL migrations, Edge Function source in my repo, n8n flow JSON exports, .env.example, 1-page runbook, and a screen-recorded end-to-end demo. The hard requirement (read before bidding) Two carriers can reply "1" in the same second when only 1 slot remains. Exactly one gets charged and confirmed. The other gets a "lead taken" reply and is NOT charged. Your proposal must briefly explain how you'll guarantee this (row locking, atomic RPC, transaction design — your call, but name it). Proposals that skip this question get declined without reply. You must have Shipped two-way Twilio SMS in production (not just outbound blasts). Link it or describe it. Supabase Edge Functions + RLS in production. n8n experience (or equivalent with a plan to deliver in n8n — n8n is the target, not negotiable). Available for a short daily check-in overlapping US Central (Texas) business hours during the build week. Notes My Twilio A2P 10DLC brand is approved and the campaign is in final review. You work in MY Twilio account with MY number. Do not create new numbers, brands or campaigns. Stack is fixed: Supabase, Twilio, n8n Cloud, Stripe, WordPress embed. Do not propose replacing any of it. Multi-market is an acceptance criterion. Launch config is Laredo only, but opening a second market must require data/config changes only (markets row flipped to open, carrier seeded, number added). Zero code edits. You'll demo this before final payment. n8n runs on the Starter plan (2,500 executions/month — workflows pause at the cap). All flows must be webhook/event-driven. No schedule-based polling. Offer timeouts get swept by pg_cron or a scheduled Edge Function inside Supabase, not by n8n. Milestones (escrowed) M1 — 30%: schema + RLS live, lead form and signup posting correctly, Flow 1 alert firing. M2 — 50%: routing engine complete: wave routing, accept/pass/timeout, credit deduction, void-on-fill. Includes a recorded demo of the simultaneous-accept race being handled correctly. M3 — 20%: Stripe credit purchase flow, disposition flow demoed on test numbers (flag stays off), second-market demo (flip a test market open via data only — lead routes, no code edits), full end-to-end test, handoff package delivered.
$2,800.00
Fixed-price- IntermediateExperience Level
- Remote Job
- One-time projectProject Type
Skills and Expertise
Activity on this job
- Proposals:50+
- Last viewed by client:3 days ago
- Interviewing:3
- Invites sent:0
- Unanswered invites:0
About the client
- USAMadison Heights1:39 PM
- $642 total spent6 hires, 1 active
- 10 hours
- Supply Chain & LogisticsIndividual client
Explore similar jobs on Upwork
How it works
Create your free profileHighlight your skills and experience, show your portfolio, and set your ideal pay rate.
Work the way you wantApply for jobs, create easy-to-by projects, or access exclusive opportunities that come to you.
Get paid securelyFrom contract to payment, we help you work safely and get paid securely.
About Upwork
- 4.9/5(Average rating of clients by professionals)
- G2 2021#1 freelance platform
- 49,000+Signed contract every week
- $2.3BFreelancers earned on Upwork in 2020
Find the best freelance jobs
Growing your career is as easy as creating a free profile and finding work like this that fits your skills.
Trusted by