Skip to content

The moment it happens

Flag risky new store orders in Slack before shipping

Every new WooCommerce order is checked for warning signs, and risky ones are put on hold and posted to Slack before anything ships.

Runs
The moment it happens
Apps
Slack, WooCommerce
AI
Not needed
Access
Woo read+write; chat:write

Send this to your assistant

Create a ClickRuntime automation: when a WooCommerce order is created, check for a billing and shipping country mismatch, an order over $500 or several orders from one IP in a day; post risky ones to #orders and put them on hold.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A store that ships the same day can't afford to review every order by hand, but one fraudulent high-value order can wipe out a week's margin once the chargeback lands. The warning signs are well known: mismatched countries, unusually large baskets, a burst of orders from one address.

Checking each order against simple rules the moment it's placed, and holding the risky ones, gives someone a chance to look before the parcel leaves.

What you get out of it

  • Stop before shipping

    A held order can be cancelled with a refund. A shipped one becomes a chargeback, the lost goods and a fee.

  • Only risky orders need attention

    Normal orders flow through untouched, so the team reviews a handful of flagged orders instead of all of them.

  • Rules you can read

    Every flag says why, such as a country mismatch, so whoever reviews it knows what to check.

  • Card-testing bursts are caught

    Several orders from one IP address in a day is a common sign of stolen cards being tried, and is flagged automatically.

How it works

What happens, step by step

  1. WooCommerce sends each new order to your automation's link as soon as it's placed.

  2. ClickRuntime checks it against your rules: country mismatch, order value and how many orders the same IP address placed today.

  3. Order counts per IP address are kept for the day so repeat orders can be spotted.

  4. Risky orders are set to on-hold in WooCommerce and posted to #orders in Slack with the reasons.

Before it runs live

  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
  • Connect WooCommerce
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Flag risky new store orders in Slack before shippingjust nowSucceeded
Slack · #orders⚠️ Order #10517 put on hold: billing GB vs shipping NG; high value $1,240.00

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Google Sheets
  • Combine it with other Slack and WooCommerce steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
order_fraud_alerts.pyexample
from clickruntime import on_event, credentials, http, state, notify

STORE = "https://shop.example.com/wp-json/wc/v3"
MAX_TOTAL = 500

@on_event
def handle(event):
    o = event.json or {}
    if "id" not in o:
        return {"skipped": "not an order"}
    ip = o.get("customer_ip_address", "")
    state.increment_metric(f"ip:{ip}", ttl_days=2)
    today = state.query_metric(f"ip:{ip}")
    count = today[-1]["value"] if today else 1
    reasons = []
    if o["billing"].get("country") and o["shipping"].get("country") and o["billing"]["country"] != o["shipping"]["country"]:
        reasons.append(f"billing {o['billing']['country']} vs shipping {o['shipping']['country']}")
    if float(o["total"]) > MAX_TOTAL:
        reasons.append(f"high value ${o['total']}")
    if count > 3:
        reasons.append(f"{count} orders from {ip} today")
    if not reasons:
        return {"order": o["id"], "risky": False}
    auth = (credentials.secret("WOO_KEY"), credentials.secret("WOO_SECRET"))
    http.put(f"{STORE}/orders/{o['id']}", auth=auth, json={"status": "on-hold"}).raise_for_status()
    notify.slack(f":warning: Order #{o['number']} put on hold: " + "; ".join(reasons), channel="#orders")
    return {"order": o["id"], "risky": True, "reasons": reasons}

FAQ

Common questions

What rules does it check?
Billing and shipping countries that differ, an order total over your limit, and more than three orders from the same IP address in a day. You can add your own, such as first-time customers over a certain amount.
Will it cancel orders?
No. It only sets risky orders to on-hold so they aren't fulfilled. You decide whether to cancel or release them.
How do I connect WooCommerce?
Add a webhook in WooCommerce for Order created, pointing at your automation's trigger link, and save a read/write REST API key in your ClickRuntime dashboard.
What permissions does it need?
Woo read+write; chat:write. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Flag risky new store orders in Slack before shipping” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.