FERNWAY

How delivery works

What happens when GHL says no.

GoHighLevel gets busy, goes down, refuses data and expires tokens. None of that may cost a lead. Here is what Fernway does in each case, and the test that proves it, run on every change before it ships.

02

Busy, down or silent

GHL

GHL answers 408, 429 or a 5xx error, or says nothing at all for 10 seconds.

Fernway

Those pass on their own, so the lead is tried again on the retry clock: 8 tries over about 24 hours. After the eighth it is returned with every answer kept, and one press sends it again.

The retry clock: 8 tries over 24 hours
1 min1 h24 h
03

A refusal that waiting won't fix

GHL

GHL refuses the data itself, like a phone number without its country code (any other 4xx).

Fernway

Trying again would only repeat the refusal, so the lead is held at once, with GHL's reason in words on its receipt. Once the data is fixed, a resend starts it on a fresh set of tries. A lead GHL could never match (no email and no phone) is refused at the door, before a waybill is made.

04

A token running out mid‑delivery

GHL

GHL's access tokens expire, and each refresh token can be spent only once.

Fernway

Tokens are refreshed 5 minutes before they expire, under a lock, so two workers that need a token at the same moment spend the refresh token once. If GHL answers 401 anyway, Fernway refreshes and tries again. If GHL refuses the refresh, the connection is marked for reconnecting and leads are held with that reason, never lost.

05

The same lead, twice

GHL

A website sends a form again after a timeout, or GHL takes a contact but its answer never arrives.

Fernway

Each lead carries an idempotency key, so the same lead sent twice is one waybill. Fernway keeps every id GHL gives back (contact, note, meeting, opportunity), so a retry carries on where the last try stopped and never makes a second. Contacts go through GHL's upsert, matched by email, then phone.

06

A crash in the middle

What goes wrong

Not GHL this time: the worker restarts, or the queue loses a job.

Fernway

Every scan is written in the same database transaction that moves the lead on, and the app's own database role can add scans but never change or remove one. Every minute a sweep puts back on the queue any lead whose try is more than 2 minutes late. A try that already ran, or isn't due yet, does nothing, so a job that arrives twice is harmless.

Every test above runs against a real database and queue, with a fake GHL that fails on demand, on every push. Nothing deploys unless they pass.