Project · Lead delivery

Lead routing service

A service that takes leads from website forms and delivers them to partner APIs. Built for a private company, so partner names and volumes are left out.

The problem

When a website sends leads to outside partners, those partners decide how fast things move. If a partner replies slowly, a lead can be lost after it has already been matched. If the same form is sent twice, a partner can get the same lead twice.

My role

I built the service and kept improving it from what the logs showed in live use.

The result

Before the fix, about 1 in 4 leads that a partner had already matched (23%) was lost on the final delivery. That step shared the quick check's 8-second limit, and partners often took longer.

The fix gave the final delivery its own limit of 25 seconds, while the quick check kept 8. Successful final deliveries had taken up to about 6.4 seconds, so 25 leaves plenty of room.

Website forms stay instant
Duplicates blocked
Final delivery limit: 8 s → 25 s

Before figure from the September 2026 delivery logs.

How a lead moves through it

  1. 1. Website formThe visitor submits the form and gets an answer straight away.
  2. 2. ChecksValidation and duplicate checks run. Anything that fails goes to a review list.
  3. 3. Quick checkPartners are asked about the lead, with a short time limit.
  4. 4. Final deliveryThe lead goes to the partner, with a longer time limit.
  5. 5. Log and alertEvery step is recorded, and problems raise an alert.

What I built

  • Instant intake: the website form gets its answer straight away, and delivery happens in the background.
  • Separate time limits: a quick check and a slower final delivery each get their own limit, because partners can take much longer on the final step.
  • No double delivery: each lead can only be picked up once, and repeat submissions are caught as duplicates.
  • Nothing vanishes: a submission that fails validation is saved for review, so staff can fix it and send it on.
  • Abuse limits: rate limits per IP address and per source stop floods of fake submissions.
  • Logging and alerts: every step is recorded, and problems raise an alert.

What I learned

A timeout does not mean a lead failed. The partner may have accepted it and the reply got lost. So timed-out leads should not be sent again automatically. Details like this only show up in live logs.

Need something like this?

Book a call and tell me what you want to automate.

Book an intro call