Meta Business Agent Platform

Customer support agent

Updated: Sep 18, 2026
Copy for LLM
Retailers can use Meta Business Agent as the first responder on their WhatsApp support line — answering the policy questions that make up most of the inbound volume, pulling up a shopper’s recent orders without making them dig out an order number, starting a return, and raising a ticket for the cases a person has to handle. This page covers the agent instructions, knowledge sources, and connector configuration for that scenario. At minimum you must add one agent instruction and a set of FAQs; the connector is what lets the agent move from general answers to this shopper’s actual orders.
The agent handles:
  • Policy questions answered from your own documented policies rather than general knowledge
  • Order lookups for the shopper who is messaging, without asking for an order number
  • Return initiation, including the reason and the return label
  • Ticket creation, with the conversation context attached, when the agent cannot resolve it
  • Handoff to a person for complaints, damage, and anything involving a refund decision

Who this guide is for

The examples use a homeware retailer, but the configuration pattern fits any business whose support line is mostly repeat questions with a minority of real exceptions: the same twenty questions arrive daily, and the value of the agent is answering those consistently while routing the rest quickly.
Organization typeWhat the agent resolvesWhat the agent escalates
Homeware and furniture retailers
Delivery windows, assembly, care instructions, returns
Damage on arrival, missing parts
Sporting goods and equipment
Fit and sizing advice, returns, warranty on gear
Technical faults, safety recalls
Telecom device retail
Upgrade eligibility, device returns, plan changes
Network faults, contract disputes
Marketplaces and resellers
Platform policy, seller contact, order tracking
Seller disputes, fraud reports
Subscription and DTC brands
Pause, skip, and cancellation policy, delivery schedule
Billing corrections, retention offers
This flow differs from a sales conversation. Nobody is browsing, the shopper usually has a problem, and the measure of success is resolution rate and time to a person rather than conversion. It also differs from post-purchase support in travel, where every question attaches to one dated booking: here most questions are answerable from policy alone, and only some need the shopper’s order. If your conversation ends in an order, see Single item purchase agent. If every question concerns one dated itinerary, see Post-purchase support agent.
Each step below notes how the API is used in other scenarios, then applies it to the retail support example.

Prerequisites

Have the following in place before you configure the agent for customer support. The first three come from Meta Business Agent onboarding; the fourth and fifth are your own systems.
  • 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 and whatsapp_business_management permissions — see Generate an access token. whatsapp_business_messaging authenticates your requests; whatsapp_business_management is required to read agent data, such as connector logs
  • Your WhatsApp Business phone number ID ({entity_id}) — the phone number the agent is enabled on, not the WhatsApp Business account ID. Find it in WhatsApp Manager⁠ under Account tools > Phone numbers
  • A publicly accessible HTTPS endpoint for your order and returns system, required by Create a support connector
  • A staffed destination for handed-off conversations, required by Configure handoff

Add agent instructions

Agent instructions shape how the agent responds. The title is a short identifier, description tells the agent when to apply the instruction, and skill contains the actual instructions.
Note: An instruction title can be up to 64 characters — lowercase letters, numbers, and dashes only, and cannot start or end with a dash.
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": "customer-support",
  "description": "Applied when a shopper asks for help with an order, a return, a delivery, a product they already own, or any policy question.",
  "skill": "Answer policy questions from the documented policies only, and say you will check with a colleague rather than guessing when the answer is not there. Look up recent orders for the shopper before asking them for an order number, since most shoppers messaging support have exactly one open order. Acknowledge the problem in the first sentence before explaining process. Give one clear next step rather than a list of options. Start a return only after confirming which item and the reason. Do not offer refunds, discounts, goodwill gestures, or compensation of any kind, and do not speculate about who is at fault. Hand the conversation to a colleague when the shopper reports damage or a missing item, disputes a payment, asks for a refund decision, mentions a legal or safety issue, or asks twice for a person."
}'
Each POST call creates one instruction. The list of handoff triggers is the most important part of a support instruction. Everything else shapes how the agent sounds; that list decides which conversations it should not be having.
Where else this applies. An agent instruction is scoped, so the same call shapes very different agents. A subscription brand can forbid the agent from processing cancellations so retention stays with a person, and a marketplace can require seller disputes to go straight to a case handler. For retail support, keep the instruction focused on answering only from documented policy, acknowledging before explaining, and an explicit, enumerated list of what to escalate.

