Macha

How to Handle Order-Cancellation Requests (Without an Agent Touching the Order)

Abbas, Customer Support & AI, Macha

Written by

Ankeet Guha, Co-founder & CTO, Macha

Reviewed by

Published July 27, 2026

Updated July 27, 2026

"I need to cancel my order #2205. I ordered the wrong size and it hasn't shipped yet."

How to Handle Order-Cancellation Requests (Without an Agent Touching the Order)

That message is one of the most predictable tickets in ecommerce — and one of the most tedious to clear. To answer it well, an agent has to leave the helpdesk, open Shopify, find the order, confirm it hasn't shipped, switch to Stripe, find the matching payment, confirm it's refundable, calculate the amount, then come back and write a reply that gets the number and the refund timeline right. Five to ten minutes of clicking, per ticket, for a request that follows the exact same shape every single time.

By most counts this is not a rare edge case. One industry estimate puts order cancellations and address corrections at roughly 15% of all ecommerce support tickets, climbing toward a quarter of volume once you fold in the broader bucket of order modifications (Alhena AI, uncited industry analysis — treat as directional). That's a lot of identical lookups.

This post walks through how to automate the legwork of an order-cancellation request with a Macha agent — checking the order in Shopify, verifying the payment in Stripe, and drafting the reply in your helpdesk — while keeping a human in control of the one thing that should stay human: actually moving someone's money. There's a live version of this workflow on our use-cases page; here's how to build and reason about it.

What "handle" should — and shouldn't — mean

It's worth being precise about the goal, because "automate cancellations" can mean two very different things.

The tempting version is full autonomy: the agent reads the request, cancels the order, fires the refund, and emails the customer, with no human in the loop. Vendors quote impressive numbers for this — Fini, for example, cites 80–90% autonomous resolution for routine returns and cancellations. It's real, and for some teams it's the right call.

But cancellations sit on top of two facts that make full autonomy risky out of the box:

  1. They're irreversible and financial. A wrongly-issued refund isn't a typo you edit later — it's money that left the building.
  2. Eligibility depends on timing. A paid-but-unshipped order can usually be cancelled cleanly; an order that's already shipped needs a return/RMA flow instead (Omnisend). Get that distinction wrong and you've refunded something that's about to arrive on a doorstep.

So the design we'll build keeps the AI doing 100% of the research and drafting and a human approving the action. The agent collapses ten minutes of cross-app lookups into a single decision: read the draft, click send. That's the version most ecommerce teams should start with — and Macha lets you turn the dial toward full autonomy later, per scenario, once you trust the pattern.

A note on what Macha is: Macha is an AI agent layer that sits on top of the helpdesk you already run — Zendesk, Freshdesk, Gorgias, or Front. It doesn't replace your helpdesk; it adds agents that read tickets and take real actions in connected tools like Shopify and Stripe. The cancellation ticket still lives in Zendesk. Macha just does the running around.

The three connections that make it work

The whole workflow rests on three integrations, each doing one job:

ToolRole in the workflowActions used
Zendesk (or Freshdesk/Gorgias/Front)Where the ticket lives and the reply landsGet Ticket, Get Custom Fields, Add Comment
ShopifySource of truth for order status & fulfillmentGet Order, Search Orders, Get Customer
StripeSource of truth for the payment & refund eligibilityGet Payment, List Payments, (optional) Create Refund

Connect these once under Connectors and they become tools your agents can call.

Macha's Connectors screen, where helpdesk and store apps like Zendesk and Stripe are linked so agents can call them as tools.
Macha's Connectors screen, where helpdesk and store apps like Zendesk and Stripe are linked so agents can call them as tools.

A detail that matters for cancellations specifically: in this design, Shopify is used read-only — Macha's Shopify actions are Get Order, Search Orders, Search Products, Get Product, and Get Customer. There's no "cancel order" write action firing automatically; the agent reads order state to inform the draft, and a human triggers the actual cancellation. Stripe can issue refunds (it has a Create Refund action), but in the human-in-the-loop build we leave that gated behind approval too. (Shopify and Stripe connector details.)

Building the agent, step by step

1. The trigger: catch the request, not every ticket

The agent fires on a Zendesk "Ticket Created" trigger, narrowed to a condition — the customer is requesting a cancellation. You don't want this agent waking up on a shipping question or a product review. Scope it tightly: keyword/intent matching on "cancel," "cancellation," or "don't want," plus the presence of an order reference.

Macha's trigger picker, where you choose the helpdesk event that starts an agent — here a new Zendesk ticket.
Macha's trigger picker, where you choose the helpdesk event that starts an agent — here a new Zendesk ticket.

2. The tools: give it exactly three, no more

