Booking and reservation agent
Updated: Oct 30, 2026
Copy for LLM
Car rental companies and other fleet operators can use Meta Business Agent to handle booking conversations over WhatsApp. The agent helps a renter choose the right vehicle class, then confirms the daily rate and availability for their dates in real time.
From there it creates the reservation, hands the renter a checkout link to complete payment, and answers “when is my pickup” afterwards.
This page covers the agent instructions, knowledge sources, and connector configuration for that scenario. At minimum you must add one agent instruction and create a connector with a
search_vehicles and a create_reservation tool; your vehicle classes, FAQs, and website crawl improve the conversation but the agent cannot quote or book without the connector.The later sections extend the minimum into a complete booking: identifying the renter, resolving locations, showing options visually, completing payment, changing or canceling, following up after the booking, and hardening the write path.
The agent handles:
- Vehicle class discovery across your Meta product catalog
- Live rate and availability checks for a pickup and return date range
- Reservation creation, with renter confirmation before the booking is made
- Reservation changes and cancellations, gated behind lookup and confirmation
- Booking completion through a checkout link, with regional payment guidance
- Booking lookups for reservations the renter already holds
- Post-booking follow-up — tracking, reminders, add-ons, and feedback
- Out-of-scope questions — billing disputes, damage claims, accidents — routed to your support team
Seat or multi-selection booking — choosing specific seats together, as in ticketing — is not available, so this guide covers class-level reservations only. Where seats appear below, they are an analogy drawn from other verticals rather than a capability you can configure here.
Who this guide is for
The examples use a car rental company, but the configuration pattern fits any organization renting time-bounded use of a limited fleet: the renter picks a class rather than a specific unit, books it for a date range, returns it, and comes back to ask about a booking already made.
| Organization type | What the agent presents | What the agent submits |
|---|---|---|
Car rental companies | Vehicle classes, daily rates, pickup branches | A reservation |
Van and truck hire | Load capacity, license requirements, one-way options | A booking with a return branch |
Equipment and tool rental | Machine categories, day and week rates, delivery windows | A rental agreement |
Recreational vehicle, boat, and motorhome rental | Berths, seasons, minimum hire periods | A dated booking with a deposit |
Peer-to-peer and fleet-sharing platforms | Nearby vehicles, hourly and daily rates | A held booking pending host approval |
This flow differs from selling goods outright. A rental is priced against a date range rather than a unit count, availability means “a vehicle of this class is free between these two dates” rather than “this item is in stock”, and the agent commits a single dated reservation instead of building a cart. If you sell items the buyer keeps, you need cart and order-status operations rather than the availability and reservation operations described here. If the vehicle is booked alongside other components — a flight and a hotel on the same dates, priced and committed together — see Multi-component single transaction agent.
Each step below notes how the API is used in other scenarios, then applies it to the car rental example.
Prerequisites
Have the following in place before you configure the agent for car rental. 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_messagingandwhatsapp_business_managementpermissions — see Generate an access token.whatsapp_business_messagingauthenticates your requests;whatsapp_business_managementis 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 reservation system, required by Create a reservations 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 instructiontitlecan 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": "vehicle-rentals",
"description": "Applied when renters ask about vehicles, daily rates, availability, pickup and return, driver requirements, or the status of an existing reservation.",
"skill": "Help renters find the right vehicle class from what they describe, such as the number of passengers and how much luggage they carry, not only from car model names. Always establish the pickup location, the pickup date and time, and the return date and time before quoting anything. Always state the daily rate, the currency, and whether the class is available for those dates. Never quote a rate, a total, or availability that did not come from a tool call. Confirm the vehicle class, the dates, and the pickup location with the renter before creating a reservation. For billing disputes, damage claims, and accidents, acknowledge the request and direct the renter to the support team."
}'
Each POST call creates one instruction. The instruction to establish dates before quoting matters more in rentals than in most scenarios, because a rate is meaningless without a date range and availability changes by the hour during peak periods.
Where else this applies. An agent instruction is scoped, so the same call shapes very different agents. A retailer can require the agent to confirm size and color before adding to a cart, and a ticketing platform can require the event date before quoting a seat. For car rental, keep the instruction focused on gathering dates and location first, confirmation before booking, and a clean handoff for anything involving damage or money already taken.
Add rental policy FAQs
FAQs give the agent reliable answers to common questions. Each entry takes a
question and an answer, both required. Focus on policies that change only when you change them.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": "What are the driver requirements?",
"answer": "Drivers must be at least 21 years old and hold a full license issued at least 12 months ago. Drivers aged 21 to 24 pay a young driver surcharge of 25 USD per day. Bring the license, the payment card used for the booking, and a passport or government ID to the pickup counter."
}'
Manage existing entries with the following calls:
| To do this | Call |
|---|---|
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.Suggested FAQs for a car rental scenario:
| Question | Notes |
|---|---|
What are the driver requirements? | Minimum age, license validity, and any young driver surcharge |
What do I need to bring to the pickup counter? | License, payment card, identification, and any proof of onward travel |
What is the fuel policy? | Full-to-full or prepaid fuel, and the charge when a car returns short |
What protection is included? | What the base rate covers, the excess amount, and what the waivers add |
Is there a mileage limit? | Included distance per day and the rate charged beyond it |
Can I add a second driver? | Cost, and whether the second driver must attend the pickup |
How do I change or cancel a reservation? | The free-cancellation window, and the fee after it passes |
Can I return the car to a different branch? | Where one-way returns are allowed, and the fee |
Where else this applies. FAQs suit any question whose answer changes only when a policy changes: a retailer is asked about returns, an equipment rental company about damage liability, a boat operator about required certifications. Anything that changes on its own — availability, rate, branch opening hours during a holiday — belongs in a connector tool instead.
Set up your vehicle classes
Meta Business Agent draws product information from your Meta product catalog, which you manage in Meta Commerce Manager rather than through this API. There is no catalog call to make from your integration: once the catalog is linked to the business, the agent already knows what is in it. See Product catalog in Get started.
List vehicle classes rather than individual vehicles, because a renter books a class and you assign a specific car at the counter.
| Catalog practice | Why it matters for a rental |
|---|---|
One item per class, not per vehicle | The renter chooses a class, so a catalog of registration plates gives the agent nothing to match against |
Put the base daily rate on the item | Renters anchor on the daily rate. Let search_vehicles return the total for a specific date range |
Keep the class code aligned with your reservation system | The code is what ties a catalog item to live availability and to the booking you create |
Group class variants under a shared item group | Automatic and manual versions of a compact belong together, so the agent can offer the alternative when one is booked out |
Describe seats, luggage capacity, and transmission | These are what renters actually ask about, and most have no dedicated catalog field |
Treat availability as whether you offer the class at all | Not whether a car is free on a given date. That comes from search_vehicles |
Include an image and a vehicle page URL | Gives the renter something to look at before deciding |
Where else this applies. Any business with a browsable inventory works this way: a retailer lists products, an equipment rental company lists machine categories. For car rental, treat the catalog as the discovery layer only — it tells the agent which classes exist and how to describe them, while the rate and availability for a specific date range come from Define connector tools.
Crawl your rental website
The Websites knowledge source crawls your public website so the agent can answer from pages that are not vehicle listings — protection and waiver explanations, branch locations and opening hours, cross-border rules, and terms of rental.
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.northfieldrentals.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 suits content that already exists on your public site and changes on a predictable cycle: a help center, a branch directory, a terms page. For car rental, crawl the help, protection, and location pages rather than the vehicle listing pages, since your Meta product catalog already carries class data in a structured form the agent handles better.
Create a reservations connector
A connector is the bridge to your reservation system. 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": "northfield_reservations_api",
"description": "Searches live fleet availability for a date range, creates reservations, and returns booking status for Northfield Car Rental.",
"base_url": "https://api.northfieldrentals.com/reservations/v1",
"auth_type": "API_KEY",
"auth_config": {
"api_key": {
"headers": [
{
"field_name": "X-API-Key",
"value": "{YOUR_RESERVATIONS_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. The connector call is identical whichever system holds your live state, whether that is a reservations database, an order management system, or a ticketing platform. Only
base_url, auth_type, and the credentials change. For car rental, point it at the service that owns fleet availability and bookings, because those are the two facts the agent must never guess.Identify the renter
Every booking tool in this guide sets
user_auth_required: false. That is deliberate, so understand what it means before changing it.user_auth_required controls whether Meta Business Agent injects a stored per-renter credential into the outbound tool call. When it is false, the call carries only the connector’s business authentication — the API_KEY configured above — and the renter is identified by the values bound into the request itself. When it is true, the agent injects a stored user token at runtime according to the connector’s user-auth injection config (where it goes — headers, query, or body — under which field name, and with which prefix), and the connector needs login and refresh tools that describe where the token lives in their responses. A rental flow identified by phone number and booking reference does not need that machinery, so false is correct here. Reach for true only when the upstream API demands a per-user OAuth token, such as a loyalty account the renter signed in to.The baseline identity in this guide is the
WHATSAPP_PHONE_NUMBER macro. Binding driver_phone (and later renter_phone-style fields) to {"kind": "macro", "macro": "WHATSAPP_PHONE_NUMBER"} tells Meta Business Agent to fill the renter’s WhatsApp phone number server-side at runtime — the agent never asks for it and never transcribes it. That phone number is the renter ID in this flow: no separate account ID, loyalty number, or prior registration is required to book. Scope every lookup and every write to that value on your backend: reject a booking reference that does not belong to the bound number rather than trusting whatever reference was typed into the chat. The phone number only links the chat to the booking. Identity itself is verified at the counter: the agent collects no license, passport, or government ID, and this flow is not designed to. Keep that boundary — the counter check at pickup is what establishes who the driver is (see the driver-requirements FAQ).Be honest about what that proves. The macro proves possession of the WhatsApp channel that is talking to this agent right now. It does not prove ownership of a loyalty account, a corporate profile, or a saved payment method. For most rental bookings that is enough — the phone number identifies the booking, and the counter checks ID at pickup. If your flow gates on account ownership (corporate rates, loyalty points, a saved card), add a verification step your own system enforces:
- Expose two connector tools from your backend: one that sends a one-time code to the renter’s registered channel, and one that verifies the code the renter pastes back into the chat. Gate
create_reservationbehind a successful verification in the instruction text. - Treat a passed check as proof that the person controls that channel right now, not as a long-lived login. Expire codes quickly, limit attempts, and re-verify before any change or cancellation. A reference that does not belong to the bound number must be rejected, not unlocked by re-verification.
- There is no account-linking (OAuth/OIDC) for WhatsApp partner agents today. Do not document a sign-in-with-account step your renters cannot complete.
The verify half of that pair looks like any other connector tool. The renter never types their number:
renter_phone carries the same WHATSAPP_PHONE_NUMBER macro binding as driver_phone above, so the code is always checked against the channel the chat is on.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": "verify_renter_code",
"description": "Verifies the one-time code the renter pasted into the chat. Call this before create_reservation, modify_reservation, or cancel_reservation whenever the flow gates on account ownership. Returns whether the code is valid for the bound phone number. A pass proves the renter controls this channel right now, not that they own the account.",
"user_auth_required": false,
"request_definition": {
"method": "POST",
"path": "/renters/verify",
"body": {
"content_type": "application/json",
"params": {
"code": {
"type": "string",
"description": "The one-time code the renter typed into the chat."
},
"renter_phone": {
"type": "string",
"description": "The renter WhatsApp phone number the code was sent to.",
"binding": {
"kind": "macro",
"macro": "WHATSAPP_PHONE_NUMBER"
}
}
},
"required": ["code", "renter_phone"]
}
}
}'
Where else this applies. Any flow that looks up somebody else’s record needs the same scoping: bind the messaging phone number and validate it server-side, and say in the tool description that the call must fail when the reference does not belong to that number. A retailer looking up orders, a workshop confirming service bookings, and a ticketing platform reissuing seats all share this shape — the macro is the identity, the backend check is the enforcement.
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 car rental flow needs five tools: one to find available vehicles for a date range, one to create the reservation, one to answer questions about a booking already made, and two more to change and cancel an existing booking. Two further tools appear later in this guide and are not part of the core flow:
verify_renter_code for flows that gate on account ownership, and list_booking_addons for offering an add-on once a booking is confirmed.The envelope is the same for every tool. Declare each input in the section that matches where it belongs in the outbound call, and include only the sections that call needs:
{ "name": "tool_name", "description": "When the agent should call this tool, and what it returns.", "user_auth_required": false, "request_definition": { "method": "GET", "path": "/resource/{resource_id}", "path_parameters": { "resource_id": { "type": "string", "description": "Fills the {resource_id} segment of path." } }, "query_parameters": { "filter": { "type": "string", "description": "Appended to the query string." } }, "headers": { "X-Request-Source": { "type": "string", "description": "Sent as an HTTP request header." } }, "body": { "content_type": "application/json", "params": { "field": { "type": "string", "description": "Sent in the JSON request body." } }, "required": ["field"] } } }
Note the ways of marking an input mandatory.
query_parameters and headers take "required": true on each entry, and body collects its mandatory fields into a required array alongside params. Path parameters need no flag at all — they are always required, and the field is ignored there.Every tool that touches an existing booking shares one further shape: the booking reference travels as a path parameter, and the messaging phone number is bound with the
WHATSAPP_PHONE_NUMBER macro and validated server-side. The two write tools add a requirement the read does not — a description that gates the call behind explicit renter confirmation.Search available vehicles
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": "search_vehicles",
"description": "Searches live fleet availability and returns the vehicle classes free for the requested dates, with the daily rate and the total for the period. Call this whenever a renter describes the trip they are planning, and before quoting any rate. Ask for the pickup location and both dates first if any are missing.",
"user_auth_required": false,
"request_definition": {
"method": "GET",
"path": "/vehicles",
"query_parameters": {
"pickup_location": {
"type": "string",
"description": "The pickup branch, city, or airport code as the renter described it, for example SFO or downtown Denver.",
"required": true
},
"latitude": {
"type": "number",
"description": "Latitude of the pickup point, between -90 and 90. Send when the renter shared a location or named a place your backend can geocode. Your endpoint should prefer this over the text when both are present."
},
"longitude": {
"type": "number",
"description": "Longitude of the pickup point, between -180 and 180. Send together with latitude."
},
"pickup_date": {
"type": "string",
"description": "Pickup date and time in ISO 8601 format, for example 2026-09-04T10:00.",
"required": true
},
"return_date": {
"type": "string",
"description": "Return date and time in ISO 8601 format, for example 2026-09-07T10:00.",
"required": true
},
"vehicle_class": {
"type": "string",
"description": "Class filter, for example compact, midsize, or SUV. Omit when the renter did not state a class."
},
"limit": {
"type": "integer",
"description": "Maximum number of classes to return. Use 5 or fewer so the reply stays readable."
}
}
}
}'
Keep the response small. Return the classes that are actually free for those dates, with the daily rate and the period total, rather than the whole fleet with a separate availability flag the agent has to interpret.
The text is the label; the coordinates are the disambiguator. “Near the airport” fails when your search index only matches exact branch names — the renter means whichever airport is near them, and your API hears a string it cannot resolve. Three fixes — one on your backend, one in the thread, and one in the conversation:
- Expose a semantic search on your backend. Accept the free text, resolve “SFO”, “downtown Denver”, or “near the airport” to branch codes on your side, and return the matched branch with its coordinates. If your search API cannot do that yet, say so in the tool description (“matches exact branch names only; ask the renter to pick from the returned branches”) rather than letting the agent guess.
- Capture the renter’s location in-thread. A
location_requestinteractive message renders a prompt with a button that lets the renter send their location back; your endpoint then receiveslatitudeandlongitudeand ranks branches by proximity. Pin the chosen branch back with alocationmessage built from verified coordinates in your tool response — never let the agent fabricate them. - When candidates tie, ask instead of guessing. In metros with several airports or branches at similar distances — New York (JFK, LaGuardia, Newark) is the classic case — proximity alone cannot disambiguate. Have your endpoint return the top 2–3 candidate branches with enough detail to tell them apart (branch code, airport code, distance), and have the agent ask the renter to pick one before calling
search_vehicles. Never default to the closest branch when the distances are within a few miles of each other.
Where else this applies. Any “which branch / store / depot” question shares this shape: free text for what the renter typed, coordinates for where they mean, backend ranking for the resolution. A grocery chain resolving “near me”, a workshop network resolving “downtown”, and an equipment depot resolving “closest yard with a 20-ton excavator” all need the same pair of parameters.
Create a reservation
The renter’s phone number identifies their booking, and it is a value the agent should never have to ask for or infer. Bind it with the
WHATSAPP_PHONE_NUMBER macro so Meta Business Agent fills it at runtime.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_reservation",
"description": "Books a vehicle class for the requested dates and returns the booking reference and total. Call this only after the renter has confirmed the class, the pickup location, and both dates. Do not call it to check a rate or availability.",
"user_auth_required": false,
"request_definition": {
"method": "POST",
"path": "/reservations",
"body": {
"content_type": "application/json",
"params": {
"sku": {
"type": "string",
"description": "The vehicle class code the renter confirmed, as returned by search_vehicles."
},
"pickup_location": {
"type": "string",
"description": "The branch code for pickup, as returned by search_vehicles."
},
"pickup_date": {
"type": "string",
"description": "Pickup date and time in ISO 8601 format, exactly as quoted to the renter."
},
"return_date": {
"type": "string",
"description": "Return date and time in ISO 8601 format, exactly as quoted to the renter."
},
"driver_phone": {
"type": "string",
"description": "The renter WhatsApp phone number, used to identify the booking.",
"binding": {
"kind": "macro",
"macro": "WHATSAPP_PHONE_NUMBER"
}
}
},
"required": ["sku", "pickup_location", "pickup_date", "return_date", "driver_phone"]
}
}
}'
Check a reservation
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": "check_reservation_status",
"description": "Returns the status, vehicle class, pickup branch, pickup and return times, and the fare conditions for one reservation: whether it can be changed, whether it can be cancelled, the free-cancellation window and the fee once it passes, and the rate difference for any new dates proposed. Call this when a renter asks about a booking they already hold, and before offering a change or a cancellation. Ask for the booking reference first if they did not provide one. The call must fail when the reference does not belong to the renter phone number.",
"user_auth_required": false,
"request_definition": {
"method": "GET",
"path": "/reservations/{reservation_id}",
"path_parameters": {
"reservation_id": {
"type": "string",
"description": "The booking reference as the renter provided it, for example NF-482913."
}
},
"query_parameters": {
"renter_phone": {
"type": "string",
"description": "The renter WhatsApp phone number, used to confirm the booking belongs to them.",
"required": true,
"binding": {
"kind": "macro",
"macro": "WHATSAPP_PHONE_NUMBER"
}
}
}
}
}'
Path parameters are always required, so they take no
required flag. Body fields list their required keys in body.required. The renter_phone query parameter carries the bound WhatsApp number so your backend can reject a reference that does not belong to the renter — that is what makes the “someone else’s reference” test case fail instead of leaking another renter’s booking.State the fare conditions in this response as well — whether the booking is changeable, the free-cancellation window, the fee once it passes, and the rate difference for any new dates the renter has proposed — so the agent never has to ask a second question before offering a change or a cancellation. Both write tools below read their preconditions from here.
Where else this applies. Reservation flows share this search, commit, look-up-later shape: find what is free for a date range, hold it on the renter’s behalf, then answer questions about that booking. An equipment rental company swaps the vehicle class for a machine category, and a boat operator swaps it for a berth. Guard the write in every case, since it is the call that takes a vehicle out of the fleet when the agent gets it wrong.
Show options visually
The configuration so far quotes in plain text. Renters choose faster — and convert better — when they see vehicle classes as cards and pick dates in a picker rather than typing them. Three interactive message types cover the booking flow; each is created with
POST /{entity_id}/agent-ui-skills with a title, a component_type, a status, and a free-form instruction that tells the agent when to send it and what to put in each field. See Writing interactive messages for the full data-element tables and Interactive messages for the API contract.- Vehicle classes as a carousel. A
carousel_quick_replymessage shows 2–10 cards, each with an image, a caption of up to 160 characters, and a quick-reply button that sends the choice back to the agent. Instruct it like: “Whensearch_vehiclesreturns up to 5 free classes, send each as a card with its image, the class name, the daily rate and period total, and seats and luggage as the caption; the button label is the class name.” Usecarousel_urlinstead when each card should open the vehicle page from your catalog. - Dates as a flow. There is no standalone date-picker component type. Capture pickup and return dates with a
flowinteractive message: configure a WhatsApp Flow containing a date-picker screen, then create the UI component withcomponent_type: flowand the numericflow_idas a structured field (required forflow, rejected for every other type). Pre-fill the earliest selectable date through the flow’sdata, and describe the rest — the CTA label, the body text, the pickup and return fields — in the free-forminstruction. - Checkout as a link. Completing the booking outside WhatsApp is a
cta_urlmessage: a body of text plus one button opening an HTTPS URL in the renter’s browser. Point it at your web checkout or app deep-link (covered next in Complete the booking). In-thread payment through UI components is not available — do not promise it.
Create the carousel with
component_type set to carousel_quick_reply. Everything the cards show is described in the instruction, not sent as structured fields:curl -X POST "https://api.facebook.com/{entity_id}/agent-ui-skills" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-H "X-API-Version: 2.0.0" \
-d '{
"title": "vehicle-class-carousel",
"component_type": "carousel_quick_reply",
"status": "enabled",
"instruction": "When search_vehicles returns available classes, send up to 5 of them as a carousel, one card per class. For each card use the class image from the catalog, and a caption with the class name, the daily rate, the total for the period, and the seat and luggage counts. Set each button label to the class name so the renter can tap the one they want. Never include a class that search_vehicles did not return for these dates."
}'
The date picker is a
flow instruction, so it also carries flow_id as a structured field. That field is required for flow and rejected for every other component type:curl -X POST "https://api.facebook.com/{entity_id}/agent-ui-skills" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-H "X-API-Version: 2.0.0" \
-d '{
"title": "pickup-and-return-dates",
"component_type": "flow",
"status": "enabled",
"flow_id": 1234567890123456,
"instruction": "When the renter has not given both a pickup date and a return date, send the date-capture flow. Use the call-to-action label \"Choose dates\" and the body text \"Pick your pickup and return dates.\" Pre-fill the earliest selectable date with tomorrow. Do not quote a rate until search_vehicles has run with the dates the renter chose."
}'
A
flow instruction can only be created with status set to enabled once the referenced Flow is published. While it is still a draft, create the instruction as disabled and enable it after publishing.Where else this applies. The pattern is “carousel to choose, flow to capture structured input, link to finish elsewhere”. A workshop shows service types as a carousel and captures the vehicle details in a flow; a ticketing platform shows seating tiers as cards and links out to seat maps; an equipment rental shows machine categories and captures the delivery window in a flow.
Complete the booking
create_reservation holds the vehicle. It does not take money. Outside Brazil and India, every booking client completes payment the same way: surface options in-thread, then hand the renter an HTTPS link to a web checkout or app where they book and pay. Document that link as part of the flow, not as an afterthought.Send the link as a
cta_url interactive message: a body of text plus one button opening the URL in the renter’s browser. Create it with POST /{entity_id}/agent-ui-skills with component_type: cta_url, and instruct it with the booking reference and total already quoted: “After create_reservation returns a reference, send the renter a button labeled Pay now (or Complete booking) with the checkout URL carrying the reference, the total, and the currency.” Build that URL server-side so the reference and amount cannot be edited in transit, and confirm the paid booking with check_reservation_status when the renter returns to the thread.curl -X POST "https://api.facebook.com/{entity_id}/agent-ui-skills" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-H "X-API-Version: 2.0.0" \
-d '{
"title": "checkout-link",
"component_type": "cta_url",
"status": "enabled",
"instruction": "After create_reservation returns a booking reference, send a button labeled \"Pay now\" that opens the checkout URL for that reference. Use body text naming the class and the total already quoted, for example \"Your Midsize SUV is held for Friday. Complete payment to confirm.\" Never send a checkout link before create_reservation has returned a reference, and never quote a total that did not come from that response."
}'
Reason about region explicitly:
- Brazil and India support in-thread payment (PIX, Brazil’s instant-payment system; enhanced payment links on Razorpay, PayU, or Cashfree that render as a Pay Now bubble and app-switch to UPI, India’s Unified Payments Interface). Those paths are not UI-component types you create with
agent-ui-skills— they come from your payment integration. If you operate there, design the payment step with your integration team before promising it in-thread, and keep pay-at-pickup as the fallback. - Everywhere else, the deep-link is the booking completion. There is no native in-thread payment to wait for. Design the handoff back: what the checkout page shows on success, and what the renter pastes or taps to confirm in the thread.
Where else this applies. The shape is “agent holds, link completes, thread confirms”. A workshop holds the slot and links to the job sheet and card capture; an equipment depot holds the machine and links to the rental agreement signature; a ticketing platform holds the seats and links to checkout. In each case the agent’s job after the click is to confirm, not to assume.
After the booking
The booking is the middle of the lifecycle, not the end. These five post-booking jobs are where repeat revenue lives, and the tooling for most of them already exists:
- Track.
check_reservation_statusalready answers “when is my pickup”. Extend its response with the live state renters actually ask about — confirmed, ready for pickup, active, completed — and prompt the agent to report it plainly: “Your Midsize SUV is confirmed for Friday 10:00 at Denver airport, and it is ready to collect.” - Remind. Reminders travel as marketing or utility messages outside the agent thread, within WhatsApp’s 24-hour messaging window rules. Do not have the agent promise proactive nudges it cannot trigger; instead, document which template fires when (evening-before reminder, morning-of pickup details) and what thread the renter lands in when they reply.
- Upsell and cross-sell. Protection waivers, child seats, GPS, an upgrade to the next class — expose them as an add-on lookup on your backend (eligibility and pricing for the confirmed booking) and offer them once, right after the booking confirmation, not on every turn. There is no cart component: keep it to one contextual offer with a yes/no. Applying an accepted add-on needs its own write tool on your backend —
modify_reservationmoves dates and carries no add-on field. - Feedback. Ask once, after return: a ratings prompt via template message, resolved in-thread. Feed the scores into Agent insights alongside the measurement funnel in Harden for production rather than building a feedback tool.
- Personalize from history. Returning renters should not reintroduce themselves. Key your customer-record (CRM) lookups off the bound
WHATSAPP_PHONE_NUMBER: greet with the last class rented, default to the last pickup branch, and pre-fill the add-on offer from what they accepted before. Personalization data (first- and third-party) flows through your connector responses, not through agent configuration — the tool output carries the history, and the instruction tells the agent to use it.
The add-on lookup is an ordinary read tool. Scope it to the booking reference and have your backend reject a reference that does not belong to the bound phone number, exactly as
check_reservation_status does: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_booking_addons",
"description": "Returns the add-ons available for one confirmed booking, such as a protection waiver, a child seat, GPS, or an upgrade to the next class, with the price for that booking. Call this once immediately after the booking is confirmed, never on later turns. Offer at most one add-on, and apply an accepted one with your own add-on write tool. The call must fail when the reference does not belong to the renter phone number.",
"user_auth_required": false,
"request_definition": {
"method": "GET",
"path": "/reservations/{reservation_id}/addons",
"path_parameters": {
"reservation_id": {
"type": "string",
"description": "The booking reference returned by create_reservation."
}
},
"query_parameters": {
"renter_phone": {
"type": "string",
"description": "The renter WhatsApp phone number, used to confirm the booking belongs to them.",
"required": true,
"binding": {
"kind": "macro",
"macro": "WHATSAPP_PHONE_NUMBER"
}
}
}
}
}'
Where else this applies. Post-booking is where repeat revenue lives in every rental vertical: the boat operator offers a skipper, the equipment depot offers damage waiver, the peer-to-peer platform asks for the host rating. The toolset is the same — a status read, an add-on write gated behind confirmation, and a feedback prompt outside the thread.
Change a reservation
Renters reschedule, and rescheduling currently exists on this page only as an FAQ answer — the agent can describe the policy but cannot act on it.
modify_reservation moves a booking to new dates and returns the updated booking with any rate difference.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": "modify_reservation",
"description": "Moves a reservation to different dates and returns the updated booking with any rate difference. Call this only after check_reservation_status has confirmed the booking is changeable, and only after the renter has confirmed the new dates and any rate difference. Do not call it to check whether a change is possible.",
"user_auth_required": false,
"request_definition": {
"method": "POST",
"path": "/reservations/{reservation_id}/changes",
"path_parameters": {
"reservation_id": {
"type": "string",
"description": "The booking reference, as confirmed by check_reservation_status."
}
},
"body": {
"content_type": "application/json",
"params": {
"pickup_date": {
"type": "string",
"description": "The new pickup date and time in ISO 8601 format, exactly as confirmed with the renter."
},
"return_date": {
"type": "string",
"description": "The new return date and time in ISO 8601 format, exactly as confirmed with the renter."
},
"accepted_rate_difference": {
"type": "string",
"description": "The rate difference the renter accepted, as quoted by check_reservation_status for the proposed dates, for example 12.50. Never send a value the renter has not agreed to."
},
"driver_phone": {
"type": "string",
"description": "The renter WhatsApp phone number, used to confirm the booking belongs to them.",
"binding": {
"kind": "macro",
"macro": "WHATSAPP_PHONE_NUMBER"
}
}
},
"required": ["pickup_date", "return_date", "driver_phone"]
}
}
}'
Call it only after
check_reservation_status has confirmed the booking is changeable, and only once the renter has accepted both the new dates and any rate difference. When the rate is non-changeable, the agent quotes the policy instead of calling the tool.Cancel a reservation
cancel_reservation releases the booking and returns the cancellation confirmation and any fee. It is the sharper of the two write tools: a cancellation cannot be undone from the thread, so the guardrails in the description matter more than the payload.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": "cancel_reservation",
"description": "Cancels a reservation and returns the cancellation confirmation and any fee. Call this only after check_reservation_status has confirmed the booking is cancellable, and only after the renter has confirmed they want to cancel. Never call this for damage, billing disputes, or accidents — direct the renter to the support team instead.",
"user_auth_required": false,
"request_definition": {
"method": "POST",
"path": "/reservations/{reservation_id}/cancellation",
"path_parameters": {
"reservation_id": {
"type": "string",
"description": "The booking reference, as confirmed by check_reservation_status."
}
},
"body": {
"content_type": "application/json",
"params": {
"driver_phone": {
"type": "string",
"description": "The renter WhatsApp phone number, used to confirm the booking belongs to them.",
"binding": {
"kind": "macro",
"macro": "WHATSAPP_PHONE_NUMBER"
}
}
},
"required": ["driver_phone"]
}
}
}'
Call it only after
check_reservation_status has confirmed the booking is cancellable, and only once the renter has confirmed they want to cancel. When the free-cancellation window has already passed, quote the fee and get agreement before calling. When money is already taken or damage is involved, hand off rather than refunding.Where else this applies. Reversible writes belong to the agent, refunds and goodwill belong to a person — draw the line in the toolset, not only in the instruction. A retailer cancels orders but tickets refunds, a workshop reschedules service bookings but escalates disputed charges, and a ticketing platform rebooks seats but hands off compensation claims.
Harden for production
Reads are safe to retry;
create_reservation is not. A retried write books two cars. Harden the write path before launch:- Idempotency is yours to build. Connector tools expose no idempotency-key field — no header, no parameter, no retry semantic. Enforce uniqueness on your backend (renter phone plus class plus pickup date, or a client-supplied key you accept in the body and add to
create_reservationyourself), and return the existing booking reference when the same request arrives twice instead of creating a second reservation. - Assume slow backends. Tool calls time out after 30 seconds, and there is no per-tool timeout to configure. Identity checks and fleet locks run long; the page otherwise assumes a synchronous 200. Keep responses small (the
limitguidance above, allowlisted fields), answer availability from a fast path, and tell the agent what to say while waiting: “Checking the fleet — one moment” beats a silent thread. Confirm asynchronously when the booking lands: pollcheck_reservation_statusor push a template message with the reference rather than holding the turn open. - Watch the write tool separately. Connector logs (
GET /{entity_id}/agent_connectors/{connector_id}/logs) cover the last seven days and report per-tool failures, success rate, and latency — alert oncreate_reservationspecifically, because reads outnumber writes and a healthy connector average hides a write that fails every time. Pair it with Tool call insights for timeout and error rates, Conversation insights for handoff counts and reasons, and Conversation turns for per-turn latency when the booking flow feels slow.
Pass
tool_id to scope the logs to the write tool alone. Without it the response averages create_reservation in with the far more numerous reads, which is exactly how a write that fails every time stays invisible:curl -X GET "https://api.facebook.com/{entity_id}/agent_connectors/{connector_id}/logs?tool_id={create_reservation_tool_id}&include_stats=true" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "X-API-Version: 2.0.0"
include_stats=true adds the success rate and latency percentiles you alert on. The window defaults to the last 24 hours and cannot reach back further than 7 days.Where else this applies. Every write tool needs the same trio: backend idempotency, a waiting message, and a per-tool alert. An order create, a lead submit, and a ticket open all double-create under retries, and all hide behind healthy read averages.
Configure handoff
The
vehicle-rentals instruction tells the agent to route billing disputes, damage claims, and accidents to your team. That instruction does nothing on its own. Pair it with a real destination, or the customer is acknowledged and then left waiting.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.
Read the current settings to see the handoff policy in place:
curl -X GET "https://api.facebook.com/{entity_id}/agent_config/settings" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "X-API-Version: 2.0.0"
Take control when a renter escalates
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": "{RENTER_PHONE_NUMBER}",
"metadata": "Damage claim on reservation NF-482913"
}'
metadata is a free-form string forwarded verbatim to the receiving app in the
resulting messaging_handovers webhook. Use it to carry the booking 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": "{RENTER_PHONE_NUMBER}"
}'
The three actions differ in who ends up holding the thread:
| Action | Effect | Who 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.These are the cases where a wrong answer costs the most. A renter disputing a charge or reporting an accident needs somebody who can see the payment record and the vehicle condition report, and an agent that attempts either tends to make the conversation harder for the person who picks it up next.
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.
Where else this applies. Any scenario touching money already taken, or an incident involving the goods themselves, deserves an explicit route to a person rather than a best-effort answer. For car rental the test is simple: if the renter is standing at a counter or beside a damaged vehicle, a person should be answering.
Test the agent
Use Agent test to simulate renter 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": "Do you have an SUV in Denver from Friday to Sunday?"
}'
Cover these scenarios in your test plan:
| Scenario | Sample message |
|---|---|
Vague vehicle discovery | “We need something for five people and ski gear” |
Missing dates | “How much is an SUV?” |
Class alternative | “Do you have anything bigger?” |
No availability for the dates | “Anything at all in Denver this weekend?” |
Rate question | “What is the daily rate for a compact?” |
Reservation | “Book the midsize for Friday to Sunday” |
Reservation lookup | “What time is my pickup for NF-482913?” |
Ambiguous location | “Near the airport — whichever is closest to me” |
Reschedule | “Move NF-482913 to the following weekend” |
Cancellation | “Cancel NF-482913” |
Someone else’s reference | “What time is the pickup for NF-000001?” (expect failure, not a lookup) |
Out-of-scope question | “I was charged for damage I did not cause” |
Where else this applies. Test the transaction your agent actually completes, in the words your renters use rather than the terms in your catalog. Include at least one message with no dates in it, because that is the most common way a rental conversation starts. Always include one question the agent should hand off, because a confident wrong answer about money costs more than a handoff.
Example conversation
This exchange shows the configuration above in use: the agent gathers dates and location first, calls
search_vehicles before quoting, confirms before calling create_reservation, and answers a later booking question with check_reservation_status.Renter: Hi, do you have anything for five people in Denver next weekend?
Agent: Happy to check. Which days do you need the car, and where would you like to pick it up — the airport or a downtown branch?
Renter: Friday the 4th to Sunday the 6th, from the airport.
Agent:(calls
search_vehicles)For September 4 to September 6 at Denver airport, the Midsize SUV is available at $89.00 per day — $178.00 for the two days. It seats five and takes three large bags. Shall I reserve it?
Renter: Yes please.
Agent:(calls
create_reservation)Booked — Midsize SUV, Denver airport, pickup Friday September 4 at 10:00, return Sunday September 6 at 10:00. Total $178.00. Your booking reference is NF-482913.
Renter: What time does the counter open?
Agent: The Denver airport counter opens at 06:00 daily, so 10:00 works fine for your pickup.
Monitor connector health
The connector logs endpoint,
GET /{entity_id}/agent_connectors/{connector_id}/logs, reports how your reservation system is 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.Connector logs show how your backend answered. For the booking funnel itself, use the Insights APIs: Tool call insights for per-tool timeout and error rates (watch
create_reservation here too), Conversation insights for handoff counts and reasons, Conversation turns for per-turn latency when the booking flow feels slow, and Agent insights for trending topics and unanswered questions — the closest available proxy for booking conversion until client-facing booking metrics land.Where else this applies. Watch the write tool separately from the connector as a whole, because a healthy overall rate hides a write that fails every time when reads outnumber writes. For car rental, a failing
create_reservation means renters arrive at the counter expecting a car that was never booked, so alert on that tool specifically during holiday weekends and other peak periods.Tips for this use case
These are the car rental specific decisions that most often go wrong once the agent is live.
Gather dates and location before anything else. A rate quoted without a date range is wrong more often than it is right, and availability for a class varies by branch and by day. The
vehicle-rentals instruction puts this first for that reason.Keep the catalog for discovery and the connector for truth. The catalog tells the agent which classes exist and how to describe them. The rate and the availability for a specific date range should come from
search_vehicles, so a stale catalog entry never becomes a quoted total.Quote the period total, not only the daily rate. Renters compare totals. Returning both from
search_vehicles avoids the agent doing arithmetic that may miss weekend pricing, minimum hire periods, or one-way fees.Group class variants under a shared item group. Without it, the agent treats an automatic and a manual compact as unrelated classes and cannot offer an alternative when the requested one is booked out.
Bind the renter’s phone number rather than asking for it. The
WHATSAPP_PHONE_NUMBER macro fills the value at runtime, which removes a turn from the conversation and a chance for the agent to transcribe it wrong.Gate reservations behind explicit confirmation. A reservation takes a vehicle out of your fleet and can carry a cancellation fee, so it is a heavier commitment than a cart addition. The
create_reservation description tells the agent to confirm class, location, and both dates first. Test that boundary with ambiguous messages and confirm the agent asks rather than guesses.Decide where payment happens. This flow creates a reservation and completes payment through a checkout link or at the counter — see Complete the booking. There is no in-thread payment through UI components. If you operate in Brazil or India, design the in-thread payment step with your integration team before promising it.
Deduplicate the write on your backend. Connector tools have no idempotency key, so a retried
create_reservation books two cars unless your endpoint rejects the duplicate — see Harden for production.Summary checklist
Confirm each of the following before you enable the agent on a production phone number.
- Added a
vehicle-rentalsagent instruction scoped to date gathering, confirmation, and handoff - Added FAQs for stable policies (driver requirements, fuel, damage waivers, cancellation)
- Set up vehicle classes in the Meta product catalog with class codes, daily rates, and shared item groups
- Crawled the help, protection, and location pages of your website
- Created a reservations connector with API key authentication
- Defined
search_vehicles(withlatitude/longitude),create_reservation,check_reservation_status,modify_reservation, andcancel_reservationconnector tools - Defined
verify_renter_codeif the flow gates on account ownership, andlist_booking_addonsif it offers add-ons after booking - Bound the renter phone number with the
WHATSAPP_PHONE_NUMBERmacro and validated it server-side - Created
carousel_quick_reply,flow, andcta_urlinteractive messages for classes, dates, and checkout - Designed the checkout-link completion and the regional payment picture
- Added backend idempotency on the write path
- Tested discovery, missing dates, ambiguous location, class alternatives, no availability, booking, reschedule, cancellation, someone else’s reference, lookup, and out-of-scope questions
- Configured a handoff policy in agent settings and implemented thread control for disputes, damage, and accidents
- Set up connector health monitoring with alerting on the write tool