Skip to content

Journal Code review

Sample code review of a booking flow

An anonymised review of our own code. See which risks we found, what we estimated it would take to finish, and why we kept the code.

Artem KuznetsovFacts checked 20 Nov 20264 min read

This sample uses a November 2026 snapshot of our own code, with account names and test identifiers removed. The brief was to verify a live enquiry and call-booking flow before outreach. The enquiry had to reach the team with a working reply address. The team needed to know which enquiries and bookings came from outreach.

Finish the existing implementation. The form, email delivery and signed booking webhook can stay. The booking destination was the first fix. The other recommendations address retries and how the team counts bookings.

State of the project

The form checks the required details on the server and sends the enquiry to a shared inbox. If the email provider rejects the send request, the visitor sees an error and a direct email address. The browser sends a form conversion event and the server sends a separate, anonymous receipt event. The thank-you page offers a call. A signed webhook records the booking and can link it to the visit when the visitor has allowed analytics.

In a labelled production test, the email arrived with the correct reply address and campaign details. The browser conversion appeared in analytics. The booking button opened a different scheduler from the one the webhook supported. That was a release configuration problem. The test covered one browser, one enquiry and one campaign. Payments, account permissions and wider product security were outside the scope of this review.

Risks and what to change

High · The booking destination can bypass attribution

Evidence. The thank-you page took its destination from deployment configuration. BookingButton.tsx, lines 27–40, attached the attribution token only for the supported provider. Production was using a different provider. The visitor could still open a scheduler, but that click could never exercise the configured booking webhook.

Fix. Put the intended public event link in versioned configuration and keep the webhook signing key in server configuration. Add a deployed check for the destination and run one labelled booking and cancellation after the change. The booking and cancellation should appear in analytics in the same session as the click when consent is granted.

Medium · An enquiry can arrive twice after an ambiguous failure

Evidence. The enquiry handler creates a fresh reference per request before sending email. The send at lines 222–247 has no stable request-level deduplication key. If the provider accepts the first send and the browser loses the response, a retry can create a second email with a different reference. This is a risk identified in the code. We observed one delivery in the live test.

Fix. Reuse a submission key for retries of the same enquiry and pass it to the mail provider. Keep the direct-email fallback. Test the retry with a dropped response and check that an intentionally new enquiry still creates a new message.

Medium · A scheduled meeting can be mistaken for a conversation

Evidence. The webhook records booking and cancellation as separate events. It has no attendance input. A booking conversion establishes that someone reserved a slot. The operator needs a separate record of whether the conversation happened.

Fix. Use confirmed bookings and cancellations for the booking funnel. Count held conversations from a separate operator record. Keep the existing fallback for visitors who decline analytics so a valid booking still counts without campaign attribution.

Cost to finish

WorkEstimated engineering time
Fix the destination and verify the deployed booking flow0.5–1 day
Make enquiry retry safe and test delivery failures1 day
Separate the metrics and document inbox reconciliation0.5–1 day
Total2–3 days

Reviewer’s estimate. The range covers the three changes above, including verification. It requires working access to the repository, deployment, inbox and existing booking account. A euro estimate requires an agreed rate. A fixed quote would also confirm the acceptance criteria and account access.

What happened after the review

We changed the booking destination and verified the link on the thank-you page in all four site languages. One labelled live test produced an attributed booking and cancellation in the click’s analytics session. The booking provider confirmed the cancellation. The retry and reporting changes above are recommendations from the reviewed snapshot.

A code review costs €1,500 excluding VAT and includes the written report and a call. The review fee is credited in full against follow-on work that starts within 60 days.

This is general information about Belgian and EU law, not legal advice and not an opinion on whether your website complies. Invoid Vision BV is a software company, not a law firm. Laws and regulators’ positions change; before you decide, check the current text or ask a lawyer, an accountant or your professional body.

Request a code review

Get a finish-or-stop recommendation for your project

We read the code, test the flows that matter, and explain what we would keep, what we would change, and what it would cost. The report comes with a call to go through the findings.

A free check against this article’s checklist. It is not legal advice or a guarantee of compliance; on professional ethics, your bar or professional body has the final word.