Under the agent's tools, add Shopify → Get Order, Stripe → Get Payment, and Zendesk → Add Comment. Resist the urge to hand it the whole toolbox. A cancellation agent with five tools is predictable; one with twenty is a liability. Fewer tools means fewer wrong turns and a cheaper run (each tool call is a metered AI action — more on cost below).

Macha's tool picker, where you scope an agent to exactly the actions it's allowed to take.
Macha's tool picker, where you scope an agent to exactly the actions it's allowed to take.

3. The instructions: encode the eligibility rule

This is where you turn policy into behavior. The agent's runbook should spell out, in plain language, the timing logic that a good human agent already knows:

  • Extract the order number from the ticket (and pull it from a custom field if present).
  • Call Get Order. If fulfillment_status is unfulfilled / not shipped, the order is cancellable — proceed.
  • If the order has already shipped, do not offer a cancellation. Draft a return/RMA reply instead and flag for a human.
  • Call Get Payment to confirm the charge succeeded and capture the exact amount and last-4 of the card.
  • Draft a reply that states the order number, confirms eligibility, names the refund amount and method, and sets a 5–7 business day expectation.
  • Never send and never refund without approval. Post the draft as an internal note for an agent to approve.
A Macha agent's configuration screen — Instructions, Triggers, and Tools each open from the left panel to define how the agent behaves on every ticket.
A Macha agent's configuration screen — Instructions, Triggers, and Tools each open from the left panel to define how the agent behaves on every ticket.

Encoding the shipped-vs-unshipped branch in the instructions is the single most important line in this whole build. It's the difference between an agent that's helpful and one that refunds a package mid-transit.

4. The output: a draft, not a fait accompli

When a real ticket comes in, here's what the agent produces. Take order #2205 — wrong size, not yet shipped:

  • Get Order → Order #2205, status: Unfulfilled, not yet shipped.
  • Get Payment → $89.00 via Visa ending 4242 — eligible for full refund.
  • Draft reply →

> "Hi! I can confirm your order #2205 hasn't shipped yet and is eligible for cancellation. I'll process a full refund of $89.00 to your Visa ending 4242. You should see it within 5–7 business days."

  • Then it asks: "Shall I send this and process the refund?"
A Macha agent's confirmation card — an explicit human approve-or-reject step before any action runs.
A Macha agent's confirmation card — an explicit human approve-or-reject step before any action runs.

The agent has done every lookup, caught the right amount, named the right card, and written a customer-ready reply — but the order is still uncancelled and the refund unissued until a human clicks approve. That's the whole point: the tedious 90% is automated, the consequential 10% stays supervised.

What it costs to run

Macha bills in credits, charged per AI action — not per ticket and not per "resolution." A model call or a tool call is an action. The default model, GPT-5.4 Mini, runs at 1 credit per action; other models range roughly 0.5 to 9 credits depending on how heavy they are. (See full pricing.)

For this agent, a clean cancellation is a handful of actions: read the ticket, call Get Order, call Get Payment, draft the reply. Call it a few credits per ticket on the default model — and you're paying for the agent's research, the part that used to cost you five to ten minutes of an agent's time. You don't pay extra because the customer was happy or sad with the outcome; you pay for the actions the agent took. Start a 7-day free trial, no credit card required to meter your own numbers.

When NOT to use this (the honest part)

Automating cancellations is not free of edge cases, and pretending otherwise gets you burned. Watch out for:

  • Partially-fulfilled and split-shipment orders. "Not shipped" is rarely binary. If one of three line items has shipped, a blanket "full refund" is wrong. Keep these flagged for humans until your instructions explicitly handle line-item logic.
  • Multiple payment methods / gift cards / store credit. Get Payment confirms the Stripe charge, but if part of the order was paid with a gift card or split tender, the refund math gets messy. Don't let the draft promise a single clean refund it can't deliver.
  • Subscriptions and recurring orders. "Cancel my order" sometimes means "cancel my subscription," which is a different action with retention implications. Route these separately.
  • Fraud and chargeback signals. A cancellation request on a high-risk order shouldn't be auto-drafted with a cheerful refund promise. Layer in a check, or keep flagged orders human-only.
  • Tiny teams with low volume. If you get three cancellations a week, the build-and-tune time may not pay back. This shines when cancellations are a steady, repetitive slice of your queue — which, at ~15% of ecommerce tickets, they usually are.

The good news is that none of these break the model — they just mean you keep the human-approval gate on longer for those branches, and only graduate the clean, unshipped, single-payment cases toward more autonomy once you've watched the agent get them right.

How this compares to the alternatives

Most "automate cancellations" options fall into three buckets. Helpdesk macros and rules (e.g. Gorgias) are fast to set up but static — they can template a reply, but they can't look up the live order in Shopify or check Stripe before they speak. Standalone AI agent vendors (Fini, Alhena, and others) handle the full workflow but ask you to adopt a new agent platform alongside your helpdesk. Macha's difference is that it's a layer on the helpdesk you already run: the ticket never leaves Zendesk, the agent reads live commerce data through real tool calls, and you choose per-scenario how much it's allowed to do on its own. You're not migrating; you're adding a teammate.