Add support FAQs

FAQs are the workhorse of a support agent. In most retail support lines a small number of questions account for the majority of contacts, and each one you write well is volume the agent resolves without a person.
curl -X POST "https://api.facebook.com/{entity_id}/agent_config/faq" \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -H "X-API-Version: 2.0.0" \
  -d '{
  "question": "How do I return something?",
  "answer": "You have 60 days from delivery to return an unused item in its original packaging. Start the return in this chat and we will send a prepaid label to your email within a few minutes. Drop the parcel at any post office. Refunds reach the original payment method within 5 to 7 working days of the item arriving at our warehouse. Large furniture is collected instead of posted, and we will arrange a collection date with you."
}'
Manage existing entries with the following calls:
To do thisCall
Retrieve all entries
GET /{entity_id}/agent_config/faq
Replace one entry
PUT /{entity_id}/agent_config/faq/{faq_id}
Remove one entry
DELETE /{entity_id}/agent_config/faq/{faq_id}
A PUT replaces the whole entry, so send both question and answer even when only one changed.
Build the initial set from your own contact reasons rather than from a generic list. Export the top drivers from your helpdesk for the last quarter and write one entry per driver, in the words shoppers actually used. Suggested starting points for a retail support scenario:
QuestionNotes
How do I return something?
Window, condition, label, refund timing, and how bulky items differ
Where is my order?
What the statuses mean and when to worry
My order is late, what happens now?
The point at which you treat it as lost, and what you do then
Can I change or cancel my order?
The cutoff, and what to do after it has passed
How do I exchange for a different size?
Whether you exchange directly or refund and re-order
What if something arrives damaged?
What you need from the shopper, and that a person handles it
How do I care for this material?
Cleaning and maintenance for your main product categories
What is covered by the guarantee?
Length, what counts, and how to claim
Do you have this in stock?
Where to check, and that stock moves quickly
Can I speak to a person?
Say yes plainly, with the hours
Write the last one deliberately. A shopper who asks for a human and receives a deflection escalates in tone, and the conversation is harder for the person who eventually picks it up.
Where else this applies. FAQs suit any question whose answer changes only when a policy changes. In support specifically, the discipline is to keep each entry to one question: an entry covering returns, exchanges, and refunds together matches all three questions poorly, where three entries each match one precisely.

Upload your policy documents

The Files knowledge source takes documents too long to express as FAQ entries — the full terms of sale, a guarantee booklet, or care and assembly guides for a product range.
curl -X POST "https://api.facebook.com/{entity_id}/agent_config/files" \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "X-API-Version: 2.0.0" \
  -F "file_name=guarantee-and-terms.pdf" \
  -F "file=@./guarantee-and-terms.pdf"
The upload uses multipart form data rather than JSON. See the Files reference for the supported formats and the maximum file size.
To do thisCall
List uploaded files
GET /{entity_id}/agent_config/files
Retrieve one file entry
GET /{entity_id}/agent_config/files/{file_id}
Remove one file
DELETE /{entity_id}/agent_config/files/{file_id}
There is no update call. To replace a document, delete the old entry and upload the new one, otherwise the agent draws on both versions and can quote a term you have already withdrawn.
Where else this applies. Files suit reference material authored elsewhere and revised on its own cycle. For support, resist uploading everything: a large document set makes the agent slower to find the right passage, and the questions that matter most are usually better served by a precise FAQ entry than by a page of terms.

Crawl your help center

The Websites knowledge source crawls your public website so the agent can answer from pages you already maintain — the help center, delivery information by region, and store locations and opening hours.
curl -X POST "https://api.facebook.com/{entity_id}/agent_config/websites" \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -H "X-API-Version: 2.0.0" \
  -d '{
  "url": "https://www.marlowandfinch.com/help"
}'
Website knowledge is a snapshot taken at crawl time. Poll GET /{entity_id}/agent_config/websites/{website_id} until crawl_status reports the crawl finished, and re-crawl whenever those pages change materially.
Where else this applies. Crawling is the cheapest way to give a support agent breadth, because the content already exists and someone else maintains it. Scope it tightly with the subdomain and URL-pattern fields: crawling a whole retail site pulls in thousands of product pages, which dilutes the help content the agent should be answering from.

Create a support connector

