Get started
How the agent gets live prices
When a customer asks a price or stock question on WhatsApp, the agent does not remember an answer: it calls a tool, WaForge calls your website with a signed request, and your website answers from your own database. This page shows exactly what happens, step by step.
The sequence #
- Customer to agent"Is the black card in stock? How much?"
- Agent to WaForge ConnectTool calls
check_availabilityandget_product - WaForge ConnectFresh copy in cache? Stock 60 s, price 300 s, orders never
- WaForge Connect to your website
POST /waforge/availability+WaForge-Signature - Your websiteChecks the HMAC, reads your database
- Your website to WaForge Connect200
{data, as_of, ttl} - WaForge Connect to agentResult with
as_ofandfresh: true - Agent to customer"Yes, 3 in stock, 249 QAR."
- If anything failsTimeout, error, bad signature or stale value: the agent says it will check with the team and hands the chat to your inbox
Step by step #
- The customer writes on WhatsApp to your business number. The AI agent reads the message and decides it needs a fact it does not have.
- The agent calls a tool, for example
check_availabilitywith a product id. The agent never sees your secret, your database or your URL: it only sees the tool result. - WaForge checks its short cache. A recent answer can be reused, but never for longer than your
ttland never longer than the cap for that kind of data (caching rules). Order status is never cached. - WaForge calls your feed over HTTPS on port 443, on your verified domain only, with a
WaForge-Signatureheader. It waits 2.5 seconds by default (you can ask for 1 to 5 seconds in your manifest). - Your site verifies the signature with your feed secret and reads the value from your own database. The kits do this for you.
- Your site answers with a small JSON envelope:
data,as_of(when the value was true) andttl(how many seconds it may be reused). - WaForge checks the answer: valid envelope, and for stock, prices, slots and delivery, a value no older than its cap. It cleans the text (HTML, hidden characters) and hands the result to the agent.
- The agent replies with the value it just read. Every tool call is logged with its source, status and time.
What your site receives #
POST /waforge/availability HTTP/1.1
Host: shop.example.com
Accept: application/json
Content-Type: application/json
WaForge-Signature: t=1762424160,kid=fs_k3j9x0aq1m2b7c,v1=5f0c2a...e91b
WaForge-Request-Id: 2b8f7c0e-4d1a-4c2e-9a57-0c1d2e3f4a5b
WaForge-Tenant: wf_tn_Xc81pQ0aZr7mT2Lk
{"items":[{"product_id":"p_1001","quantity":1}]}HTTP/1.1 200 OK
Content-Type: application/json
{"data":{"items":[{"product_id":"p_1001","available":true,"quantity_available":3,"status":"low_stock"}]},
"as_of":"2026-11-07T10:15:00Z","ttl":30}Which agent tool calls which endpoint #
| Agent tool | Calls on your feed | Notes |
|---|---|---|
search_catalog | GET catalog.search | q and limit (the agent asks for at most 10) |
get_product | GET product.get | If that answers 404 and you declare product.by_sku, the same id is tried as a SKU |
check_availability | POST availability | One item per request, quantity: 1 |
get_price_quote | GET product.get per item, then GET delivery.zones if a zone is given | WaForge multiplies your prices and adds the zone fee. Your /quote endpoint is not called yet. |
lookup_order | POST order.status | Sends the customer's WhatsApp number from the chat session, never a number the customer typed |
get_delivery_options | GET delivery.zones | |
get_booking_slots | GET booking.slots | At most 14 days between from and to |
create_order, create_booking | Nothing (create_booking re-reads booking.slots first) | The confirmed request is put in your WaForge inbox for your team. Nothing is written to your site and nothing is charged. |
get_business_hours, search_faqs | Nothing | Answered from the hours and FAQs in your agent setup |
Without a live feed, search, product and stock questions are answered from your Google Sheet or CSV catalog. Orders, delivery zones and booking slots need a live feed.
When the agent hands off #
The tool result tells the agent not to state a value, and to hand the chat to a person, when:
- your feed times out (2.5 s by default), cannot be reached, or answers anything other than 2xx or 404;
- your feed refuses our signature (401), for example after a secret rotation you have not deployed yet;
- the answer is not a valid envelope (
data,as_of, integerttl); - a stock, price, slot or delivery value is older than its cap (for example stock with an
as_ofmore than 60 s ago); - your feed failed 5 times in a row: WaForge then pauses calls to it for 60 seconds;
- stock from a sheet or CSV is older than 24 hours.
A 404 is not a failure: the agent says it could not find the item or order. The handoff puts the chat in your inbox and alerts you; the customer is told someone will check.
Next #
Pick how to expose your data: Connect your website.