Skip to content

The moment it happens

Post the matching order to Slack when a refund or dispute arrives

When a refund request or chargeback comes in, your finance channel sees the WooCommerce order it belongs to, with items, dates and shipping status.

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

Send this to your assistant

Create a ClickRuntime automation: when Stripe reports a dispute or my helpdesk sends a refund ticket to this link, find the WooCommerce order by order number or email and post its details to #finance.

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 chargeback notice arrives with an amount and an email address. Before anyone can respond, someone has to search WooCommerce for the order, check what was bought, when it shipped and whether there's tracking. With a short deadline to respond, that lookup often happens late or not at all.

Posting the matching order straight into #finance means the person handling it starts with the facts. Disputes get answered on time, and refunds are decided on the order history rather than the customer's description.

What you get out of it

  • Respond inside dispute deadlines

    Card networks give a limited window to submit evidence. Having the order in front of you on day one makes a response far more likely.

  • Less searching

    Nobody has to log in and hunt for the order by email address. The details arrive with the alert.

  • Fairer refund decisions

    Seeing shipping status and order date helps you spot refunds requested before delivery or long after the return window.

  • One place for finance

    Disputes and refund tickets from different sources land in the same channel, so nothing waits in someone's inbox.

How it works

What happens, step by step

  1. A dispute from Stripe or a refund ticket from your helpdesk arrives at your automation's link.

  2. ClickRuntime picks out the order number or the customer's email address.

  3. It searches your WooCommerce store for the matching order.

  4. If AI is available, it writes a short evidence summary from the order details.

  5. It posts the order details to #finance in Slack.

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
Post the matching order to Slack when a refund or dispute arrivesjust nowSucceeded
Slack · #finance🚨 Order #10482 – buyer@acme.com, $129.00, placed 2026-09-28, status completed. 1× Northwind Backpack

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
  • Change what the AI looks for, or how it writes the result
  • 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.
refund_and_dispute_handling_with_order_lookup.pyexample
import re
from clickruntime import on_event, credentials, http, notify, ai

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

@on_event
def handle(event):
    body = event.json or {}
    obj = body.get("data", {}).get("object", body)
    text = str(obj)
    email = obj.get("email") or obj.get("billing_details", {}).get("email") or ""
    number = re.search(r"#?(\d{4,})", obj.get("subject", "") + " " + obj.get("description", ""))
    auth = (credentials.secret("WOO_KEY"), credentials.secret("WOO_SECRET"))
    params = {"include": number.group(1)} if number else {"search": email, "per_page": 1}
    orders = http.get(f"{STORE}/orders", auth=auth, params=params).json() if (number or email) else []
    if not orders:
        notify.slack(f":rotating_light: Refund/dispute received, no matching order found ({email or 'no email'})", channel="#finance")
        return {"found": False}
    o = orders[0]
    items = ", ".join(f"{li['quantity']}× {li['name']}" for li in o["line_items"])
    msg = f":rotating_light: Order #{o['number']} – {o['billing']['email']}, ${o['total']}, placed {o['date_created'][:10]}, status {o['status']}\n{items}"
    try:
        msg += "\n" + ai.generate(f"In 2 sentences, summarise dispute evidence from this order: {o}"[:4000], max_output_tokens=150).text
    except ai.AIError:
        pass
    notify.slack(msg, channel="#finance")
    return {"found": True, "order": o["number"]}

FAQ

Common questions

What does it search by?
The order number if the ticket or dispute includes one, otherwise the customer's email address, picking their most recent order.
What if no order matches?
It still posts the alert to #finance, marked as not found, so someone can look by hand.
Can it summarise evidence for the dispute?
Yes. If AI is available it adds a short summary of the order facts that are useful as dispute evidence.
What permissions does it need?
Woo read; chat:write. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in 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 “Post the matching order to Slack when a refund or dispute arrives” from your assistant

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