Skip to content

The moment it happens

Get refund details in Slack

Every refund, partial ones included, is posted with the order number, amount and reason.

Runs
The moment it happens
Apps
WooCommerce
AI
Not needed
Access
read (write to create webhook)

Send this to your assistant

Create a ClickRuntime automation: when an order is refunded in my WooCommerce store, fully or partly, post the order number, refunded amount and reason to #support in Slack.

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

Refunds in a WooCommerce shop can be created by any staff member with the right permissions, and each one is money leaving the business. Without a signal, the owner sees them only in the monthly accounts. A pattern, such as a product with many refunds, a staff member issuing large refunds without a note, or a customer refunded repeatedly, goes unnoticed for weeks, long after something could have been done about it.

When a refund is registered, WooCommerce sends an event. The automation checks the order's status and refunds, fetches the refund reason, and posts the order number, amount and reason to Slack so the owner sees every refund as it happens.

It is a good control for shops with several staff, and for owners who want to track why customers ask for money back.

What you get out of it

  • Spot refund patterns early

    Three refunds for the same product in a week suggest a quality problem. Seeing each one live lets you check the product while there is still stock to inspect. A product pulled from sale early costs less than a month of refunds.

  • Oversight of staff-issued refunds

    A visible message for every refund gives the owner a light-touch control, so an unusual amount or a missing reason is questioned the same day. A control that costs nothing in staff time is easy to keep running.

  • Reasons feed product decisions

    The refund reason shows whether items are arriving damaged, not matching photos, or simply wrong in size. That guides what to fix in the listing or packaging. Small fixes to a description or box can cut the same complaint in future orders.

  • Reconciliation is easier

    The channel history lists each refund with its amount and date, which your bookkeeper can match against payment processor reports without chasing. That saves the finance person from reconstructing refund dates at month end.

  • Possible fraud is visible

    Repeated refunds for one customer, or a refund soon after a large order, stand out when they appear in a feed rather than inside a table of orders. Patterns like these are almost impossible to see inside a long table of orders.

How it works

What happens, step by step

  1. When an order in your WooCommerce store is refunded, in full or in part, ClickRuntime picks it up.

  2. It reads the refunded amount and the reason given for the refund.

  3. A message goes to your #support Slack channel with the order number, amount and reason, so the team can see why it happened.

Before it runs live

  • Connect WooCommerce
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Get refund details in Slackjust nowSucceeded
Slack · #supportPartial refund on order #5490: USD 24.00 Reason: Item arrived damaged

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 Slack
  • Combine it with other 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.
refund_alert_woocommerce.pyexample
from clickruntime import on_event, credentials, http, state, notify

STORE = "https://yourstore.com/wp-json/wc/v3"

@on_event
def handle(event):
    order = event.json
    if not order.get("refunds"):
        return {"posted": False}
    auth = (credentials.secret("WC_CONSUMER_KEY"), credentials.secret("WC_CONSUMER_SECRET"))
    refunds = http.get(f"{STORE}/orders/{order['id']}/refunds", auth=auth).json()
    seen = set(state.get(f"refunds:{order['id']}") or [])
    new = [r for r in refunds if r["id"] not in seen]
    for r in new:
        kind = "Full" if order["status"] == "refunded" else "Partial"
        notify.slack(f"{kind} refund on order #{order['number']}: {order['currency']} {r['amount']}\n"
                     f"Reason: {r.get('reason') or 'none given'}", channel="#support")
    state.set(f"refunds:{order['id']}", [r["id"] for r in refunds])
    return {"posted": len(new)}

FAQ

Common questions

Does it fire for partial refunds?
Yes. A refund of part of an order is still a refund event, and the message shows the amount refunded. The order may remain in processing or completed status, so the message states what was returned.
What if no reason was entered?
The message shows the reason as blank, which is itself a signal. If you want staff to always enter one, the blank reason in the channel gives you a reason to remind them. That reminder costs nothing and improves your data.
Is the refund also sent back to the customer's payment method?
This only reports that a refund was registered in WooCommerce. Whether money is returned automatically depends on the payment gateway and how the refund was issued, which this alert does not change. The alert records only what WooCommerce reports.
What permissions does it need?
read (write to create webhook). 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 “Get refund details in Slack” from your assistant

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