A connector is the bridge to your order and returns systems. Supported auth_type values are API_KEY, OAUTH2_CLIENT_CREDENTIALS, and NONE.
curl -X POST "https://api.facebook.com/{entity_id}/agent_connectors" \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -H "X-API-Version: 2.0.0" \
  -d '{
  "name": "marlow_finch_support_api",
  "description": "Retrieves recent orders for a shopper, starts a return, and raises a support ticket for Marlow and Finch.",
  "base_url": "https://api.marlowandfinch.com/support/v1",
  "auth_type": "API_KEY",
  "auth_config": {
    "api_key": {
      "headers": [
        {
          "field_name": "X-API-Key",
          "value": "{YOUR_SUPPORT_API_KEY}"
        }
      ]
    }
  }
}'
A successful response returns the id of the new connector. Save it — the tools in Define connector tools are created under it, where it becomes the {connector_id} path parameter.
Where else this applies. Support connectors often front several systems: orders in one place, returns in another, tickets in a helpdesk. You can create one connector per system, each with its own credentials, and the agent chooses between their tools. Split them when the systems have genuinely different owners or availability, because a single connector reports a single health picture.

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. Inside request_definition, set method and path, then declare inputs in the section that matches where they belong: path_parameters for {placeholder} segments in the path, query_parameters, headers, or body.
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.
A support flow needs three tools: one to find the shopper’s orders, one to start a return, and one to raise a ticket for a person.

Find the shopper’s orders

Support conversations start better when the agent already knows what the shopper bought. Bind the messaging phone number with the WHATSAPP_PHONE_NUMBER macro and look up recent orders directly, instead of opening with a request for an order number.
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_customer_orders",
  "description": "Returns recent orders for the shopper with their items, status, delivery date, and whether each item is still within the returns window. Call this at the start of any conversation about an order, a delivery, or a return, before asking the shopper for an order number. If it returns more than one open order, ask which one they mean.",
  "user_auth_required": false,
  "request_definition": {
    "method": "GET",
    "path": "/orders",
    "query_parameters": {
      "customer_phone": {
        "type": "string",
        "description": "The shopper WhatsApp phone number, used to find their orders.",
        "required": true,
        "binding": {
          "kind": "macro",
          "macro": "WHATSAPP_PHONE_NUMBER"
        }
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of orders to return. Use 5 or fewer so the reply stays readable."
      }
    }
  }
}'
Return the returns-window flag with each item. Without it the agent has to compare the delivery date against the policy itself, and it will occasionally get that arithmetic wrong in the shopper’s favor.

Start a return

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": "start_return",
  "description": "Opens a return for one item and returns the return reference and how the item should be sent back. Call this only after confirming which item and the reason with the shopper, and only when get_customer_orders reported the item is within the returns window. Do not call it for damaged or missing items, which go to a colleague instead.",
  "user_auth_required": false,
  "request_definition": {
    "method": "POST",
    "path": "/returns",
    "body": {
      "content_type": "application/json",
      "params": {
        "order_id": {
          "type": "string",
          "description": "The order the item belongs to, as returned by get_customer_orders."
        },
        "line_item_id": {
          "type": "string",
          "description": "The specific item being returned, as returned by get_customer_orders. Never guess this when the order has more than one item."
        },
        "reason_code": {
          "type": "string",
          "description": "One of: too_small, too_large, not_as_described, changed_mind, arrived_late, other."
        },
        "reason_notes": {
          "type": "string",
          "description": "The explanation the shopper gave, in their own words, when they gave one."
        },
        "customer_phone": {
          "type": "string",
          "description": "The shopper WhatsApp phone number, used to confirm the order belongs to them.",
          "binding": {
            "kind": "macro",
            "macro": "WHATSAPP_PHONE_NUMBER"
          }
        }
      },
      "required": ["order_id", "line_item_id", "reason_code", "customer_phone"]
    }
  }
}'

