Skip to main content
“Where is my order” is the single most common message any shop receives, and knowledge alone can never answer it — the answer is in your database, not on your website. By the end of this you will have an agent that looks the order up and answers, and refuses to do it for a stranger.
1

Build an endpoint that takes an order number

Keep it narrow. This will be called by a model on behalf of a member of the public, so it should do exactly one thing.
Express
Require two facts, not one. An order number alone is guessable — they are usually sequential. Asking for the number and the email on the order means a stranger typing #10432 learns nothing.Return the same found: false for “no such order” and “wrong email”. A different response for each is an oracle for which order numbers exist.
2

Add it as an action

On the agent’s Actions page, add a custom HTTP action.Describe it in the words the model needs:
That last sentence is worth writing. Without it a model will helpfully report “that order doesn’t exist”, which is both wrong and an information leak.
3

Try it in the Playground

Test all four cases, not just the happy one:
4

Ship it

The action works identically on WhatsApp and Telegram — you configured it once, on the agent.

Doing better: skip the questions entirely

If the customer is signed in and verified, your server already knows who they are. Send their customer id along with the request and the agent can list their recent orders without asking anything. That is the difference between a bot that interrogates people and one that recognises them.

What good looks like