Meta Business Agent Platform

Order status checks

Updated: Sep 4, 2026
Copy for LLM
“Where is my order?” is the highest-volume question most retailers receive, and the one best suited to an agent: the answer exists in a system, it changes constantly, and no judgment is needed to read it out. What takes care is everything around the lookup — working out which order is meant without demanding a reference number, turning internal fulfillment states into a sentence a customer can act on, and recognizing the small number of cases where the honest answer is that a person needs to look. This page covers all of it.
The agent handles:
  • Finding the customer’s orders from the conversation, without a reference number
  • Choosing between several open orders, or asking when the choice is genuinely unclear
  • Reporting a current state and an expected date in plain language
  • Answering follow-ups about one item within a multi-item order
  • Recognizing a late or stalled delivery and escalating instead of reassuring
  • Declining to speculate when tracking data is missing or stale

Who this guide is for

The examples use a furniture retailer, but the pattern fits any business that fulfills something over time and gets asked about progress. The interesting variation is what “an order” means and how long it stays open.
Organization typeWhat is being trackedThe state that causes most contacts
Furniture and large goods
Delivery slots weeks out, part-shipments
Waiting for a slot to be offered
Apparel and general retail
Parcels in a carrier network
Handed to carrier, then apparently nothing
Grocery and meal delivery
Same-day slots, substitutions
Driver delayed, item substituted
Trade and building supplies
Branch collection, bulk deliveries
Partially available, waiting on stock
Repairs and servicing
A job moving through workshop stages
Awaiting parts
This guide covers the tracking question on its own. Order status inside a broader support conversation — alongside returns, complaints, and ticket creation — is in Customer support agent, which uses the same order lookup as one tool among several. If a status question is likely to lead into a return, configure both.
Each step below notes how the API is used in other scenarios, then applies it to the furniture example.

Prerequisites

  • An onboarded and enabled Meta Business Agent (rollout.enabled: true) — see End-to-end setup
  • A valid system user access token (SUAT) or Business Integration System User (BISU) token with the whatsapp_business_messaging permission — see Generate an access token
  • Your WhatsApp Business phone number ID ({entity_id}) — find it in WhatsApp Manager⁠ under Account tools > Phone numbers
  • An HTTPS endpoint that lists a customer’s recent orders and returns fulfillment state for one
  • A decision about how much order detail may be released against a phone number match alone — see Decide the identification bar
  • A staffed destination for orders that need a person, required by Escalate a stalled order

Decide the identification bar

Before configuring anything, decide what a phone number match entitles someone to. This is a policy question, not a technical one, and it has to be answered before the tools are written.
The WhatsApp phone number tells you the message came from a handset registered to that number. It does not tell you who is holding it. Between “ask nothing” and “verify every time” there is a workable middle, and most retailers land there.
ApproachWhat the agent disclosesReasonable when
Phone match alone
Order state and expected date, no addresses or payment details
Low-value goods, delivery address already known to the household
Phone match plus one detail
The above, after confirming a postcode or order total
Higher-value goods, or where a delivery address may be new
Full verification
Everything, including addresses and payment state
Regulated goods, high value, or anything sent to a new address
Whatever you choose, keep the disclosure minimal at the lower bars. A status and a date answer the question. An address, a payment method, and a full item list answer questions nobody asked and are exactly what someone holding a borrowed phone would like to see.
If you need full verification, configure it as described in Customer OTP authentication and set user_auth_required to true on the tools below. The examples here assume the first bar, a phone match alone. If you choose the middle bar, add the confirming detail to your endpoint and to the agent instruction before using them.
Where else this applies. Every agent reading personal data over a messaging channel needs this decision made deliberately and written down. Left implicit, it gets settled by whatever the tool happens to return, which is usually far more than intended.

Add agent instructions

Agent instructions shape how the agent responds. The title is a short identifier limited to lowercase letters, numbers, and hyphens, description tells the agent when to apply the instruction, and skill contains the instruction text.
curl -X POST "https://api.facebook.com/{entity_id}/agent_config/skills" \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -H "X-API-Version: 2.0.0" \
  -d '{
  "title": "order-status",
  "description": "Applied when a customer asks where their order is, when it will arrive, whether it has been dispatched, or about a delivery that has not turned up.",
  "skill": "Call list_customer_orders before asking anything, since most customers have exactly one open order and asking for a reference is the thing they most dislike. When exactly one order is open, answer about that one and say which it is. When several are open, list them briefly by item and date and ask which they mean. When none are open, say so and ask for an order number rather than guessing at older orders. Report the status and the expected date exactly as the tool returns them, reading out the plain-language status it provides rather than renaming it or interpreting the internal state yourself. Never estimate, extrapolate, or reassure beyond what the tool returned, and never say an order is on its way when the tool says it is awaiting stock. When the tool flags an order as delayed, say the delivery looks delayed and raise it with a colleague rather than asking the customer to wait, and never work out for yourself whether an order is late. Give the tracking reference only when get_order_detail has returned one. Do not read out the delivery address, payment details, or the full item list unless the customer asks about a specific item. Do not offer refunds, discounts, or compensation."
}'
The prohibition on reassurance is the clause that earns its place. Asked about a late delivery, an unrestrained agent produces “it should be with you soon” — which is not in the data, is often untrue, and converts a customer who would have accepted an escalation into one who waits another two days and then complains.
Where else this applies. Any agent reporting on a process it does not control needs an explicit boundary between reporting and predicting. Reading a state is safe; inferring what happens next is where an agent invents commitments the business then has to honour.

