Sends Klaviyo an “Order Delivered” event only after real delivery, and holds it back for customers with an open support issue
The Problem
Klaviyo’s Shopify events track when an order is fulfilled, not when it arrives, so review requests can go out while the parcel is still in transit. Klaviyo also has no view of the helpdesk, so a customer with an open refund or damage ticket can still get a review request.
The Solution
A carrier delivery webhook triggers n8n, which ignores every status except “delivered” and checks Supabase for duplicates. It then looks up the customer in Gorgias and checks their tickets. An open ticket, or a recent one tagged refund, complaint, shipping issue, or negative sentiment, puts the delivery on hold. n8n saves the decision and sends Klaviyo a custom event through the Events API: Order Delivered to clean customers, Delivery Held to the rest. A Klaviyo review flow built on Order Delivered only reaches customers who passed the check.
Key Engineering
unique_id.202 responseResult
→ Tested end to end on a Klaviyo account, a Gorgias dev store, and a simulated carrier webhook. A customer with open tickets got a Delivery Held event, a customer with none got Order Delivered, a repeated webhook was ignored, and a deliberately failed run was logged and replayed successfully.
Tech Stack
n8n · Klaviyo (Events API) · Gorgias (REST API) · Supabase (Postgres) · Webhooks