Raise a support ticket

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": "create_support_ticket",
  "description": "Raises a ticket for a colleague and returns the ticket reference. Call this for damage, missing items, payment disputes, refund decisions, and anything the documented policies do not cover. Summarize what the shopper reported in the summary field, in their own words where possible.",
  "user_auth_required": false,
  "request_definition": {
    "method": "POST",
    "path": "/tickets",
    "body": {
      "content_type": "application/json",
      "params": {
        "category": {
          "type": "string",
          "description": "One of: damage, missing_item, payment, refund_request, product_fault, other."
        },
        "summary": {
          "type": "string",
          "description": "A short summary of what the shopper reported, in their own words where possible."
        },
        "order_id": {
          "type": "string",
          "description": "The related order, when the shopper is asking about one."
        },
        "customer_phone": {
          "type": "string",
          "description": "The shopper WhatsApp phone number, so the colleague can reply in the same thread.",
          "binding": {
            "kind": "macro",
            "macro": "WHATSAPP_PHONE_NUMBER"
          }
        }
      },
      "required": ["category", "summary", "customer_phone"]
    }
  }
}'
Path parameters are always required, so they take no required flag. Body fields list their required keys in body.required.
Where else this applies. Support flows share this identify, resolve or escalate shape. The design decision that matters is which actions the agent may take alone: a return within policy is reversible and cheap to get wrong, while a refund decision is neither. Give the agent the reversible writes and route the rest to a ticket.

Configure handoff

Escalation only works if there is somewhere to escalate to. Two pieces are involved, and both are required.
Set the handoff policy on the agent with Agent settings, which controls how the agent behaves when a conversation should move to a person.
Transfer the conversation itself with Thread control (Cloud API). Thread control decides who owns the thread: while your app holds control, the agent stops responding and your team answers directly in the same WhatsApp conversation. Pass control back when the case is closed.
curl -X PUT "https://api.facebook.com/{entity_id}/agent_config/settings" \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "X-API-Version: 2.0.0" \
  -H "Content-Type: application/json" \
  -d '{
  "handoff": {
    "enabled": true,
    "message_selection": "AGENT"
  }
}'

Take control when a case needs a person

Thread control is a single POST with an action. take acquires control from the current owner, which stops the agent responding so your team can answer in the same conversation. It is restricted to the escalation partner configured on the phone number.
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.
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": "{SHOPPER_PHONE_NUMBER}",
  "metadata": "Ticket MF-T-40917, damaged glass shade"
}'
metadata is a free-form string forwarded verbatim to the receiving app in the resulting messaging_handovers webhook. Use it to carry the ticket or order reference, so the colleague picking the conversation up does not have to ask for it again.

Hand the conversation back

When the case is closed, release relinquishes control and makes Meta Business Agent the automatic responder again. You must currently hold thread control for this to succeed.
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": "{SHOPPER_PHONE_NUMBER}"
}'
The three actions differ in who ends up holding the thread:
ActionEffectWho can call it
take
Acquires control from the current owner. The agent stops responding
The configured escalation partner
release
Relinquishes control and restores the agent as automatic responder
Whoever currently holds control
pass
Transfers control to the agent when control_pass.target_role is ai_agent, or to the configured escalation partner when control_pass is omitted
Whoever currently holds control
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. Thread control belongs to the Cloud API rather than the agent configuration API: its version header is optional and accepts only 1.0.0, so the 2.0.0 value used elsewhere in this guide does not apply here.
This endpoint needs the whatsapp_business_messaging permission, the same one used for the rest of this guide.
Decide what happens outside staffed hours before you launch. An agent that hands off at 02:00 into an unstaffed queue produces a worse outcome than one that says when the team is next available and raises a ticket.
Where else this applies. Every agent needs a handoff path, but support is where it is exercised constantly rather than occasionally. Instrument it: the share of conversations that hand off, and the time from handoff to first human reply, are the two numbers that tell you whether the agent is helping.

Test the agent

Use Agent test to simulate shopper conversations before going live. Pass conversation_id from a previous response 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": "The lamp I ordered is the wrong color, can I send it back?"
}'
Cover these scenarios in your test plan:
ScenarioSample message
Policy question
“How long do I have to return something?”
Order status without a reference
“Where is my order?”
Multiple open orders
“Where is my order?” from a shopper with two
Return in policy
“The lamp is the wrong color, can I send it back?”
Return outside the window
“I bought this in March, can I still return it?”
Damaged item
“The mirror arrived smashed”
Refund demand
“I want a refund and I want it today”
Direct request for a person
“Just put me through to someone”
Question with no documented answer
“Is this fabric safe for a cot?”
Angry repeat contact
“This is the third time I’ve messaged”
The last four are the ones worth automating as a regression suite. They are where an agent that is trying to be helpful does the most damage.
Where else this applies. For support, weight your test plan towards what should not happen. A support agent is judged on its worst answers rather than its average one, and the failures that matter are confident answers to questions it had no basis to answer.

Example conversation

