How to Answer Product Availability Questions Automatically (Without Guessing at Stock)
"Is the Comfort Hoodie in size L in stock?"
It's one of the most common questions an ecommerce support team gets — and one of the most annoying to answer well. The customer can't tell from the product page. Your agent has to leave the helpdesk, open Shopify admin, search the catalog, find the right variant, read the inventory number, switch back, and type a reply. Multiply that by a few hundred tickets a week and you've turned a 10-second lookup into a real chunk of your team's day. Worse, if someone answers from memory or a stale spreadsheet, you've just promised stock you don't have.
Stock availability sits among the most common pre-purchase questions ecommerce teams field — alongside sizing and the post-purchase "where's my order?" Shopify's own guidance groups stock, sizing, fit, and delivery as the high-intent questions where a slow answer kills the sale, and it flags exactly this kind of high-volume, low-complexity query as the first thing to automate. The ecommerce-support vendors agree on the prize: Gorgias positions its AI agent to "resolve up to 60% of inquiries instantly" — the bulk of which are repetitive lookups like stock, returns, and order status (note "up to" is a ceiling; Gorgias's own case studies land closer to the 26–56% range, so treat 60% as a best case, not a baseline). This post walks through how to answer product availability questions automatically by building a Macha agent that reads the ticket, checks your live Shopify inventory, and replies in your existing helpdesk — no human in the loop for the easy cases, and a clean handoff for the rest.
A quick framing note before we build: Macha is not a helpdesk. It's an AI agent layer that sits on top of the Zendesk, Freshdesk, Gorgias, or Front you already run. You keep your helpdesk; Macha gives it agents that can actually take actions — like querying Shopify and posting the reply back on the ticket.
Why "is it in stock?" is harder to automate than it looks
A generic FAQ bot or a canned macro can't answer this question, because the answer changes by the minute. The correct response depends on three things that a static knowledge base never knows:
- Which product the customer actually means (they rarely type the exact title — "the grey hoodie," "your comfort one").
- Which variant — size L vs XL, a specific colour, a particular SKU.
- The real-time inventory count for that variant, right now.
That's why availability is a tool problem, not a knowledge problem. The agent doesn't need a better article; it needs live read access to your store. Macha's Shopify integration gives it exactly that: Search Products (find the item by title, SKU, vendor, or type) and Get Product (pull full variant detail including inventory levels). Pair those with your Zendesk connection — read the ticket, post the reply — and you have everything the workflow needs.
The availability agent is a close sibling of the order-status ("where's my order") agent — same shape, same Shopify connector, just different read tools. Here's that order-status agent in Macha to show the pattern; the availability build below swaps Get Order for Search Products + Get Product.
The workflow, end to end
Here's the exact shape of the agent we're building. It's a single autonomous flow with one trigger, two Shopify lookups, and one reply.
| Step | Where | What happens |
|---|---|---|
| 1. Trigger | Zendesk | A new ticket arrives; the agent decides whether it's an availability question |
| 2. Find the product | Shopify | Search Products matches the customer's wording to a real catalog item |
| 3. Read inventory | Shopify | Get Product returns the variants and current stock levels |
| 4. Reply | Zendesk | The agent posts a public reply with the answer and a product link, then sets the ticket to Solved |
A worked example, drawn straight from the Macha use-case template:
Customer: "Do you have the Comfort Hoodie in size L? I can't tell from the website if it's in stock." Agent (internally): searches Shopify for "Comfort Hoodie" → reads variants → Size L: 12 in stock, Size XL: 3. Agent (reply): "Great news — the Comfort Hoodie in size L is in stock; we have 12 available. You can grab one here: [link]. Anything else I can help with?" Ticket status → Solved.
The whole thing takes seconds and never touches an agent's queue.
Building it in Macha
1. Connect Shopify and your helpdesk
In Connectors, add Shopify (API key) and your helpdesk. The Shopify connector is read-focused for this use case — it needs product and inventory scope, nothing that can mutate your store.
2. Create the agent and describe the job
Spin up a new agent and tell it what it's for, in plain language — Macha's builder turns your description into a working configuration you can refine. Something like: "When a customer asks whether a product is in stock or available in a specific size/variant, search Shopify for the product, read the inventory level for the variant they mentioned, and reply with the current availability and a link. If the product is out of stock or you can't confidently match it, don't guess — hand off to a human."
3. Attach the tools
This is the part that makes the answer real instead of hallucinated. On the agent's tools tab, attach the Shopify Search Products and Get Product actions, plus your helpdesk's reply action. The agent can only do what you grant it — so it gets read access to the catalog and the ability to post a comment, and nothing more.
4. Set the trigger to run autonomously
Point the agent's trigger at Ticket Created in Zendesk. The agent evaluates every new ticket, recognises the availability questions, and handles them; everything else passes through untouched. No human has to route these.
5. Test before you let it loose
Run it against a few real (or realistic) tickets first and watch what the agent actually does — which product it matched, which variant it read, what it wrote back. Tighten the guidance until the matching is reliable, then enable it on the live queue.
Getting the answer right, not just fast
A fast wrong answer is worse than a slow right one. A few things to bake into the agent's instructions:
- Confirm the variant. If the customer says "size L" but the catalog has L in two colourways, have the agent ask one clarifying question rather than guess.
- Handle out-of-stock gracefully. When the variant is at zero, don't dead-end the customer — offer the back-in-stock option, suggest the nearest available size, or hand off. An out-of-stock reply is a prime moment to recommend an alternative rather than lose the sale — answering the pre-purchase question quickly is what converts intent into an order.
- Don't promise what you can't see. If
Search Productsreturns nothing confident, the agent should hand off to a human instead of inventing a number. This is the single most important rule. - Mind low-stock honesty. "Only 3 left" can drive urgency, but make sure the count is genuinely live — which, because the agent reads it from Shopify at reply time, it is.
When not to use this
This pattern is excellent for the common case and a poor fit for a few others. Be honest about the edges:
- Bundles, made-to-order, or pre-orders. If availability is governed by component stock, a build queue, or a launch date rather than a simple inventory number, a single
Get Productlookup won't capture it. Route these to a human or a more specialised flow. - Multi-warehouse / location-specific stock. "Is it available at the Austin store?" depends on which inventory location the customer means. Make sure your Shopify locations are modelled and the agent knows which one applies — otherwise scope it to online stock only and say so.
- Non-Shopify catalogs. This specific build relies on the Shopify connector. If your inventory lives in an ERP or a custom system, you'd expose it through a custom API tool instead — doable, but a different post.
- Restock dates and ETAs. Inventory tells you whether something is in stock, not when it's coming back. If customers want dates, the agent needs a separate source of truth for that — don't let it improvise.
The rule of thumb: automate the questions where the answer is a clean lookup, and design the agent to escalate the moment it isn't.
What it costs to run
Macha bills in credits, and a credit is spent per AI action — not per resolved ticket. A typical availability answer is a small handful of actions (read the ticket, search products, read the product, reply), and the credit cost per action depends on the model you choose: roughly 0.5–9 credits by model, with the default GPT-5.4 Mini at 1 credit. Lighter models keep high-volume, low-complexity questions like stock checks cheap — which is exactly the kind of query you want running on a fast, inexpensive model.
You can prove out the whole workflow on the 7-day free trial, no credit card required; see pricing for plan details and credit allowances.
FAQ
Does Macha replace my helpdesk? No. Macha is an AI agent layer on top of Zendesk, Freshdesk, Gorgias, or Front. The customer experience stays in your helpdesk; Macha adds agents that can query Shopify and post replies on the ticket.
How does the agent know real-time stock instead of a cached number? It reads inventory live at reply time via Shopify's Get Product action, which returns current variant-level inventory. There's no static copy to go stale.
What happens if the agent can't find the product? Configure it to hand off rather than guess. If Search Products doesn't return a confident match, the agent should escalate to a human instead of inventing an availability answer — this is the guardrail that keeps the automation trustworthy.
Can it answer order questions too, not just availability? Yes. The same Shopify connector exposes Get Order and Search Orders, so a related agent can handle "where's my order?" tickets. Availability and order-status are natural companion use cases.
Will it work for variants like size and colour? Yes — Get Product returns the full variant list with per-variant inventory, so the agent can answer "size L specifically" rather than just "the hoodie generally." Tell it to confirm the variant when the customer is ambiguous.
Want to see it on your own catalog? Connect Shopify and your helpdesk, build the agent, and test it on real tickets — start with the 7-day free trial, no credit card required. More patterns like this live on the Macha blog and in the docs.
Automate your support workflows
Macha's AI agents run entire workflows end to end across your stack.
Shopify
Stripe
Slack
Notion
Google Workspace
Confluence

