The situation
The store’s customer service runs on a help desk platform where an AI assistant handles the first messages. The AI writes well – but on its own it has no idea where a particular order is.
Without real data, the AI can do two bad things: give generic answers (“orders usually arrive within 2–3 working days”) or, worse, make something up. Both create more work for customer service, not less.
The solution: a dedicated API endpoint for order lookups
The AI gets no access to the store. It can do exactly one thing: call an n8n endpoint with an order number or email address, and get back a ready-made answer.
- TriggerThe AI assistant calls the n8n webhookIt passes on what the customer provided: an order number or an email address.
- n8nNormalise the inputThe order number loses its prefix and spaces; the email address is lowercased.
- SplitWhat do we search by?Order number, email address, or neither.
- LookupBy order number: WooCommerce APIExactly that one order.
- LookupBy email: a custom endpoint in the storeOnly the latest order and the number of orders come back.
- n8nBuild the answerStatus in plain language, shipping date, shipping method, products.
- ActionA ready sentence back to the AIIf there’s no match or data is missing, it politely asks again.
The small details that make it work
Translating the statuses
In the store, statuses use internal names and custom abbreviations (for example, separate statuses for local and nationwide delivery). The customer, however, needs “waiting to be shipped” or “out for delivery”. A simple mapping table handles this – the AI doesn’t guess.
The many forms of an order number
Customers type it with a prefix, a hyphen, spaces or none of these. n8n turns all of them into the same number. It’s a small thing, but without it some lookups would return “no such order”.
A ready sentence, not raw data
n8n doesn’t just return data – it also returns a ready, verified sentence for the customer. The AI builds this into its reply. The system provides the facts; the AI provides the tone.
Email lookups only for a known sender
Anyone can type someone else’s email address into a chat. So use email lookups only when the help desk already knows the customer’s address from the conversation – for example, they wrote from that address or are logged in. Otherwise, ask for the order number as well.
The same logic elsewhere
Once there is a secure “window” between the store and customer service, many other processes can be built on it. In this store, for example:
- Coupon checks: customer service can ask whether a code is valid and why it isn’t working.
- Unsubscribe requests: if the customer asks in chat, the system also processes it in the email platform.
- Negative reviews: a 1–3 star Google review automatically appears as a support ticket, so the team can respond quickly.
- Error handling: if any workflow gets stuck, a central error handler sends an alert – the customer isn’t the first to notice.
What’s worth taking from this?
- Don’t give the AI full access. A dedicated API endpoint built for order lookups is safer and more reliable.
- The system provides the facts; the AI provides the tone. With ready, verified sentences there’s no guessing.
- Handle missing data. Always have a polite follow-up question for when there’s no match.
- Start with the most common question. “Where is my order?” is at the top in almost every online store.
Frequently asked questions
Does it only work with a specific help desk system?
No. It works with any help desk or chatbot that can call a webhook. On the store side it can be WooCommerce, Shopify or another platform with an API.
Isn’t it risky for the AI to see order data?
That’s why it only has access to a dedicated API endpoint built for order lookups: the bare minimum data by order number or email, nothing else. It has no direct access to the store or the customer database.
The figures in this article come from a real client account, without naming the company or its products.