This exchange shows the configuration above in use: the agent looks up the order without asking for a number, acknowledges before explaining, confirms the item and reason before calling start_return, and escalates the moment damage is mentioned.
Shopper: The lamp I ordered is the wrong color, can I send it back?
Agent:(calls get_customer_orders)
Sorry that is not what you expected. I can see the Ashford table lamp in brass, delivered on 24 August, and it is within the 60-day returns window. Shall I start a return for it?
Shopper: Yes, I wanted the black one.
Agent:(calls start_return)
Started — return reference MF-R-88214. A prepaid label is on its way to your email, and you can drop the parcel at any post office. Your refund goes back to the original card within 5 to 7 working days of it reaching us. If you would like the black one, it is best to order it now rather than wait for the refund.
Shopper: Also the glass shade in the same order turned up cracked.
Agent:(calls create_support_ticket)
That should not have happened, and damage is handled by a colleague rather than by me. I have raised ticket MF-T-40917 with the details and someone will pick this up in this chat shortly.

Monitor connector health

The connector logs endpoint, GET /{entity_id}/agent_connectors/{connector_id}/logs, reports how your support systems are answering the agent. It returns individual error entries by default, or aggregated failure patterns when summary_only is true. Add include_stats=true for success rate and latency.
Reading these logs requires the whatsapp_business_management permission in addition to whatsapp_business_messaging. A token with only whatsapp_business_messaging receives a 200 response with an empty body.
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. Each entry in data is one error event by default, or one failure pattern when you pass summary_only=true, and stats summarizes the whole window. For the fields each mode returns, see the Connectors reference.
Filter to one operation with tool_id when you want a single tool’s health rather than the connector’s overall rate.
Where else this applies. In support, create_support_ticket is the tool to alert on hardest. Every other failure is visible to the shopper, who complains. A failed ticket is invisible: the agent has already said a colleague will be in touch, the shopper waits, and nobody finds out until they message again angrier.

Tips for this use case

These are the support specific decisions that most often go wrong once the agent is live.
Look up before asking. Opening with “what is your order number?” is the interaction shoppers most dislike about automated support. Binding the phone number and calling get_customer_orders first removes that turn entirely for the majority who have exactly one open order.
Build the FAQ set from your own contact drivers. A generic list produces a generic agent. Export the top reasons from your helpdesk, write one entry per reason in the shopper’s words, and you will resolve a much larger share on the first message.
Enumerate the escalation triggers rather than describing them. “Escalate when appropriate” is not an instruction an agent can follow consistently. A named list — damage, missing item, payment dispute, refund decision, legal or safety, asked twice for a person — behaves predictably.
Answer “can I speak to a person” with yes. Deflecting that question is the fastest way to turn a solvable case into a complaint. Write the FAQ entry, state the hours, and hand off.
Give the agent the reversible writes only. Starting a return within policy is easy to undo. A refund, a goodwill credit, or a cancellation after dispatch is not. Draw that line in the tool set, not only in the instruction.
Return the returns-window flag with each order item. Left to compare a delivery date against a policy, the agent will occasionally get it wrong, and it tends to err generously. Compute eligibility in your system and send the answer.
Decide what happens out of hours before launch. Handing off into an unstaffed queue at 02:00 is worse than saying when the team is back. Set expectations in the handoff message and raise a ticket so the case is not lost.
Measure deflection and handoff together. A high resolution rate is only good if the escalated cases are reaching people quickly. Track the share of conversations handed off and the time to first human reply alongside it.

Summary checklist

Confirm each of the following before you enable the agent on a production phone number.
  • Added a customer-support agent instruction with an enumerated list of escalation triggers
  • Built the FAQ set from your own top contact drivers, one question per entry
  • Added an FAQ entry that answers “can I speak to a person” plainly
  • Uploaded terms, guarantee, and care documents as files
  • Crawled the help center, scoped to exclude product listing pages
  • Created a support connector with API key authentication
  • Defined get_customer_orders, start_return, and create_support_ticket connector tools
  • Bound the shopper phone number with the WHATSAPP_PHONE_NUMBER macro and validated it server-side
  • Configured a handoff policy in agent settings and implemented thread control
  • Decided and configured out-of-hours behavior
  • Tested policy questions, order lookups without a reference, returns in and out of policy, damage, refund demands, and direct requests for a person
  • Set up connector health monitoring with alerting on ticket creation