Define connector tools

Connector tools define the operations the agent can invoke. Each tool needs a name, a description, user_auth_required, and a request_definition describing the outbound HTTP call.
A name can contain only letters, numbers, and underscores. Spaces, hyphens, and other punctuation are rejected. It also cannot start or end with an underscore, or contain two underscores in a row, so check_order_status is accepted while _check_order, check_order_, and check__order are not. The same rules apply to a connector’s name.
Status checking needs two tools: one to find the orders, one to detail a chosen order. Splitting them keeps the common case cheap, since most conversations are answered from the list alone.

List the customer’s orders

curl -X POST "https://api.facebook.com/{entity_id}/agent_connectors/{connector_id}/tools" \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -H "X-API-Version: 2.0.0" \
  -d '{
  "name": "list_customer_orders",
  "description": "Returns recent orders for the customer messaging, most recent first, each with its reference, a short item summary, the plain-language status, the expected date, and whether it is flagged as delayed. Call this at the start of any question about an order or a delivery, before asking for an order number. Returns open orders by default. Does not include delivery addresses or payment details.",
  "user_auth_required": false,
  "request_definition": {
    "method": "GET",
    "path": "/orders",
    "query_parameters": {
      "customer_phone": {
        "type": "string",
        "description": "The customer WhatsApp phone number, used to find their orders.",
        "required": true,
        "binding": {
          "kind": "macro",
          "macro": "WHATSAPP_PHONE_NUMBER"
        }
      },
      "include_completed": {
        "type": "boolean",
        "description": "Set true only when the customer is asking about an order that has already been delivered."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum orders to return. Use 5 or fewer so the reply stays readable."
      }
    }
  }
}'
Binding customer_phone with the WHATSAPP_PHONE_NUMBER macro means the value comes from the conversation rather than from anything the agent composes. Validate it server-side regardless: a binding constrains what the agent can send, not what reaches your endpoint.
Default to open orders only. A list that includes everything delivered in the past year buries the one order the customer is asking about and makes the agent choose, which it will sometimes do incorrectly.

Get detail for one order

curl -X POST "https://api.facebook.com/{entity_id}/agent_connectors/{connector_id}/tools" \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -H "X-API-Version: 2.0.0" \
  -d '{
  "name": "get_order_detail",
  "description": "Returns full fulfillment detail for one order: each item with its own status and expected date, the carrier and tracking reference where dispatched, the delivery window if booked, and how long the tracking has been static. Call this only when the customer asks about a specific item or a single order from a list already shown, asks for tracking, or when list_customer_orders flags the order as delayed. Match the order reference exactly as the customer gave it and never against a partial or similar reference.",
  "user_auth_required": false,
  "request_definition": {
    "method": "GET",
    "path": "/orders/{order_reference}",
    "path_parameters": {
      "order_reference": {
        "type": "string",
        "description": "The order reference, taken from list_customer_orders or given by the customer in full."
      }
    },
    "query_parameters": {
      "customer_phone": {
        "type": "string",
        "description": "The customer WhatsApp phone number, used to confirm the order belongs to them.",
        "required": true,
        "binding": {
          "kind": "macro",
          "macro": "WHATSAPP_PHONE_NUMBER"
        }
      }
    }
  }
}'
Always send the phone number alongside the reference and check ownership server-side. An order reference is a guessable string, and an endpoint that returns detail for any valid reference will eventually be asked for one that is not the customer’s.
Exact reference matching matters. Given a partial reference an agent will find the nearest match and report on it with complete confidence, which is how one customer gets told about another’s delivery.
Return how long the tracking has been static as a number rather than leaving the agent to work it out from timestamps. Elapsed-time arithmetic is something agents get wrong in whichever direction is more reassuring.
Where else this applies. The list-then-detail split suits any lookup where one cheap call answers most questions: appointments, claims, applications, repairs. It keeps the common path to a single round trip and confines the expensive call to the minority of conversations that need it.