FAQ

Does the agent actually cancel the order in Shopify? In the recommended build, no — Shopify is used read-only (Get Order, Search Orders) to verify status, and a human performs the cancellation and approves the refund. Stripe has a Create Refund action you can enable for fuller autonomy, but the default design keeps money-movement behind a one-click approval.

How does it know if an order is eligible to cancel? Your runbook instructions encode the rule: it calls Get Order, checks fulfillment status, and treats unshipped orders as cancellable. Shipped orders are routed to a return/RMA reply and flagged for a human, because cancelling a shipped order is the wrong action.

Which helpdesks does this work with? Macha sits on top of Zendesk, Freshdesk, Gorgias, and Front. The example uses Zendesk's Ticket Created trigger and Add Comment action; the equivalents exist on the other connectors.

What does it cost per cancellation ticket? You're billed in credits per AI action (default GPT-5.4 Mini = 1 credit/action, range ~0.5–9 by model), not per ticket or per outcome. A clean cancellation is a few actions. See the pricing page for plans and credit allowances.

Can I let it run fully autonomously later? Yes. The point of starting human-in-the-loop is to watch the agent draft correct replies on real tickets. Once you trust a specific branch — say, unshipped single-payment orders under a dollar threshold — you can enable Stripe's Create Refund and remove the gate for just that case.

Try it

Order cancellations are the textbook case for an agent that's allowed to think but not allowed to spend — the boring lookups vanish, the financial decision stays human. Start a 7-day free trial, no credit card required, connect Shopify, Stripe, and your helpdesk, and build the agent above; the use-case walkthrough and the docs cover the rest.


Written by Abbas (Customer Support & AI, Macha) · Reviewed by Ankeet Guha (Co-founder & CTO) · Published 2026-06-24 · Last updated 2026-06-24.

Macha

About Macha

Macha is an AI agent platform that works on top of the help desk you already use — Zendesk, Freshdesk, Gorgias, or Front — and connects to the rest of your stack, even your own internal systems. Its AI agents resolve tickets and automate entire workflows end to end, all set up in plain English, no code. Learn more about Macha →

Zendesk
5.0 on Zendesk Marketplace

Loved by support teams worldwide

See what support teams are saying about Macha AI.

The application seems excellent to me! We are still testing, and we need support for some details and they were extremely efficient too!

Daniela Costa

Daniela Costa

Head of Support, Seabra

Macha has been a great addition to our support toolkit. It generates clear, well-organized responses that fit naturally into our workflow. One feature we particularly appreciate is its ability to automatically reply in the same language as the ticket.

Marius F

Marius F

Support Head, Zentana

We've been using Macha for a little while now and it's been really great addition so far! It's powerful, convenient, and makes getting work done a lot easier for our agents.

Alexander Wedén

Alexander Wedén

Head of Support

Support team is very helpful and responsive. Really enjoy how lightweight this is within Zendesk itself vs other more intrusive tools.

Cathleen Wright

Cathleen Wright

Zendesk Admin, Cortex IO

So far it's pretty good! Our queries are a little nuanced, so we can't always use it, but it's got enough utility for us. It can even incorporate our bilingual country with greetings in a second language.

Jae Oliver

Jae Oliver

Head of Support, Wise

Really enjoying using Macha, it has made a noticeable difference to our support team in a short amount of time. I really like the ticket summary feature, saves us a lot of time.

Harry Jackson

Harry Jackson

Head of Support, Crumb

Macha AI is a great addition to my workspace! It's powerful, convenient, and it really makes productivity so much easier for our agents!

Dave G

Dave G

Head of Support, Cyber Power Systems

Very impressed! AI integration for Zendesk has certainly come a long way and Macha seems to set the standard for now. This will for sure save lot of time in our support team.

Pauli Juel

Pauli Juel

Head of CS, Dokument24

Macha has been working great for us so far! The auto-responses are accurate and our resolution time has dropped significantly.

Lana T

Lana T

Zendesk Admin, Swotzy

Macha AI is a great addition. The knowledge base feature means our agents always have the right answers at their fingertips.

Mischa Wolf

Mischa Wolf

Head of Support, Topi

We're enjoying this integration so far. It's made our support team more efficient and our customers get faster responses.

Paula G

Paula G

Head of Customer Support, Xly Studio

The team enjoys using it. It saves considerable time on common questions and the integration options are excellent.

Kilian Leister

Kilian Leister

Support Head, Didriksons

Ready to supercharge your team with AI?

Get started in minutes. Connect your tools, configure your agents, and let AI handle the rest.

500 free credits · no time limit, no credit card