Automation · E-commerce

Trade Furniture Catalogue with a Dealer Ordering Layer for an Online Store

An order arrives on a webhook and passes through thirteen steps before anything is confirmed: validation, customer resolution, order creation, payment check, inventory check, notification, logging and response. Every branch that can fail has somewhere to go.

Results at a Glance

13
Pipeline steps
5
Systems connected
4
Failure paths handled

An order touches five systems before anyone can ship it

A single order has to reach the customer database, the CRM, the payment gateway, the inventory system and the accounting log. Doing that by hand is slow; doing it with a script that assumes everything works is worse, because the failures are silent.

This workflow makes each of those steps explicit and gives each one a failure path, so an out-of-stock product or a declined payment produces a notification rather than an order that quietly never ships.

Industry Retail · Operations
Primary Result Every order path handled, including the ones that fail
Platforms
n8nREST APIsPostgresGoogle Sheets
Services
Workflow designAPI integrationbranching logicerror handling

The brief, and where the difficulty sat

The difficulty in an order pipeline is not the happy path, it is everything else. A customer might already exist or might be new. Payment might not clear. Stock might have gone while the order was in flight. Each of those needs a different route, and none of them can end in silence.

New or returning customer

The same order needs a different route depending on whether the customer already exists, and the rest of the pipeline should not have to care which.

Payment might not clear

A declined payment has to stop the order and say so, rather than creating a fulfilment nobody paid for.

Stock moves while you wait

Inventory is checked at the point of processing, and an out-of-stock result notifies both sides instead of failing quietly.

Someone will ask what happened

Every run writes to Postgres and Sheets, so a disputed order can be reconstructed.

The challenge was real, and it was costing time, money, and client experience.

How it was built

The webhook validates and parses the incoming order, then checks whether the customer already exists. Existing customers are fetched and updated; new ones are created and added to the CRM. Both paths merge before the order is created, so downstream steps do not need to know which route was taken.

Payment and inventory are then checked in turn. In-stock orders deduct their stock and continue; out-of-stock orders branch to notify both the admin and the customer. Everything is logged to Postgres and Google Sheets before a success response returns to the webhook caller.

The solution was designed from the ground up to fit this exact business.

Receive and validate

A webhook takes the order, parses it and checks the required fields before anything downstream runs.

Resolve the customer

Existing customers are fetched and updated, new ones created and pushed to the CRM, then both paths merge.

Check payment and stock

Payment status and inventory are verified through their own APIs, each with its own failure route.

Notify, log, respond

Email and SMS out, Postgres and Sheets written, success returned to the caller.

Tools Used

Each tool chosen specifically for reliability, integration depth, and ease of use for the client.

n8n

Orchestration, branching and error handling.

REST APIs

Customer, CRM, order, payment and inventory systems.

Postgres

Durable order log.

Google Sheets

Operational view the team can read.

What shipped

One webhook in, a fulfilled order and a complete audit trail out.

13
Steps

Documented on the canvas, so the next person can follow it.

5
Systems

Customer, CRM, payments, inventory and accounting.

2
Logs

Postgres for durability, Sheets for the people who need to look.

Before
Orders reconciled between systems by hand
Stock checked after the fact
Failures discovered by the customer
No single record of what happened
After
One webhook drives the whole pipeline
Payment and stock verified before fulfilment
Out-of-stock and declined payments notify both sides
Every run logged to Postgres and Sheets

Next Case Study

Mobile Party Cabin Website: Neon Design to Editable WordPress
Events & Entertainment
Mobile Party Cabin Website: Neon Design to Editable WordPress
Neon, high-energy site for a family-run mobile party cabin: faithful design recreation,…

Need a build like this delivered for your agency?

Send me the brief, a Figma file, a reference site or a rough outline, and you'll have a fixed quote with a delivery date within 24 hours.