Translate the states

Internal fulfillment states are written for warehouse systems. Customers reading them in a chat either misunderstand or get alarmed, and the ones that sound reassuring are often the ones that are not.
Do the translation in your endpoint, not in the agent instruction. Return a plain-language status alongside the raw one, and have the agent read out the plain version. A mapping in your service is testable and changes in one place; a mapping described in a prompt drifts and gets applied inconsistently.
Internal statePlain-language statusWhat the customer should understand
AWAITING_STOCK
Waiting for stock to arrive with us
Not yet on its way, and the date may move
ALLOCATED
Reserved for you, not yet packed
Progressing, nothing to do
PICKED
Being prepared for dispatch
Progressing, nothing to do
MANIFESTED
Handed to the carrier
Tracking should start updating shortly
IN_TRANSIT
On its way
A date, and tracking if they want it
SLOT_BOOKED
Delivery booked
The date and window
EXCEPTION
There is a problem with this delivery
A person is looking at it
PART_SHIPPED
Some items sent, the rest to follow
Which items, and when the rest is expected
MANIFESTED is the state worth designing around. It means the parcel has left you and the carrier has not scanned it yet, which reads to a customer as “nothing is happening” for anything from hours to days. Say what it means and what happens next, or that gap becomes a second contact.
Return a single current status rather than a full event history. Customers ask where their order is, not for an audit trail, and a history invites the agent to narrate it.

Escalate a stalled order

Some orders are not a status question but a problem that has not been noticed yet. The agent should recognize these and hand them over rather than reading out a state that is no longer meaningful.
Flag the order in your endpoint rather than asking the agent to judge. Compute the flag from the expected date being passed, the tracking being static beyond a threshold, or the state being an exception, and return it as a boolean the agent acts on.
Set the handoff policy with Agent settings, and transfer the conversation with Thread control (Cloud API):
curl -X POST "https://api.facebook.com/business/whatsapp/phone_numbers/{phone_number_id}/thread_control" \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "messaging_product": "whatsapp",
  "action": "take",
  "to": "{CUSTOMER_PHONE_NUMBER}",
  "metadata": "Order HF-88213 delayed, no carrier scan for 6 days"
}'
Note the path parameter is named phone_number_id here rather than entity_id. It is the same WhatsApp Business phone number ID used everywhere else in this guide. These calls take X-API-Version: 1.0.0 if you send it, not the 2.0.0 used by every other call on this page, and the header is optional — the examples omit it.
Put the order reference and the reason in metadata so the colleague picking up the conversation does not have to ask for either.
Hand back with release once the case is closed, which restores the agent as the automatic responder:
curl -X POST "https://api.facebook.com/business/whatsapp/phone_numbers/{phone_number_id}/thread_control" \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "messaging_product": "whatsapp",
  "action": "release",
  "to": "{CUSTOMER_PHONE_NUMBER}"
}'
Decide what happens outside staffed hours. An agent that escalates at 23:00 into an empty queue has made things worse; one that says when the team is next available and logs the case has not.
Where else this applies. Compute escalation triggers in your systems and return them as flags wherever the trigger is a threshold. Thresholds expressed in a prompt are applied inconsistently, and an agent asked to decide whether six days is too long will decide differently on different days.

Test the agent

Use Agent test to simulate conversations before going live. Pass conversation_id to continue a multi-turn exchange.
curl -X POST "https://api.facebook.com/{entity_id}/agent_test" \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -H "X-API-Version: 2.0.0" \
  -d '{
  "user_msg": "Where is my order?"
}'
Cover these scenarios in your test plan:
ScenarioSample message
One open order
“Where is my order?”
Several open orders
The same message from a customer with three
No open orders
The same message from a customer with none
Reference supplied
“Any news on HF-88213?”
Partial or wrong reference
A reference with a digit changed
Reference belonging to someone else
A valid reference for a different customer
One item in a multi-item order
“What about the chairs?”
Part-shipped order
An order with items in different states
Order awaiting stock
Confirm no “on its way” language
Delayed order
An order past its expected date
Tracking static for days
Confirm escalation, not reassurance
Delivered but not received
“It says delivered but it isn’t here”
Fulfilment endpoint down
Point the tool at a failing host
The last five matter most. They are the conversations where an agent trying to be reassuring says something untrue, and where a customer who needed a person instead got a state name.
Where else this applies. Weight a status test plan towards the unhappy states. Reporting IN_TRANSIT correctly is not where these agents fail; they fail on exceptions, on stale data, and on the gap between what a system says and what has actually happened.

Example conversation

