# Route ecommerce risk and inventory decisions with Claude: n8n workflow

> Started by another system calling it, and works across Postgres and Slack. 26 steps, 3 branches: large, and worth reading before you trust it with anything...

Source: https://millionrounds.com/workflow/route-ecommerce-risk-and-inventory-decisions-with-claude (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [E-commerce](https://millionrounds.com/workflows?category=E-commerce#library)

# Route ecommerce risk and inventory decisions with Claude

Started by another system calling it, and works across Postgres and Slack. 26 steps, 3 branches: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Froute-ecommerce-risk-and-inventory-decisions-with-claude)

**26 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 2 Logic 13 Service 11

The steps in the order they run, from what starts it.

- 1 **Webhook - New Commerce Event** Webhook *Starts it*
- 2 **Manual Trigger - Test Run** Manual trigger *Starts it*
- 3 **Set - Config** Set *Logic*
- 4 **Set - Sample Order Risk Event** Set *Logic*
- 5 **Set - Sample Inventory Pricing Event** Set *Logic*
- 6 **JS - Normalize & Classify Event** Code *Logic*
- 7 **Switch - Route Event Type** Switch *Logic*
- 8 **HTTP Request - Fetch Order Details** Http Request *Service*
- 9 **HTTP Request - Fetch Customer History** Http Request *Service*
- 10 **HTTP Request - Fetch Fraud Signals** Http Request *Service*
- 11 **HTTP Request - Fetch SKU Inventory** Http Request *Service*
- 12 **HTTP Request - Fetch Pricing History** Http Request *Service*
- 13 **HTTP Request - Fetch Competitor & Supplier Feed** Http Request *Service*
- 14 **Merge - Combine Order Risk Evidence** Merge *Logic*
- 15 **Merge - Combine Inventory Pricing Evidence** Merge *Logic*
- 16 **JS - Build Unified Decision Context** Code *Logic*
- 17 **HTTP Request - Claude: Decide Action** Http Request *Service*
- 18 **JS - Parse AI Decision** Code *Logic*
- 19 **IF - Confidence Meets Auto-Execute Threshold** If *Logic*
- 20 **HTTP Request - Execute Action (Auto)** Http Request *Service*
- 21 **Merge - Rejoin Auto & Flagged Paths** Merge *Logic*
- 22 **JS - Finalize Decision Record** Code *Logic*
- 23 **Postgres - Log Decision To Audit Table** Postgres *Service*
- 24 **IF - High Severity Needs Escalation Channel** If *Logic*
- 25 **Slack - Notify Escalation Channel** Slack *Service*
- 26 **Slack - Notify Low-Noise Log Channel** Slack *Service*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 26, with 3 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Postgres, Slack
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Postgres and Slack accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 26 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 26 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Froute-ecommerce-risk-and-inventory-decisions-with-claude)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Postgres](https://millionrounds.com/workflows?service=Postgres#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)

## Workflows like it

Also e-commerce, with the same services where possible, closest in size first.

- [**Reprice WooCommerce products with Amazon and Bright Data** 27 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/reprice-woocommerce-products-with-amazon-and-bright-data)
- [**Automate demand forecasting & inventory ordering with MySQL** 24 steps · MySQL, Slack](https://millionrounds.com/workflow/automate-demand-forecasting-and-inventory-ordering-with-mysq)
- [**E-commerce Order Confirmation with Airtable and Gmail** 24 steps · Airtable, Gmail](https://millionrounds.com/workflow/e-commerce-order-confirmation-with-airtable-and-gmail)
- [**Resolve ecommerce order exceptions with Claude and Slack** 24 steps · Slack](https://millionrounds.com/workflow/resolve-ecommerce-order-exceptions-with-claude-and-slack)
- [**Triage warranty claims and issue RMAs with OpenAI and Shopify** 24 steps · calls a model · Airtable, Gmail](https://millionrounds.com/workflow/triage-warranty-claims-and-issue-rmas-with-openai-and-shopif)
- [**Manage inventory reorders with Google Sheets and Slack** 22 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/manage-inventory-reorders-with-google-sheets-and-slack)