This exchange shows the configuration above in use: the agent looks up without asking for a reference, disambiguates between two open orders, explains a state rather than naming it, and escalates a stalled delivery instead of reassuring.
Customer: Where’s my order?
Agent:(calls list_customer_orders)
You have two open orders. The Harlow dining table, due Thursday 11 September, and the set of four Harlow chairs, which we’re still waiting on stock for. Which one did you mean?
Customer: The chairs
Agent: The four Harlow chairs are waiting for stock to arrive with us, so they haven’t been dispatched yet. The current estimate is the week of 22 September, and that date can move until they’re in the warehouse. Message me any time and I’ll check whether they’ve arrived.
Customer: And the table? It said it shipped last week
Agent:(calls get_order_detail)
It was handed to the carrier on 2 September and the tracking hasn’t updated since, and our system has flagged this delivery as delayed. Rather than have you keep waiting, I’ve passed this to a colleague to chase the carrier — they’ll pick this up here shortly. The tracking reference is TR-99401882 if you want to keep an eye on it.

Monitor connector health

The connector logs endpoint, GET /{entity_id}/agent_connectors/{connector_id}/logs, reports how your fulfillment systems are answering.
curl -X GET "https://api.facebook.com/{entity_id}/agent_connectors/{connector_id}/logs?summary_only=true&top_n=5&include_stats=true" \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "X-API-Version: 2.0.0"
Logs cover the last seven days, and the requested time range cannot exceed seven days. The response carries two objects:
ObjectFieldWhat it reports
data
failure_code_name
The failure category
data
error_message
The message returned by your endpoint
data
tool_name
Which tool made the call
data
occurrences
How many times this failure appeared
stats
success_rate
Share of calls that succeeded
stats
avg_latency_s
Mean round-trip time in seconds
stats
p95_latency_s
95th percentile round-trip time in seconds
stats
p99_latency_s
99th percentile round-trip time in seconds
Filter to one operation with tool_id. list_customer_orders runs in nearly every conversation, so its availability effectively is the agent’s availability for this use case: when it fails, the agent cannot answer the question it exists to answer.
Two things worth tracking outside these logs. The share of lookups returning a delayed flag is a fulfillment signal that happens to be visible here first, often before the operational dashboards notice. The share of conversations ending in handoff tells you whether the escalation threshold is set sensibly; a number that climbs steadily usually means a carrier problem rather than an agent problem.
Where else this applies. A status agent is an unusually good early warning system, because customers notice fulfillment problems before internal thresholds fire. Feed the delayed-flag rate somewhere an operations team looks.

Tips for this use case

These are the order status decisions that most often go wrong once the agent is live.
Look up before asking for a reference. Most customers have one open order, and demanding a reference is the single most disliked part of automated support.
Decide the identification bar before writing the tools. Left implicit, it gets set by whatever the endpoint happens to return.
Return the minimum. A status and a date answer the question. Addresses, payment details, and full item lists do not, and they are what a borrowed phone would like to see.
Translate states in your endpoint. A mapping in code is testable and lives in one place. A mapping in a prompt drifts.
Explain MANIFESTED rather than naming it. The gap between dispatch and the first carrier scan generates more repeat contacts than any other state.
Match references exactly. Given a partial reference an agent will find the closest match and report on it confidently.
Check ownership server-side on every detail call. References are guessable, and eventually someone will guess.
Compute the delay flag, do not let the agent judge it. Thresholds in prompts are applied inconsistently.
Ban reassurance that is not in the data. “It should be with you soon” is the most common untrue sentence these agents produce.
Return elapsed time as a number. Agents doing date arithmetic err in the more comforting direction.
Decide out-of-hours behavior. Escalating into an empty queue at 23:00 is worse than saying when the team is back.

Summary checklist

Confirm each of the following before you enable the agent on a production phone number.
  • Decided and documented what a phone number match alone entitles a customer to see
  • Added an order-status instruction that looks up before asking for a reference
  • Forbade reassurance beyond what the tools return
  • Defined list_customer_orders returning open orders by default
  • Defined get_order_detail and restricted it to specific-item, tracking, and delayed cases
  • Excluded delivery addresses and payment details from both tool responses
  • Bound the customer phone number with the WHATSAPP_PHONE_NUMBER macro and validated it server-side
  • Checked order ownership server-side on every detail call
  • Required exact order reference matching, with no partial matches
  • Returned a plain-language status alongside every internal state
  • Wrote a customer-facing explanation for the dispatch-to-first-scan gap
  • Computed a delayed flag in your service rather than leaving the agent to judge
  • Returned static-tracking duration as a number rather than as timestamps
  • Configured handoff for delayed and exception orders, with the reference in metadata
  • Decided and configured out-of-hours behavior
  • Tested multiple open orders, no open orders, wrong references, part-shipment, stalled tracking, and endpoint failure
  • Set up connector monitoring, and fed the delayed-flag rate to an operations team